Skip to content

Commit 8df9752

Browse files
committed
Feature(compiler): Use int1 for boolean, not int8
1 parent acae822 commit 8df9752

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

sandbox/do-simple-math.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
console_log("hello");
1717
console_log(doMath());
18-
// console_log(true);
19-
// console_log(false);
18+
console_log(true);
19+
console_log(false);
2020
console_log(1 > 5);
2121
console_log(1 < 5);
2222
}

src/backend/llvm/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function buildFromTrueKeyword(node: ts.BooleanLiteral, ctx: Context, buil
7979
return llvm.ConstantInt.get(
8080
ctx.llvmContext,
8181
1,
82-
8,
82+
1,
8383
false
8484
);
8585
}
@@ -88,7 +88,7 @@ export function buildFromFalseKeyword(node: ts.BooleanLiteral, ctx: Context, bui
8888
return llvm.ConstantInt.get(
8989
ctx.llvmContext,
9090
0,
91-
8,
91+
1,
9292
false
9393
);
9494
}

0 commit comments

Comments
 (0)