| ... | ... | @@ -597,10 +597,10 @@ fn expr(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) InnerEr |
| 597 | 597 | .asm_simple => return asmExpr(gz, scope, rl, node, tree.asmSimple(node)), |
| 598 | 598 | .@"asm" => return asmExpr(gz, scope, rl, node, tree.asmFull(node)), |
| 599 | 599 | |
| 600 | | .string_literal => return stringLiteral(gz, scope, rl, node), |
| 601 | | .multiline_string_literal => return multilineStringLiteral(gz, scope, rl, node), |
| 600 | .string_literal => return stringLiteral(gz, rl, node), |
| 601 | .multiline_string_literal => return multilineStringLiteral(gz, rl, node), |
| 602 | 602 | |
| 603 | | .integer_literal => return integerLiteral(gz, scope, rl, node), |
| 603 | .integer_literal => return integerLiteral(gz, rl, node), |
| 604 | 604 | // zig fmt: on |
| 605 | 605 | |
| 606 | 606 | .builtin_call_two, .builtin_call_two_comma => { |
| ... | ... | @@ -640,7 +640,7 @@ fn expr(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) InnerEr |
| 640 | 640 | }, |
| 641 | 641 | .@"return" => return ret(gz, scope, node), |
| 642 | 642 | .field_access => return fieldAccess(gz, scope, rl, node), |
| 643 | | .float_literal => return floatLiteral(gz, scope, rl, node), |
| 643 | .float_literal => return floatLiteral(gz, rl, node), |
| 644 | 644 | |
| 645 | 645 | .if_simple => return ifExpr(gz, scope, rl, node, tree.ifSimple(node)), |
| 646 | 646 | .@"if" => return ifExpr(gz, scope, rl, node, tree.ifFull(node)), |
| ... | ... | @@ -737,8 +737,8 @@ fn expr(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) InnerEr |
| 737 | 737 | const statements = tree.extra_data[node_datas[node].lhs..node_datas[node].rhs]; |
| 738 | 738 | return blockExpr(gz, scope, rl, node, statements); |
| 739 | 739 | }, |
| 740 | | .enum_literal => return simpleStrTok(gz, scope, rl, main_tokens[node], node, .enum_literal), |
| 741 | | .error_value => return simpleStrTok(gz, scope, rl, node_datas[node].rhs, node, .error_value), |
| 740 | .enum_literal => return simpleStrTok(gz, rl, main_tokens[node], node, .enum_literal), |
| 741 | .error_value => return simpleStrTok(gz, rl, node_datas[node].rhs, node, .error_value), |
| 742 | 742 | .anyframe_literal => return rvalue(gz, rl, .anyframe_type, node), |
| 743 | 743 | .anyframe_type => { |
| 744 | 744 | const return_type = try typeExpr(gz, scope, node_datas[node].rhs); |
| ... | ... | @@ -837,8 +837,8 @@ fn expr(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) InnerEr |
| 837 | 837 | .grouped_expression => return expr(gz, scope, rl, node_datas[node].lhs), |
| 838 | 838 | .array_type => return arrayType(gz, scope, rl, node), |
| 839 | 839 | .array_type_sentinel => return arrayTypeSentinel(gz, scope, rl, node), |
| 840 | | .char_literal => return charLiteral(gz, scope, rl, node), |
| 841 | | .error_set_decl => return errorSetDecl(gz, scope, rl, node), |
| 840 | .char_literal => return charLiteral(gz, rl, node), |
| 841 | .error_set_decl => return errorSetDecl(gz, rl, node), |
| 842 | 842 | .array_access => return arrayAccess(gz, scope, rl, node), |
| 843 | 843 | .@"comptime" => return comptimeExprAst(gz, scope, rl, node), |
| 844 | 844 | .@"switch", .switch_comma => return switchExpr(gz, scope, rl, node), |
| ... | ... | @@ -4458,12 +4458,7 @@ fn containerDecl( |
| 4458 | 4458 | } |
| 4459 | 4459 | } |
| 4460 | 4460 | |
| 4461 | | fn errorSetDecl( |
| 4462 | | gz: *GenZir, |
| 4463 | | scope: *Scope, |
| 4464 | | rl: ResultLoc, |
| 4465 | | node: ast.Node.Index, |
| 4466 | | ) InnerError!Zir.Inst.Ref { |
| 4461 | fn errorSetDecl(gz: *GenZir, rl: ResultLoc, node: ast.Node.Index) InnerError!Zir.Inst.Ref { |
| 4467 | 4462 | const astgen = gz.astgen; |
| 4468 | 4463 | const gpa = astgen.gpa; |
| 4469 | 4464 | const tree = astgen.tree; |
| ... | ... | @@ -4559,7 +4554,6 @@ fn tryExpr( |
| 4559 | 4554 | |
| 4560 | 4555 | return finishThenElseBlock( |
| 4561 | 4556 | parent_gz, |
| 4562 | | scope, |
| 4563 | 4557 | rl, |
| 4564 | 4558 | node, |
| 4565 | 4559 | &block_scope, |
| ... | ... | @@ -4652,7 +4646,6 @@ fn orelseCatchExpr( |
| 4652 | 4646 | |
| 4653 | 4647 | return finishThenElseBlock( |
| 4654 | 4648 | parent_gz, |
| 4655 | | scope, |
| 4656 | 4649 | rl, |
| 4657 | 4650 | node, |
| 4658 | 4651 | &block_scope, |
| ... | ... | @@ -4670,7 +4663,6 @@ fn orelseCatchExpr( |
| 4670 | 4663 | |
| 4671 | 4664 | fn finishThenElseBlock( |
| 4672 | 4665 | parent_gz: *GenZir, |
| 4673 | | parent_scope: *Scope, |
| 4674 | 4666 | rl: ResultLoc, |
| 4675 | 4667 | node: ast.Node.Index, |
| 4676 | 4668 | block_scope: *GenZir, |
| ... | ... | @@ -4805,7 +4797,6 @@ fn simpleBinOp( |
| 4805 | 4797 | |
| 4806 | 4798 | fn simpleStrTok( |
| 4807 | 4799 | gz: *GenZir, |
| 4808 | | scope: *Scope, |
| 4809 | 4800 | rl: ResultLoc, |
| 4810 | 4801 | ident_token: ast.TokenIndex, |
| 4811 | 4802 | node: ast.Node.Index, |
| ... | ... | @@ -5005,7 +4996,6 @@ fn ifExpr( |
| 5005 | 4996 | |
| 5006 | 4997 | return finishThenElseBlock( |
| 5007 | 4998 | parent_gz, |
| 5008 | | scope, |
| 5009 | 4999 | rl, |
| 5010 | 5000 | node, |
| 5011 | 5001 | &block_scope, |
| ... | ... | @@ -5285,7 +5275,6 @@ fn whileExpr( |
| 5285 | 5275 | const break_tag: Zir.Inst.Tag = if (is_inline) .break_inline else .@"break"; |
| 5286 | 5276 | return finishThenElseBlock( |
| 5287 | 5277 | parent_gz, |
| 5288 | | scope, |
| 5289 | 5278 | rl, |
| 5290 | 5279 | node, |
| 5291 | 5280 | &loop_scope, |
| ... | ... | @@ -5459,7 +5448,6 @@ fn forExpr( |
| 5459 | 5448 | const break_tag: Zir.Inst.Tag = if (is_inline) .break_inline else .@"break"; |
| 5460 | 5449 | return finishThenElseBlock( |
| 5461 | 5450 | parent_gz, |
| 5462 | | scope, |
| 5463 | 5451 | rl, |
| 5464 | 5452 | node, |
| 5465 | 5453 | &loop_scope, |
| ... | ... | @@ -6261,7 +6249,6 @@ fn identifier( |
| 6261 | 6249 | |
| 6262 | 6250 | fn stringLiteral( |
| 6263 | 6251 | gz: *GenZir, |
| 6264 | | scope: *Scope, |
| 6265 | 6252 | rl: ResultLoc, |
| 6266 | 6253 | node: ast.Node.Index, |
| 6267 | 6254 | ) InnerError!Zir.Inst.Ref { |
| ... | ... | @@ -6282,7 +6269,6 @@ fn stringLiteral( |
| 6282 | 6269 | |
| 6283 | 6270 | fn multilineStringLiteral( |
| 6284 | 6271 | gz: *GenZir, |
| 6285 | | scope: *Scope, |
| 6286 | 6272 | rl: ResultLoc, |
| 6287 | 6273 | node: ast.Node.Index, |
| 6288 | 6274 | ) InnerError!Zir.Inst.Ref { |
| ... | ... | @@ -6323,7 +6309,7 @@ fn multilineStringLiteral( |
| 6323 | 6309 | return rvalue(gz, rl, result, node); |
| 6324 | 6310 | } |
| 6325 | 6311 | |
| 6326 | | fn charLiteral(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) !Zir.Inst.Ref { |
| 6312 | fn charLiteral(gz: *GenZir, rl: ResultLoc, node: ast.Node.Index) !Zir.Inst.Ref { |
| 6327 | 6313 | const astgen = gz.astgen; |
| 6328 | 6314 | const tree = astgen.tree; |
| 6329 | 6315 | const main_tokens = tree.nodes.items(.main_token); |
| ... | ... | @@ -6346,12 +6332,7 @@ fn charLiteral(gz: *GenZir, scope: *Scope, rl: ResultLoc, node: ast.Node.Index) |
| 6346 | 6332 | return rvalue(gz, rl, result, node); |
| 6347 | 6333 | } |
| 6348 | 6334 | |
| 6349 | | fn integerLiteral( |
| 6350 | | gz: *GenZir, |
| 6351 | | scope: *Scope, |
| 6352 | | rl: ResultLoc, |
| 6353 | | node: ast.Node.Index, |
| 6354 | | ) InnerError!Zir.Inst.Ref { |
| 6335 | fn integerLiteral(gz: *GenZir, rl: ResultLoc, node: ast.Node.Index) InnerError!Zir.Inst.Ref { |
| 6355 | 6336 | const astgen = gz.astgen; |
| 6356 | 6337 | const tree = astgen.tree; |
| 6357 | 6338 | const main_tokens = tree.nodes.items(.main_token); |
| ... | ... | @@ -6397,12 +6378,7 @@ fn integerLiteral( |
| 6397 | 6378 | return rvalue(gz, rl, result, node); |
| 6398 | 6379 | } |
| 6399 | 6380 | |
| 6400 | | fn floatLiteral( |
| 6401 | | gz: *GenZir, |
| 6402 | | scope: *Scope, |
| 6403 | | rl: ResultLoc, |
| 6404 | | node: ast.Node.Index, |
| 6405 | | ) InnerError!Zir.Inst.Ref { |
| 6381 | fn floatLiteral(gz: *GenZir, rl: ResultLoc, node: ast.Node.Index) InnerError!Zir.Inst.Ref { |
| 6406 | 6382 | const astgen = gz.astgen; |
| 6407 | 6383 | const tree = astgen.tree; |
| 6408 | 6384 | const main_tokens = tree.nodes.items(.main_token); |
| ... | ... | @@ -6904,8 +6880,8 @@ fn builtinCall( |
| 6904 | 6880 | return rvalue(gz, rl, result, node); |
| 6905 | 6881 | }, |
| 6906 | 6882 | |
| 6907 | | .breakpoint => return simpleNoOpVoid(gz, scope, rl, node, .breakpoint), |
| 6908 | | .fence => return simpleNoOpVoid(gz, scope, rl, node, .fence), |
| 6883 | .breakpoint => return simpleNoOpVoid(gz, rl, node, .breakpoint), |
| 6884 | .fence => return simpleNoOpVoid(gz, rl, node, .fence), |
| 6909 | 6885 | |
| 6910 | 6886 | .This => return rvalue(gz, rl, try gz.addNodeExtended(.this, node), node), |
| 6911 | 6887 | .return_address => return rvalue(gz, rl, try gz.addNodeExtended(.ret_addr, node), node), |
| ... | ... | @@ -7218,7 +7194,6 @@ fn builtinCall( |
| 7218 | 7194 | |
| 7219 | 7195 | fn simpleNoOpVoid( |
| 7220 | 7196 | gz: *GenZir, |
| 7221 | | scope: *Scope, |
| 7222 | 7197 | rl: ResultLoc, |
| 7223 | 7198 | node: ast.Node.Index, |
| 7224 | 7199 | tag: Zir.Inst.Tag, |