summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorKazuki Tsujimoto <kazuki@callcc.net>2019-06-11 00:20:10 +0900
committerKazuki Tsujimoto <kazuki@callcc.net>2019-06-11 00:20:10 +0900
commitbe6b462489e42b6a8ee60ba96fc18fcc9794f819 (patch)
treed008fc3b7ee161b1c33d2c2da19f910d0acdf820 /compile.c
parentf0bfa71ab3ce5f6045a39e503f6decbc9b3a7d3d (diff)
Use checktype for performance
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/compile.c b/compile.c
index 202157131f..80dc5e729a 100644
--- a/compile.c
+++ b/compile.c
@@ -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) {