Skip to content

Builtin RubyVM::MJIT::C #6418

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

Merged
merged 14 commits into from
Sep 22, 2022
Merged

Builtin RubyVM::MJIT::C #6418

merged 14 commits into from
Sep 22, 2022

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Sep 22, 2022

This PR introduces mjit_c.rb that replaces both lib/mjit/c_32.rb and lib/mjit/c_64.rb because:

  • Generating lib/mjit/c_*.rb for the other bit width is often either cumbersome or impossible.
  • Using C code to figure out things on build time is more portable than generating values with libclang beforehand.

Generally, values generated by libclang have been replaced by Primitive.cexpr! that calculates the same thing except for offsetof of bit fields. There's no portable way to let C code figure it out, so I just assumed what libclang gives is correct when they are the leading bit fields, and gave up non-leading bit fields.

@k0kubun k0kubun merged commit 0c9dc01 into ruby:master Sep 22, 2022
@k0kubun k0kubun deleted the builtin-mjit-c branch September 22, 2022 21:44
@k0kubun k0kubun mentioned this pull request Sep 22, 2022
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