Repository navigation
The Open list's bug pass: the emitter's masked fold, a program's own return, the false errors - #62
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) − 1025came 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 everyset 0act of the scratch cell into a set of the constant — the&'s ownset 0 under ~maskamong them. The fold is not made when a masked write works the scratch cell. Eight shapes of it intests/emitter.test.ts.Taken:
returnat 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 droppeddisplayText(…, 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, aswitchon a known text,thisin an arrow of a method,first(…)?.order(…),u?.hp ?? 0,sleep(…).then(() => 7)as a value,new P(4).x,&&of conditions in aconst,rows[i].pop() ?? -1, a build-time throw inside atry);~,**/Math.powby 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(…):libraryNametook any symbol declared in the declarations file for the library's, a unit'sorder()method included, so the hoister treated the call as the library'sorder()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 run74 files / 1382 pass (+tests/ledger.test.tswith the new rows),tscclean. 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