w6c: keep nested unwrap destinations distinct
This commit is contained in:
@@ -8780,7 +8780,11 @@ fn cgassign(c: *cgen, n: *syntax.node) void = {
|
||||
os.write(2, m16.ptr, m16.len: u64);
|
||||
os.exit(1);
|
||||
};
|
||||
let dstscr: i32 = localadd(c, "@unwrapdst", 8, nil);
|
||||
// Fresh per lowering: cgexpr(rhs) may recursively
|
||||
// emit another #16 assignment while this address is
|
||||
// live. Sharing one per-fn slot would let the inner
|
||||
// assignment overwrite the outer receiver.
|
||||
let dstscr: i32 = localalloc(c, "@unwrapdst", 8, nil);
|
||||
emitline("\tMOVQ\tBX, ");
|
||||
emitoff(dstscr: i64);
|
||||
emitline("(BP)\n");
|
||||
|
||||
Reference in New Issue
Block a user