aboutsummaryrefslogtreecommitdiffstats
path: root/yjit/src/cruby_bindings.inc.rs
diff options
context:
space:
mode:
authorJean Boussier <byroot@ruby-lang.org>2023-11-07 18:09:55 +0100
committerJean Boussier <jean.boussier@gmail.com>2023-11-08 11:02:55 +0100
commitd898e8d6f89fba34a9ee5c0e139f38ac807059e6 (patch)
treebf9d79ff3b3502565b5b718427f192bcd472dc64 /yjit/src/cruby_bindings.inc.rs
parent4abf6cde583f3ebe562bd9d62e0126b2cbf4dfac (diff)
downloadruby-d898e8d6f89fba34a9ee5c0e139f38ac807059e6.tar.gz
Refactor rb_shape_transition_shape_capa out
Right now the `rb_shape_get_next` shape caller need to first check if there is capacity left, and if not call `rb_shape_transition_shape_capa` before it can call `rb_shape_get_next`. And on each of these it needs to checks if we got a TOO_COMPLEX back. All this logic is duplicated in the interpreter, YJIT and RJIT. Instead we can have `rb_shape_get_next` do the capacity transition when needed. The caller can compare the old and new shapes capacity to know if resizing is needed. It also can check for TOO_COMPLEX only once.
Diffstat (limited to 'yjit/src/cruby_bindings.inc.rs')
-rw-r--r--yjit/src/cruby_bindings.inc.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/yjit/src/cruby_bindings.inc.rs b/yjit/src/cruby_bindings.inc.rs
index 83024e0b7e..431314ff86 100644
--- a/yjit/src/cruby_bindings.inc.rs
+++ b/yjit/src/cruby_bindings.inc.rs
@@ -978,7 +978,6 @@ extern "C" {
pub fn rb_shape_get_shape_id(obj: VALUE) -> shape_id_t;
pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool;
pub fn rb_shape_obj_too_complex(obj: VALUE) -> bool;
- pub fn rb_shape_transition_shape_capa(shape: *mut rb_shape_t) -> *mut rb_shape_t;
pub fn rb_shape_get_next(shape: *mut rb_shape_t, obj: VALUE, id: ID) -> *mut rb_shape_t;
pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t;
pub fn rb_gvar_get(arg1: ID) -> VALUE;