diff options
author | Kazuki Tsujimoto <kazuki@callcc.net> | 2019-06-11 00:20:10 +0900 |
---|---|---|
committer | Kazuki Tsujimoto <kazuki@callcc.net> | 2019-06-11 00:20:10 +0900 |
commit | be6b462489e42b6a8ee60ba96fc18fcc9794f819 (patch) | |
tree | d008fc3b7ee161b1c33d2c2da19f910d0acdf820 /compile.c | |
parent | f0bfa71ab3ce5f6045a39e503f6decbc9b3a7d3d (diff) |
Use checktype for performance
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -5332,8 +5332,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c ADD_SEND(ret, line, rb_intern("deconstruct"), INT2FIX(0)); ADD_INSN(ret, line, dup); - ADD_INSN1(ret, line, putobject, rb_cArray); - ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE)); + ADD_INSN1(ret, line, checktype, INT2FIX(T_ARRAY)); ADD_INSNL(ret, line, branchunless, type_error); ADD_INSN(ret, line, dup); @@ -5506,8 +5505,7 @@ iseq_compile_pattern_each(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *c ADD_SEND(ret, line, rb_intern("deconstruct_keys"), INT2FIX(1)); ADD_INSN(ret, line, dup); - ADD_INSN1(ret, line, putobject, rb_cHash); - ADD_INSN1(ret, line, checkmatch, INT2FIX(VM_CHECKMATCH_TYPE_CASE)); + ADD_INSN1(ret, line, checktype, INT2FIX(T_HASH)); ADD_INSNL(ret, line, branchunless, type_error); if (node->nd_pkwrestarg) { |