Repository navigation
The program's position is a stand-in; a missing position does not print the element - #1447
Merged
Merged
Conversation
…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.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
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, andStatementTranslationasks once per statement. In each Wurst file the empty list of Jass declarations has no position, soAttrPos.getParentSourcerendered 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.<source of JassToplevelDeclarations not found>) instead of printing it;WurstErrorWindow.isSyntheticSourcestill recognises it.StatementTranslationasks 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.txtbyte-identical. The compile-time runner gets the same stand-in where it asks for the program's error position (constantToExprHashtable).PositionTestsasserts both (they fail on master). Run locally: PositionTests, WurstErrorWindowTests, CompiletimeTests, CompiletimeHashtableTests, ModelManagerTests, BugTests, NewFeatureTests, DeterministicChecks, OptimizerTests, ClassesTests.