Skip to content

Conversation

@linxuanm
Copy link
Contributor

This PR cleans up all creations of V3Offsets scattered around the x86 code and moves them into Target to prevent excessive creation of V3Offsets (which causes a X86_64Stack creation in its fields).

Copy link
Owner

@titzer titzer left a comment

Choose a reason for hiding this comment

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

Nice, I like this refactoring. Some small tweaks.

var offsets = V3Offsets.new();
masm.emit_v3_WasmFunction_decl_r_r(scratch, regs.func_arg);
asm.q.sub_m_i(G(scratch).plus(offsets.FuncDecl_tierup_trigger), FastIntTuning.entryTierUpDecrement);
asm.q.sub_m_i(G(scratch).plus(masm.getOffsets().FuncDecl_tierup_trigger), FastIntTuning.entryTierUpDecrement);
Copy link
Owner

Choose a reason for hiding this comment

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

There is still an offsets field, correct? I think we should make the SPC uniformly use its own offsets field then.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There isn't an offsets field in SPC anymore as I intended for the MacroAssembler to store/cache it. Should I also cache it in SPC?

@titzer titzer merged commit 5658d55 into titzer:master Jan 21, 2026
10 checks passed
@linxuanm linxuanm deleted the v3offset-refactor branch January 21, 2026 18:43
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.

2 participants