Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename and move RB_GC_SAVE_MACHINE_CONTEXT #7465

Merged
merged 3 commits into from Mar 15, 2023

Conversation

eightbitraptor
Copy link
Contributor

@eightbitraptor eightbitraptor commented Mar 7, 2023

This macro was originally a wrapper around rb_gc_save_machine_context, a function in thread.c, but that function doesn't exist anymore and now this macro doesn't do anything GC specific.

Because it's now being used from the context of the VM, or a thread. I've renamed it to RB_VM_SAVE_MACHINE_CONTEXT and moved it into thread.h.

@ko1
Copy link
Contributor

ko1 commented Mar 8, 2023

VM -> THREAD makes more sense for me because it takes a rb_thread_t.

now this macro doesn't do anything GC specific

BTW it saves registers for the GC marking, so I think it is GC specify code (this comment is not against the proposal).

@eightbitraptor eightbitraptor merged commit 4ae9c34 into ruby:master Mar 15, 2023
@eightbitraptor eightbitraptor deleted the mvh-mv-save-machine-context branch March 15, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants