Repository navigation
comptime arena - #2509
Merged
Merged
comptime arena#2509
Conversation
… typed on demand (#2220 ceremony fix) The const fold can reach a plain function before Sema's body pass, so `var v = List.new()` had no element type at the evaluator's wall and the user was told to annotate the binding: ceremony for a fact the compiler already knows (D93: the type comes from the uses). The evaluator now asks Sema to type the innermost called body on demand at that wall, once, and re-reads the node's type; the in-order body pass skips a body typed this way. Typing is lazy, at the wall only: typing every called body on entry changed the evaluator's paths and multiplied its memory.
Contributor
Author
|
Battery GREEN on the stack's top commit 0d3af5f (comptime-arena worktree, driven by seed nightly-20261020-local-3-763d0e54c82a): gate, uat and battery-checks all green, wall 529 s. |
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.
#2220 ceremony fix (D104, Eric's ruling: the ceremony fix first, then the addressed arena).
The const fold can reach a plain function before Sema's body pass, so
var v = List.new()had no element type at the evaluator's wall and the user was told to annotate the binding: ceremony for a fact the compiler already knows (D93). The evaluator now asks Sema to type the innermost called body on demand at that wall, once, and re-reads the node's type; the in-order body pass skips a body typed this way. Typing is lazy, at the wall only: typing every called body on entry changed the evaluator's paths and multiplied its memory (215 MB vs 37 MB on the #1944 fixture).Fixture:
test/behavior/behav_2220_comptime_unannotated_list.w(List and HashMap built in called bodies, no annotations; fails on the installed compiler with the old diagnostic).Gate green (240 s). Battery: one battery for stack #2510 on this commit.