stage2: move most simple values to InternPool

This commit is contained in:
Andrew Kelley
2023-05-03 19:12:53 -07:00
parent 836d8a1f64
commit ca3cf93b21
12 changed files with 524 additions and 746 deletions

View File

@@ -494,7 +494,7 @@ pub fn generateSymbol(
return Result.ok;
},
.Bool => {
const x: u8 = @boolToInt(typed_value.val.toBool());
const x: u8 = @boolToInt(typed_value.val.toBool(mod));
try code.append(x);
return Result.ok;
},
@@ -1213,7 +1213,7 @@ pub fn genTypedValue(
}
},
.Bool => {
return GenResult.mcv(.{ .immediate = @boolToInt(typed_value.val.toBool()) });
return GenResult.mcv(.{ .immediate = @boolToInt(typed_value.val.toBool(mod)) });
},
.Optional => {
if (typed_value.ty.isPtrLikeOptional(mod)) {