Skip to content

LowLevelRegisters tuple order and drop unused register helpers - #21605

Open
NullVoxPopuli wants to merge 2 commits into
emberjs:mainfrom
NullVoxPopuli:nvp/cleanup/low-level-registers
Open

NullVoxPopuli wants to merge 2 commits into
emberjs:mainfrom
NullVoxPopuli:nvp/cleanup/low-level-registers

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

afaik, this is mostly cleanup

Split out of nvp/simplify-some-vm-hot-paths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@NullVoxPopuli NullVoxPopuli changed the title Fix LowLevelRegisters tuple order and drop unused register helpers LowLevelRegisters tuple order and drop unused register helpers Sep 9, 2026
@NullVoxPopuli

This comment was marked as off-topic.

Comment thread packages/@glimmer/runtime/lib/vm/low-level.ts Outdated
export function initializeRegistersWithPC(pc: number): LowLevelRegisters {
return [pc, -1, 0, 0];
}
export type LowLevelRegisters = [$pc: number, $ra: number, $fp: number, $sp: number];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

labels on an array type don't materr all that much, but they didn't originally agree with the index-order in lib/vm/stack (even though the original type matched what the removed (unused) helpers were doin'

the source of truth for what these labeled indicies are: vm/lib/register.ts (also imported in lib/vm/stack)

pc = 0
ra = 1
fp = 2
sp = 3

(so the code on the left was always wrong) 🙈

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant