summaryrefslogtreecommitdiff
path: root/yjit/bindgen
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-07-11 10:09:39 -0400
committerPeter Zhu <peter@peterzhu.ca>2022-07-15 09:21:07 -0400
commit7424ea184f9d67c1c7f3ee97494ed3bd1aa60833 (patch)
tree822838e39d81cd2785c970cb45a86854823af6fe /yjit/bindgen
parent7fda741f6e67b809b08423f0d4e903c078da2eed (diff)
Implement Objects on VWA
This commit implements Objects on Variable Width Allocation. This allows Objects with more ivars to be embedded (i.e. contents directly follow the object header) which improves performance through better cache locality.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6117
Diffstat (limited to 'yjit/bindgen')
-rw-r--r--yjit/bindgen/src/main.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs
index 5d30d7b288..f54addc795 100644
--- a/yjit/bindgen/src/main.rs
+++ b/yjit/bindgen/src/main.rs
@@ -62,6 +62,9 @@ fn main() {
// Import YARV bytecode instruction constants
.allowlist_type("ruby_vminsn_type")
+ // From include/ruby/internal/config.h
+ .allowlist_var("USE_RVARGC")
+
// From include/ruby/internal/intern/string.h
.allowlist_function("rb_utf8_str_new")
.allowlist_function("rb_str_buf_append")
@@ -135,7 +138,8 @@ fn main() {
// From include/ruby/internal/core/robject.h
.allowlist_type("ruby_robject_flags")
- .allowlist_type("ruby_robject_consts")
+ // .allowlist_type("ruby_robject_consts") // Removed when USE_RVARGC
+ .allowlist_var("ROBJECT_OFFSET_.*")
// From include/ruby/internal/core/rarray.h
.allowlist_type("ruby_rarray_flags")