diff options
author | Noah Gibbs <[email protected]> | 2022-05-11 16:20:21 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2022-05-11 11:20:21 -0400 |
commit | e88ada469976e1dad653748bd2c0bedca9e30981 (patch) | |
tree | aab2347018b139a0f48fc99390f43df7f72e61e5 /yjit/bindgen/src | |
parent | c00feffb46ac646605adc277b5454e6b067e2d8a (diff) |
Ruby shovel operator (<<) speedup. (#5896)
For string concat, see if compile-time encoding of strings matches.
If so, use simple buffer string concat at runtime. Otherwise, use
encoding-checking string concat.
Notes
Notes:
Merged-By: maximecb <[email protected]>
Diffstat (limited to 'yjit/bindgen/src')
-rw-r--r-- | yjit/bindgen/src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yjit/bindgen/src/main.rs b/yjit/bindgen/src/main.rs index 0264751a6f..33f81366c2 100644 --- a/yjit/bindgen/src/main.rs +++ b/yjit/bindgen/src/main.rs @@ -33,6 +33,7 @@ fn main() { let bindings = bindgen::builder() .clang_args(filtered_clang_args) + .header("encindex.h") .header("internal.h") .header("internal/re.h") .header("include/ruby/ruby.h") @@ -57,6 +58,7 @@ fn main() { // From include/ruby/internal/intern/string.h .allowlist_function("rb_utf8_str_new") + .allowlist_function("rb_str_append") // This struct is public to Ruby C extensions // From include/ruby/internal/core/rbasic.h @@ -69,6 +71,9 @@ fn main() { // From ruby/internal/intern/object.h .allowlist_function("rb_obj_is_kind_of") + // From ruby/internal/encoding/encoding.h + .allowlist_type("ruby_encoding_consts") + // From include/hash.h .allowlist_function("rb_hash_new") @@ -228,6 +233,8 @@ fn main() { .allowlist_function("rb_yjit_dump_iseq_loc") .allowlist_function("rb_yjit_for_each_iseq") .allowlist_function("rb_yjit_obj_written") + .allowlist_function("rb_yjit_str_simple_append") + .allowlist_function("rb_ENCODING_GET") // from vm_sync.h .allowlist_function("rb_vm_barrier") |