diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-06 22:41:43 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-06 22:41:43 -0500 |
| commit | 069dd01ce4ced3cb9664e4f1e09be753cb3ed476 (patch) | |
| tree | 4e32e8efde362d928e204335d8582788d1355b35 /src/AstGen.zig | |
| parent | 53e6c719efe5073307ee58436b17ee80f574b984 (diff) | |
| parent | eb82fdf96c3392ec9eabacbaa98c976f9ccd264e (diff) | |
| download | zig-069dd01ce4ced3cb9664e4f1e09be753cb3ed476.tar.gz zig-069dd01ce4ced3cb9664e4f1e09be753cb3ed476.zip | |
Merge pull request #10740 from ziglang/stage2-float-arithmetic
stage2: add more float arithmetic and f80 support
Diffstat (limited to 'src/AstGen.zig')
| -rw-r--r-- | src/AstGen.zig | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/AstGen.zig b/src/AstGen.zig index 228937fffa..5f6d05b7f5 100644 --- a/src/AstGen.zig +++ b/src/AstGen.zig @@ -2601,8 +2601,8 @@ fn varDecl( var resolve_inferred_alloc: Zir.Inst.Ref = .none; var opt_type_inst: Zir.Inst.Ref = .none; - if (var_decl.ast.type_node != 0) { - const type_inst = try typeExpr(gz, &init_scope.base, var_decl.ast.type_node); + if (type_node != 0) { + const type_inst = try typeExpr(gz, &init_scope.base, type_node); opt_type_inst = type_inst; if (align_inst == .none) { init_scope.instructions_top = gz.instructions.items.len; @@ -2683,7 +2683,7 @@ fn varDecl( const src_inst = gz.instructions.items[src]; if (zir_tags[src_inst] == .store_to_block_ptr) { if (zir_datas[src_inst].bin.lhs == init_scope.rl_ptr) { - if (var_decl.ast.type_node != 0) { + if (type_node != 0) { zir_tags[src_inst] = .store; } else { zir_tags[src_inst] = .store_to_inferred_ptr; @@ -8409,10 +8409,11 @@ fn nodeImpliesMoreThanOnePossibleValue(tree: *const Ast, start_node: Ast.Node.In .c_ushort_type, .comptime_float_type, .comptime_int_type, - .f128_type, .f16_type, .f32_type, .f64_type, + .f80_type, + .f128_type, .i16_type, .i32_type, .i64_type, @@ -8648,10 +8649,11 @@ fn nodeImpliesComptimeOnly(tree: *const Ast, start_node: Ast.Node.Index) bool { .c_ulong_type, .c_ulonglong_type, .c_ushort_type, - .f128_type, .f16_type, .f32_type, .f64_type, + .f80_type, + .f128_type, .i16_type, .i32_type, .i64_type, |
