Skip to content

The program's position is a stand-in; a missing position does not print the element - #1447

Merged
Frotty merged 1 commit into
masterfrom
claude/model-position-no-render
Oct 13, 2026
Merged

Frotty merged 1 commit into
masterfrom
claude/model-position-no-render

Conversation

@Frotty

@Frotty Frotty commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Code the compiler generates, such as the replay of compile-time state, is traced to the program as a whole (the WurstModel). Its position was worked out from every compilation unit each time it was asked for, and StatementTranslation asks once per statement. In each Wurst file the empty list of Jass declarations has no position, so AttrPos.getParentSource rendered it into the stand-in file name ("<source of " + e + " not found>"). On a large map that was 95 % of "translate to jass" (about 6 s): 72 % rendering, the rest walking the program.

  • AttrPos.getPos(WurstModel): the program spans its files and has no position of its own, so it gets the stand-in directly. Before, it took the file of the first unit's stand-in and the smallest and largest offsets of all files, which mixed files anyway.
  • A stand-in names the kind of element (<source of JassToplevelDeclarations not found>) instead of printing it; WurstErrorWindow.isSyntheticSource still recognises it.
  • StatementTranslation asks for a statement's position once, not once per Jass statement it produced.

A large map (Jass, -inline -opt -localOptimizations), against master: build 44.8 to 41.4 s (median of 3 alternating), the Jass translation 1140 to 72 samples (JFR, 2 ms). 02_compiled.j.txt byte-identical. The compile-time runner gets the same stand-in where it asks for the program's error position (constantToExprHashtable).

PositionTests asserts both (they fail on master). Run locally: PositionTests, WurstErrorWindowTests, CompiletimeTests, CompiletimeHashtableTests, ModelManagerTests, BugTests, NewFeatureTests, DeterministicChecks, OptimizerTests, ClassesTests.

…nt the element

Code the compiler generates, such as the replay of compile-time state, is
traced to the program as a whole (the WurstModel). Its position was worked
out from every compilation unit each time it was asked for, and the Jass
translation asks once per statement. In each Wurst file the empty list of
Jass declarations has no position, so the fallback rendered it into the
stand-in file name. On SurvivalChaosReborn that was 95 % of
"translate to jass", about 6 s.

The program spans its files and has no position of its own, so it gets the
stand-in directly. A stand-in names the kind of element instead of printing
it. The statement translation asks for a statement's position once, not once
per Jass statement it produced.

SurvivalChaosReborn (Jass, -inline -opt -localOptimizations): build 44.8 to
41.4 s (median of 3 alternating), the Jass translation 1140 to 72 samples.
Output identical.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T06:18:20.534858Z 424e6a3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty
Frotty merged commit baed447 into master Oct 13, 2026
2 checks passed
@Frotty
Frotty deleted the claude/model-position-no-render branch October 13, 2026 06:42
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