authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-03-12 13:40:47+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-03-12 13:42:17+02:00
logd532c21d890e1aa22cd4c57d6a3f749890256254
tree17eb7e1089fd062b9040dee73d8b9c3b80dabcb8
parent487ee79ec92a69832293d10b16beb4c8471af7ac

AstGen: fix nosuspendExpr handling result location twice


2 files changed, 3 insertions(+), 4 deletions(-)

lib/std/dwarf.zig+1-1
...@@ -822,7 +822,7 @@ pub const DwarfInfo = struct {...@@ -822,7 +822,7 @@ pub const DwarfInfo = struct {
822 // in the list itself.822 // in the list itself.
823 // If no starting value is specified use zero.823 // If no starting value is specified use zero.
824 var base_address = compile_unit.die.getAttrAddr(AT.low_pc) catch |err| switch (err) {824 var base_address = compile_unit.die.getAttrAddr(AT.low_pc) catch |err| switch (err) {
825 error.MissingDebugInfo => 0,825 error.MissingDebugInfo => @as(u64, 0), // TODO https://github.com/ziglang/zig/issues/11135
826 else => return err,826 else => return err,
827 };827 };
828828
src/AstGen.zig+2-3
...@@ -1035,9 +1035,8 @@ fn nosuspendExpr(...@@ -1035,9 +1035,8 @@ fn nosuspendExpr(
1035 });1035 });
1036 }1036 }
1037 gz.nosuspend_node = node;1037 gz.nosuspend_node = node;
1038 const result = try expr(gz, scope, rl, body_node);1038 defer gz.nosuspend_node = 0;
1039 gz.nosuspend_node = 0;1039 return expr(gz, scope, rl, body_node);
1040 return rvalue(gz, rl, result, node);
1041}1040}
10421041
1043fn suspendExpr(1042fn suspendExpr(