nyash-codex
801833df8d
fix(env): improve Environment::set scope resolution (partial)
...
Fixed:
- Environment::set now properly searches ancestor chain before creating new binding
- Added exists_in_chain_locked() helper for explicit existence checking
- Simple {} blocks now correctly update outer scope variables
Verified Working:
- local x = 10; { x = 42 }; print(x) → prints 42 ✅
Still Broken:
- else blocks don't update outer scope variables
- local x = 10; if flag { x = 99 } else { x = 42 }; print(x) → prints 10 ❌
Root Cause Identified:
- Issue is in MIR Builder (compile-time), not Environment (runtime)
- src/mir/builder/if_form.rs:108 resets variable_map before else block
- PHI generation at merge doesn't use else_var_map_end correctly
- MIR shows: phi [%32, bb1], [%1, bb2] where %1 is original value, not else value
Next: Fix else block variable merging in if_form.rs
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-13 18:55:14 +09:00
..
2025-09-26 00:42:55 +09:00
2025-09-06 06:24:08 +09:00
2025-10-31 19:22:00 +09:00
2025-08-28 12:09:09 +09:00
2025-11-09 00:57:10 +09:00
2025-11-13 16:40:58 +09:00
2025-09-19 02:07:38 +09:00
2025-11-08 23:58:42 +09:00
2025-11-08 23:45:29 +09:00
2025-10-31 19:22:00 +09:00
2025-11-11 02:07:12 +09:00
2025-09-07 07:28:53 +09:00
2025-11-13 16:40:58 +09:00
2025-11-01 12:19:17 +09:00
2025-11-02 15:43:43 +09:00
2025-11-06 15:41:52 +09:00
2025-11-09 15:11:18 +09:00
2025-11-13 18:55:14 +09:00
2025-11-06 15:41:52 +09:00
2025-09-06 06:24:08 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-14 00:44:28 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-29 23:11:21 +09:00
2025-11-06 15:41:52 +09:00
2025-11-09 15:11:18 +09:00
2025-11-07 19:32:44 +09:00
2025-09-01 23:44:34 +09:00
2025-11-06 15:41:52 +09:00
2025-09-14 04:51:33 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-16 23:49:36 +09:00
2025-09-06 06:24:08 +09:00
2025-09-05 05:16:21 +09:00
2025-09-05 05:16:21 +09:00
2025-11-01 18:53:15 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-01 13:28:56 +09:00
2025-11-01 13:28:56 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-08 15:49:25 +09:00
2025-11-13 17:23:48 +09:00
2025-11-06 15:41:52 +09:00
2025-09-14 04:51:33 +09:00
2025-11-11 21:24:51 +09:00
2025-09-04 11:34:15 +09:00
2025-11-06 15:41:52 +09:00
2025-09-04 11:34:15 +09:00
2025-09-07 07:36:15 +09:00
2025-11-09 23:40:36 +09:00
2025-09-15 01:21:37 +09:00
2025-11-13 16:40:58 +09:00
2025-09-05 13:29:17 +09:00
2025-09-05 13:29:17 +09:00
2025-09-14 19:16:32 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-01 18:53:15 +09:00
2025-09-15 01:21:37 +09:00
2025-09-05 13:29:17 +09:00
2025-09-07 07:36:15 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-09-17 01:20:15 +09:00
2025-09-05 05:16:21 +09:00
2025-09-27 08:45:25 +09:00
2025-09-27 08:45:25 +09:00
2025-09-04 11:34:15 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-19 02:07:38 +09:00
2025-09-19 02:07:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-18 13:35:38 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 22:14:42 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-21 08:53:00 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-09-15 18:44:49 +09:00
2025-11-06 15:41:52 +09:00
2025-09-15 18:44:49 +09:00
2025-11-06 15:41:52 +09:00
2025-08-23 16:33:32 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-11 21:24:51 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-01 18:53:15 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-11-08 17:04:21 +09:00
2025-11-06 15:41:52 +09:00
2025-11-08 17:04:21 +09:00
2025-11-13 18:11:25 +09:00
2025-11-09 15:11:18 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-16 14:57:05 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-09-07 07:36:15 +09:00
2025-09-17 20:33:19 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-24 00:05:12 +09:00