diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-24 18:08:52 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-10-25 12:24:22 +0900 |
commit | 356e203a3acd4d3d20ba12f956fd22e17b6363e9 (patch) | |
tree | 78b4eccc00668da18debcb3e818146add31da10a /internal.h | |
parent | a7ec88ad61eba8cda3f99805e6077cb515c0ad08 (diff) |
more on struct rb_call_data
Replacing adjacent struct rb_call_info and struct rb_call_cache
into a struct rb_call_data.
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/internal.h b/internal.h index 6d63bcf18d..53091e25f8 100644 --- a/internal.h +++ b/internal.h @@ -2356,7 +2356,7 @@ struct rb_method_definition_struct; struct rb_execution_context_struct; struct rb_control_frame_struct; struct rb_calling_info; -struct rb_call_info; +struct rb_call_data; struct rb_call_cache { /* inline cache: keys */ rb_serial_t method_state; @@ -2369,8 +2369,7 @@ struct rb_call_cache { VALUE (*call)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, - const struct rb_call_info *ci, - struct rb_call_cache *cc); + struct rb_call_data *cd); union { unsigned int index; /* used by ivar */ @@ -2378,19 +2377,23 @@ struct rb_call_cache { int inc_sp; /* used by cfunc */ } aux; }; -struct rb_call_cache_and_mid { - struct rb_call_cache cc; +struct rb_call_info { + /* fixed at compile time */ ID mid; + unsigned int flag; + int orig_argc; +}; +struct rb_call_data { + struct rb_call_cache cc; + struct rb_call_info ci; }; -VALUE rb_funcallv_with_cc(struct rb_call_cache_and_mid*, VALUE, ID, int, const VALUE*) +VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*) #if GCC_VERSION_SINCE(3, 3, 0) && defined(__OPTIMIZE__) __attribute__((__visibility__("default"), __nonnull__(1))) # define rb_funcallv(recv, mid, argc, argv) \ __extension__({ \ - static struct rb_call_cache_and_mid \ - rb_funcallv_opaque_cc = { {0, }, 0, }; \ - rb_funcallv_with_cc(&rb_funcallv_opaque_cc, \ - recv, mid, argc,argv); \ + static struct rb_call_data rb_funcallv_data = { { 0, }, { 0, }, }; \ + rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); \ }) #endif ; |