Repository navigation
refactor(#1997): 2.2 Plan decides every toolchain requirement key - #2012
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Render reported five keys itself (mode baseline, the two C++ initializer forms, debug overflow helpers, LDREX/STREX atomics), against README §1's Ownership table, which gives toolchain requirements to 2.2. Render now reports only the form it emitted (emittedDesignatedInitializer, emittedCompoundLiteral, an ldrex-strex-loop site); EmissionPlan decides each key into formRequirements, and getToolchainRequirements reads the plan alone. ToolchainRequirements.record, collect and the recorded map are deleted. Co-Authored-By: Joshua Austill <jlaustill@gmail.com>
Prettier moved ToolchainRequirements.deferred from line 50 to 49 after the holder list was measured; the code it points at is unchanged. Co-Authored-By: Joshua Austill <jlaustill@gmail.com>
|
This branch has not been 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.



Summary
Render recorded five toolchain requirement keys itself, while README §1's Ownership table gives toolchain requirements to 2.2 Plan. Render now reports only which form it emitted.
EmissionPlandecides every key, and the banner and the per-file result read the plan alone. Option (a) on #1997.Changes
EmissionPlan.ts,IEmissionPlan.ts,IEmissionFacts.ts: the newdecideFormRequirementsfillsplan.formRequirements. It decides:cppModecpp-designated-initializerandcpp-compound-literal, in C++ mode onlyatomic-ldrex-cmsis, attributed to its sitesoverflow-panic-hosted-libc, fromdebugModeand the clamp helpers. These are the same two factsgenerateOverflowHelpersreads to emit the panic helpers.EmissionPlan.requirements(plan)returns these keys plus the planned blocks' keys.CodeGenWalker.ts,HelperGenerator.ts,AtomicGenerator.ts,TGeneratorEffect.ts,CodeGenerator.ts,TranspileState.ts:ToolchainRequirements.recordcalls are gone.emittedDesignatedInitializer/emittedCompoundLiteral. They set them in both modes, since the mode is the plan's question.requireseffect is replaced by{ type: "ldrex-strex-loop" }, which notes only its site.getToolchainRequirements()returnsEmissionPlan.requirements(this.state.emissionPlan()).ToolchainRequirements.ts:record,collectand therecordedmap are deleted, so only the per-request sites remain. The holder list inpasses-hold-no-mutable-state.test.tsdrops from four entries to three.instrumentation/bullet and the ledger paragraph, plus the comments inTranspiler.tsandRequirementSitesthat described Render's records.Testing
EmissionPlan.test.tspin each key, and each has a control (the same form costs nothing in C, and the panic key needs debug mode).ToolchainRequirements.test.tsloses therecord/collectcases.tests/issue-502,tests/atomic,tests/issue-522andtests/bit-indexing. CI runs the full suite.cpp-compound-literal:tests/issue-502had 2 failures, andtests/bit-indexingstayed green.atomic-ldrex-cmsisbranch unreachable:tests/atomichad 8 failures, andtests/issue-502stayed green.debugMode: the unit test failed.Related Issues
Closes #1997. Part of #1313.