about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bootstrap/tokenizer.src3
-rw-r--r--src/codegen.zig3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/bootstrap/tokenizer.src b/src/bootstrap/tokenizer.src
index 3cbb6c1..2f57b02 100644
--- a/src/bootstrap/tokenizer.src
+++ b/src/bootstrap/tokenizer.src
@@ -104,8 +104,7 @@ let print_tokens = (ts: *token, ts_len: i64) => i64 {
 			printf("Number: %d\n", *cast(*i64, to.data));
 		};
 		if (to.type == TOKEN_BOOLEAN) {
-			printf("Boolean: %d\n", cast(i1, to.data));
-			/* TODO: FIX */
+			printf("Boolean: %d\n", *cast(*bool, to.data));
 		};
 		if (to.type == TOKEN_NULL) {
 			printf("Null\n");
diff --git a/src/codegen.zig b/src/codegen.zig
index 30ef293..3fb5573 100644
--- a/src/codegen.zig
+++ b/src/codegen.zig
@@ -780,8 +780,7 @@ pub const CodeGen = struct {
             },
             .SIZEOF_STATEMENT => |exp| {
                 const typ = try self.get_llvm_type(exp.typ);
-                const size_in_bits = llvm.LLVMSizeOfTypeInBits(self.llvm_target_data, typ);
-                const size_in_bytes = size_in_bits / 8;
+                const size_in_bytes = llvm.LLVMStoreSizeOfType(self.llvm_target_data, typ);
 
                 const size_val = llvm.LLVMConstInt(llvm.LLVMInt64Type(), size_in_bytes, 0);