Commit graph

7 commits

Author SHA1 Message Date
Takashi Kokubun
e4a824f769 Fix broken rebase 2023-03-05 22:11:20 -08:00
Takashi Kokubun
9f8f1afba2 Implement --mjit-stats 2023-03-05 22:11:20 -08:00
Takashi Kokubun
6fc336fedc Compile a real return value 2023-03-05 22:11:20 -08:00
Aaron Patterson
fc5482d088
Expose the address of MJIT Pointers (#7446)
This way we can manually dereference pointers with Fiddle
2023-03-05 13:00:34 -08:00
Aaron Patterson
06b62cbbdd Add offsetof so we can get the offset of members
I want to get the offset of fields inside structs, but I don't want to
instantiate the struct.  I need to embed the offsets inside machine
code, and I can't get the offsets without calling `new` on the struct.

This commit adds an `offset` method so you can get the offset of a
member without instantiating anything.  You can do:

```ruby
C.rb_control_frame_t.offsetof(:sp) #=> 8
```

I don't think this implementation is perfect, you can only get immediate
fields.  But it is better than nothing!
2023-01-20 14:11:05 -08:00
Takashi Kokubun
9dcee2d80e Remove MJIT's private constants from docs [ci skip] 2022-12-22 11:35:46 -08:00
Takashi Kokubun
bb4cbd0803
Put RubyVM::MJIT::Compiler under ruby_vm directory (#6989)
[Misc #19250]
2022-12-21 22:46:15 -08:00
Renamed from lib/mjit/c_pointer.rb (Browse further)