nyash-codex
8b48bec962
feat(joinir): Phase 78 - BindingId infrastructure for promoted carriers (dev-only)
Phase 78 adds infrastructure to assign BindingIds to synthetic promoted
carriers (e.g., is_digit_pos, is_ch_match), enabling type-safe promoted
variable lookup without string-based naming conventions.
Key Changes:
1. CarrierVar.binding_id field (dev-only):
- Added Option<BindingId> to track BindingId for each carrier
- Updated all constructors and struct instantiations
2. CarrierBindingAssigner Box (new file, 273 lines):
- Allocates BindingIds for promoted carriers via builder.allocate_binding_id()
- Records original → promoted mapping in promoted_bindings
- Sets binding_id field on promoted CarrierVar
- Includes 3 comprehensive unit tests
3. ConditionEnv.register_carrier_binding() (new method):
- Registers carrier BindingId → ValueId mappings
- Enables type-safe lookup via binding_id_map
4. Logging cleanup:
- Gated 6 eprintln! statements with NYASH_JOINIR_DEBUG
- Unified logging tags to [binding_pilot/*]
Design Decisions:
- Promoters create CarrierInfo, lowering code assigns BindingIds
- CarrierBindingAssigner called from Pattern2/4 lowering (has builder access)
- Clear documentation prevents misuse (promoters lack builder access)
Files modified (18):
- carrier_info.rs: binding_id field added to CarrierVar
- carrier_binding_assigner.rs: New Box for BindingId allocation
- condition_env.rs: register_carrier_binding() method
- mod.rs: Module exports
- pattern2_with_break.rs, pattern4_with_continue.rs: Updated for binding_id
- loop_body_*_promoter.rs: Logging cleanup + binding_id in structs
- phase78-bindingid-promoted-carriers.md: Architecture documentation
Tests: 970/970 PASS (zero regressions)
Status: Infrastructure complete, integration deferred to Phase 79
Next Phase: Wire CarrierBindingAssigner in Pattern2/4 lowering + E2E tests
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-13 16:20:33 +09:00
..
2025-12-03 13:42:05 +09:00
2025-12-11 00:21:29 +09:00
2025-12-11 00:21:29 +09:00
2025-12-07 01:45:03 +09:00
2025-09-17 10:58:12 +09:00
2025-12-04 10:52:10 +09:00
2025-12-05 16:08:56 +09:00
2025-12-04 06:02:03 +09:00
2025-12-04 06:02:03 +09:00
2025-12-03 13:59:06 +09:00
2025-12-05 23:33:06 +09:00
2025-12-05 23:33:06 +09:00
2025-12-08 04:14:28 +09:00
2025-12-02 21:52:18 +09:00
2025-12-10 00:01:53 +09:00
2025-12-04 06:02:03 +09:00
2025-12-13 03:47:54 +09:00
2025-12-08 06:14:03 +09:00
2025-12-08 00:09:45 +09:00
2025-12-03 14:33:04 +09:00
2025-12-06 16:22:38 +09:00
2025-12-08 18:36:13 +09:00
2025-12-04 17:47:19 +09:00
2025-12-11 20:54:33 +09:00
2025-12-11 00:33:04 +09:00
2025-12-11 00:33:04 +09:00
2025-12-12 03:15:45 +09:00
2025-12-12 04:06:03 +09:00
2025-12-12 03:31:58 +09:00
2025-12-12 04:40:46 +09:00
2025-12-12 07:13:34 +09:00
2025-12-12 04:50:26 +09:00
2025-12-12 16:40:20 +09:00
2025-12-12 17:12:58 +09:00
2025-12-12 22:15:41 +09:00
2025-12-12 23:02:40 +09:00
2025-12-12 23:02:40 +09:00
2025-12-13 02:22:29 +09:00
2025-12-13 03:47:54 +09:00
2025-12-13 03:41:20 +09:00
2025-12-13 03:41:26 +09:00
2025-12-13 03:23:02 +09:00
2025-12-13 03:41:40 +09:00
2025-12-13 03:41:40 +09:00
2025-12-13 03:41:40 +09:00
2025-12-13 05:34:56 +09:00
2025-12-13 05:34:56 +09:00
2025-12-13 05:35:04 +09:00
2025-12-13 05:35:14 +09:00
2025-12-13 05:35:35 +09:00
2025-12-13 16:20:33 +09:00
2025-12-12 03:15:45 +09:00
2025-12-08 21:26:57 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-12 04:19:06 +09:00
2025-12-12 04:19:06 +09:00
2025-12-11 02:35:31 +09:00
2025-12-12 03:15:45 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 13:13:08 +09:00
2025-12-12 03:15:45 +09:00
2025-12-12 04:19:06 +09:00
2025-12-12 04:19:06 +09:00
2025-12-11 15:08:14 +09:00
2025-12-11 15:08:14 +09:00
2025-12-07 21:02:20 +09:00
2025-12-07 21:02:20 +09:00
2025-12-12 05:07:01 +09:00
2025-12-12 17:51:53 +09:00
2025-12-12 18:08:00 +09:00
2025-12-12 18:45:08 +09:00
2025-12-12 22:51:21 +09:00
2025-12-12 22:51:21 +09:00
2025-12-12 23:02:40 +09:00
2025-12-13 03:23:02 +09:00
2025-12-13 05:34:56 +09:00
2025-12-13 05:35:04 +09:00
2025-12-13 05:35:35 +09:00
2025-12-13 05:35:35 +09:00
2025-12-05 16:06:39 +09:00
2025-12-06 11:10:38 +09:00
2025-12-12 04:19:06 +09:00
2025-12-10 18:45:04 +09:00
2025-12-10 19:08:18 +09:00
2025-12-10 22:48:45 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 02:35:31 +09:00
2025-12-11 15:08:14 +09:00
2025-11-23 05:53:27 +09:00
2025-12-07 21:02:20 +09:00
2025-12-10 21:53:27 +09:00
2025-12-12 23:11:45 +09:00
2025-12-10 00:29:25 +09:00
2025-12-04 03:58:02 +09:00
2025-12-04 12:40:01 +09:00
2025-11-21 07:00:05 +09:00
2025-11-21 08:03:03 +09:00
2025-11-21 08:03:03 +09:00
2025-12-08 15:17:53 +09:00
2025-11-20 17:10:03 +09:00
2025-11-20 17:10:03 +09:00
2025-11-20 17:10:03 +09:00