Repository navigation
Keep the emitter inside the self-hosted subset - #801
Merged
Merged
Conversation
The compiler stopped compiling itself. Two recent emitter additions use forms the self-hosted subset refuses: - LlEmitter tracked immortal temps in a WeakMap field keyed by block builder. That field has no lowering, so LlEmitter itself was not lowered. The set now lives on BlockBuilder, which owns the temp names. - mentionsLocal probed IR nodes with `"localId" in node` and `"captures" in node`. It now narrows by node kind, covering every expression and statement kind that names a local or captures one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
The compiler can no longer compile itself on main: the bootstrap seed builds fail with
SC1090: constructing through a class value whose class has no loweringatnew LlEmitter(...). Two recent emitter additions use forms the self-hosted subset refuses:LlEmittertracked immortal temps in aWeakMap<BlockBuilder, Set<string>>field. That field has no lowering ("'unknown'-typed class fields"), soLlEmitteritself was never lowered. The set now lives onBlockBuilderasimmortalTemps, since the builder owns the temp names it holds.inchecks.mentionsLocalprobed IR nodes with"localId" in nodeand"captures" in node. It now narrows by node kind:varRef,incDec,assignExpr,closureandclassReffor expressions, andvarDecl,assign,forOfandrethrowfor statements. That is every expression and statement kind with alocalIdor acaptureslist, as listed by the type checker overIrExprandIrStmt.Validation: the Node-frontend compile of
src/native/cli.tsnow lowers fully and emits IR (it previously stopped atLlEmitter). The borrowed-receiver, virtual-borrow, string self-concat and literal-choice corpus programs pass in both differential lanes (52 programs, sanitized). The emitter, string-construction and class unit tests pass, and lint and format are clean. The bootstrap seed jobs in CI are the end-to-end check.Separately, the only diagnostic reported was the follow-on "class has no lowering" error, not the field's own diagnostic. That will be addressed separately.
🤖 Generated with Claude Code