diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2021-03-16 15:30:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-03-17 10:55:37 -0700 |
commit | 8359821870d756eb75d66c5ddb5d119f6247c35d (patch) | |
tree | da96d7248f3725aadd08eed812d5460f4d6a260d /insns.def | |
parent | ea817c60fcbdc2c4496be045f5bf028b702561ba (diff) |
Use rb_fstring for "defined" strings.
We can take advantage of fstrings to de-duplicate the defined strings.
This means we don't need to keep the list of defined strings on the VM
(or register them as mark objects)
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4279
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -662,14 +662,14 @@ adjuststack /* defined? */ DEFINE_INSN defined -(rb_num_t op_type, VALUE obj, VALUE needstr) +(rb_num_t op_type, VALUE obj, VALUE pushval) (VALUE v) (VALUE val) // attr bool leaf = leafness_of_defined(op_type); { val = Qnil; if (vm_defined(ec, GET_CFP(), op_type, obj, v)) { - val = needstr; + val = pushval; } } |