From 566d4abee5e8e59ce6e080f28a25b7c3431c5b3b Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Thu, 10 Sep 2020 14:31:45 -0400 Subject: Added shift instructions --- compile.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index 49263002e3..a1983eaecb 100644 --- a/compile.c +++ b/compile.c @@ -866,14 +866,20 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq) unsigned int i; VALUE *encoded = (VALUE *)iseq->body->iseq_encoded; - for (i = 0; i < iseq->body->iseq_size; /* */ ) { - int insn = (int)iseq->body->iseq_encoded[i]; - int len = insn_len(insn); - encoded[i] = (VALUE)table[insn]; + for (i = 0; i < iseq->body->iseq_size; /* */ ) + { + int insn = (int)iseq->body->iseq_encoded[i]; + int len = insn_len(insn); + encoded[i] = (VALUE)table[insn]; + + if (insn == BIN(pop)) + encoded[i] = (VALUE)native_pop_code; + + const char* name = insn_name(insn); + printf("%s\n", name); - if (insn == BIN(pop)) encoded[i] = (VALUE)native_pop_code; - i += len; + i += len; } FL_SET((VALUE)iseq, ISEQ_TRANSLATED); #endif -- cgit v1.2.3