Skip to content

The Open list's bug pass: the emitter's masked fold, a program's own return, the false errors - #62

Merged
jeany55 merged 1 commit into
trigscript-4from
open-bugs
Oct 23, 2026
Merged

jeany55 merged 1 commit into
trigscript-4from
open-bugs

Conversation

@jeany55

@jeany55 jeany55 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Between step 15 and step 16 of the way off eudplib: the Open list's bugs, as the plan's new section "The Open list's bug pass (2026-10-23)" has them.

The emitter's fold. (v & 0xffff) − 1025 came out as v's low half under −1025's high half. The lone-place fold puts a scratch cell straight into the one dword that takes it, and when that dword starts from a constant it turned every set 0 act of the scratch cell into a set of the constant — the &'s own set 0 under ~mask among them. The fold is not made when a masked write works the scratch cell. Eight shapes of it in tests/emitter.test.ts.

Taken: return at the top of a program (front end, emitter's END, the Python side's top coroutine end); memory()/setMemory() of the deaths table's dwords 12–26 named as the deaths of player e mod 12 of unit e div 12 in the front end, so no build reads a player group; disabled() in a program refused, preserve() and a dropped displayText(…, false) said as remarks; build warnings (editor notice + log line) for hyper triggers left out and triggers in no list; the false errors (n++ as an index — and the index before the value —, a comparison as a boolean argument, a switch on a known text, this in an arrow of a method, first(…)?.order(…), u?.hp ?? 0, sleep(…).then(() => 7) as a value, new P(4).x, && of conditions in a const, rows[i].pop() ?? -1, a build-time throw inside a try); ~, **/Math.pow by a known power, Math.sign, Math.log2, fill(v, start, end); first()/randomUnit() of a set of units; the cutscene header example compiles as written (a test reads it).

Root cause of first(…)?.order(…): libraryName took any symbol declared in the declarations file for the library's, a unit's order() method included, so the hoister treated the call as the library's order() action and never registered its object. A member of one of the library's interfaces is no longer a library name (members of its objects — on.died, local.selected — still are).

Decisions recorded (the user, 2026-10-23): no map protection on the own build; Magenta's rows go on our backend after step 17 (until then a map with Magenta's member builds through eudplib).

Ledger: 13 new rows, all takes — steps 0 (+2), 1 (+3), 3 (+1), 4 (+2), 5 (+1), 6 (+1), 9 (+1), 10 (+1), 11 (+2). No row flips.

Tests: npx vitest run 74 files / 1382 pass (+ tests/ledger.test.ts with the new rows), tsc clean. Not played in Remastered: nothing here changes a played probe's layout except the masked-fold case, which the walker covers.

🤖 Generated with Claude Code

https://claude.ai/code/session_01En4SHqafb1QFJ4xgbUkAe5

…return, and the false errors

Between step 15 and step 16 of the way off eudplib, the Open list's bugs (docs/v4-plan.md,
"The Open list's bug pass (2026-10-23)"):

- The emitter folded a scratch cell worked by a masked write (`&`, `|`, `^` by a constant)
  into a dword that starts from a constant, turning the mask's `set 0` into a set of the
  constant: `(v & 0xffff) - 1025` came out as v's low half under -1025's high half. The
  fold is not made for a masked scratch cell.
- `return` at the top of a program ends it (front end, emitter, Python side).
- memory() and setMemory() of the deaths table's dwords 12 to 26 name the cell as the
  deaths of player e mod 12 of unit e div 12, so no build reads a player group.
- disabled() in a program is refused, preserve() and a dropped `false` of displayText are
  remarks; the build warns of hyper triggers left out and of triggers in no list.
- False errors taken: n++ as an index (and the index before the value), a comparison as a
  boolean argument, a switch on a known text, this in an arrow of a method, a pick's method
  through ?. (libraryName no longer takes an interface member for the library's), u?.hp ?? 0,
  sleep().then() as a value, new P(4).x, && of conditions in a const, rows[i].pop() ?? -1, a
  build-time throw inside a try.
- Against JavaScript: ~, ** and Math.pow by a known power, Math.sign, Math.log2,
  fill(v, start, end). first() and randomUnit() take a set of units.
- The cutscene module's header example compiles as written, and a test reads it.

Thirteen ledger scripts, tests/open-list.test.ts, the README's language passages, and the
plan: the Open list, the section, and two decisions (no map protection on the own build;
Magenta's rows on our backend after step 17).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01En4SHqafb1QFJ4xgbUkAe5
@jeany55
jeany55 merged commit 9f3662e into trigscript-4 Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant