When lowering `self.cb()` from inside a method whose receiver is *Self, the field-access path passed the receiver pointer (not the aggregate) to `structGet`, which then produced `call void undef(ptr undef)` at the LLVM level — undefined at runtime, corrupted adjacent globals when it transferred control to a garbage pointer. Auto-load through the pointer first so structGet receives a real aggregate. Discovered while building the new AndroidPlatform's `run_frame_loop` — calling the stored frame closure as `self.frame_closure()` zeroed out adjacent globals because the undef call jumped into random memory. Added examples/100-closure-field-call-via-self-ptr.sx as the locked-in regression: both direct (`self.cb()`) and hoisted (`fn := self.cb; fn();`) forms must yield identical IR + behavior. 86/86 regression tests pass.
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
2
|