diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-07-27 17:08:37 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-07-27 17:08:37 -0700 |
| commit | dc88864c9742029c2980fc16cd2c9e6f04ff3568 (patch) | |
| tree | 2569f14d189ef238ca7a281774e09ba49374113b /src/AstGen.zig | |
| parent | 66e5920dc3411daa4f0c84a8f4c733c1263e8523 (diff) | |
| download | zig-dc88864c9742029c2980fc16cd2c9e6f04ff3568.tar.gz zig-dc88864c9742029c2980fc16cd2c9e6f04ff3568.zip | |
stage2: implement `@boolToInt`
This is the first commit in which some behavior tests are passing for
both stage1 and stage2.
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 34f906fab1..b5e5d60b2c 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -7754,6 +7754,7 @@ pub const simple_types = std.ComptimeStringMap(Zir.Inst.Ref, .{ .{ "u32", .u32_type }, .{ "u64", .u64_type }, .{ "u128", .u128_type }, + .{ "u1", .u1_type }, .{ "u8", .u8_type }, .{ "undefined", .undef }, .{ "usize", .usize_type }, @@ -8400,6 +8401,7 @@ fn rvalue( const as_usize = @as(u64, @enumToInt(Zir.Inst.Ref.usize_type)) << 32; const as_void = @as(u64, @enumToInt(Zir.Inst.Ref.void_type)) << 32; switch ((@as(u64, @enumToInt(ty_inst)) << 32) | @as(u64, @enumToInt(result))) { + as_ty | @enumToInt(Zir.Inst.Ref.u1_type), as_ty | @enumToInt(Zir.Inst.Ref.u8_type), as_ty | @enumToInt(Zir.Inst.Ref.i8_type), as_ty | @enumToInt(Zir.Inst.Ref.u16_type), |
