Commit 50001fd
committed
Fix transpiler conflict detection and AST consistency
This addresses two issues identified by Qodo bot code review:
Issue #3: Conflict detection indexing bug
- Previously only ifthen handlers got unique keys
- All on.always() blocks collapsed to single key, causing:
* False positives: assignments in different blocks flagged as conflicts
* Disabled race detection: check requires multiple handlers but all collapsed to 1
- Fix: Give every handler a unique index regardless of type
- Location: js/transpiler/transpiler/analyzer.js:528-530
Issue #5: Raw values not wrapped in Literal nodes
- >= and <= optimization passed raw numbers instead of AST nodes
- Fix: Wrap constValue±1 in {type: 'Literal', value: ...} objects
- Maintains AST consistency throughout pipeline
- Location: js/transpiler/transpiler/condition_generator.js:300,307
All 27 transpiler test suites pass with 0 failures.1 parent d0ded94 commit 50001fd
2 files changed
Lines changed: 5 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
534 | 531 | | |
535 | 532 | | |
536 | 533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
0 commit comments