{{ message }}
Repository navigation
fix!: use allocation-unit terminology for memory layouts - #1111
Merged
Merged
Conversation
Rename layout fields, compile options and planner helpers across the compiler, CLI, editor and runtime consumers. Document the migration and keep typed word widths separate from the fixed four-byte allocation grid. BREAKING CHANGE: Replace GLOBAL_ALIGNMENT_BOUNDARY with ALLOCATION_UNIT_BYTE_SIZE, startingMemoryWordAddress with startingMemoryAllocationUnitAddress, and wordAlignedAddress/wordAlignedSize/wordAlignedByteLength with allocationUnitAddress/allocationUnitCount/allocatedByteLength. Consumers must use the new names; no compatibility aliases are provided.
irimias57
approved these changes
Oct 19, 2026
irimias57
left a comment
Member
There was a problem hiding this comment.
Thank you, @jinchuntan — this is an exceptionally thorough implementation of the allocation-unit terminology change. The rename is consistent across the compiler and its consumers, the typed-word concepts remain correctly scoped, and the preserved snapshot semantics give strong confidence that the memory layout behavior is unchanged. This makes the compiler API much clearer and will prevent future confusion between allocation units and typed words. Excellent work!
This was referenced Oct 19, 2026
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.

Closes #712.
Renames the four-byte allocation grid and its layout fields to allocation-unit terminology, including the starting-memory option and planner helpers. All compiler, CLI, worker, editor and runtime callers use the new names. Typed element widths and memory-access-width APIs keep their existing names.
This is an intentional breaking API change, with no compatibility aliases. The migration mapping is in the compiler docs.
Validation on Node 24.16.0:
npx nx run-many --target=typecheck --all --parallel=1— all 37 projects passed.npx nx run-many --target=test --projects=@8f4e/cli,@8f4e/language-spec,@8f4e/memory-default-resolver,@8f4e/memory-planner,@8f4e/memory-reference-resolver,@8f4e/semantic-reference-resolver,@8f4e/semantic-utils,@8f4e/stack-analyzer,@8f4e/sub-program,@8f4e/wasm-codegen,@8f4e/compiler,@8f4e/compiler-worker,@8f4e/editor-state,@8f4e/web-ui,@8f4e/editor-core,@8f4e/runtime-audio-worklet --parallel=1 --update— 2,389 tests passed across 16 packages.