diff options
author | Peter Zhu <[email protected]> | 2024-02-20 15:58:10 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-02-21 11:33:05 -0500 |
commit | 330830dd1a44b6e497250a14d93efae6fa363f82 () | |
tree | 864fc9a6ba29c91fcbeb0c9c439e99b7d7fb0a04 /vm_method.c | |
parent | 2e6f8554f8c4ec12f620f31d4a110066ee76bfbe (diff) |
Add IMEMO_NEW
Rather than exposing that an imemo has a flag and four fields, this changes the implementation to only expose one field (the klass) and fills the rest with 0. The type will have to fill in the values themselves.
-rw-r--r-- | vm_method.c | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -409,13 +409,11 @@ rb_vm_ci_lookup(ID mid, unsigned int flag, unsigned int argc, const struct rb_ca if (kwarg) { ((struct rb_callinfo_kwarg *)kwarg)->references++; } - const struct rb_callinfo *new_ci = (const struct rb_callinfo *) - rb_imemo_new( - imemo_callinfo, - (VALUE)mid, - (VALUE)flag, - (VALUE)argc, - (VALUE)kwarg); RB_VM_LOCK_ENTER(); { @@ -764,7 +762,11 @@ static rb_method_entry_t * rb_method_entry_alloc(ID called_id, VALUE owner, VALUE defined_class, rb_method_definition_t *def, bool complement) { if (def) method_definition_addref(def, complement); - rb_method_entry_t *me = (rb_method_entry_t *)rb_imemo_new(imemo_ment, (VALUE)def, (VALUE)called_id, owner, defined_class); return me; } |