diff options
author | Maxime Chevalier-Boisvert <[email protected]> | 2020-09-10 14:31:45 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:23 -0400 |
commit | 566d4abee5e8e59ce6e080f28a25b7c3431c5b3b (patch) | |
tree | d18e08e5d103fb5e7194b4e241218d6c7c2163fa /compile.c | |
parent | fe1cd076da74be8077509fab5a401060ce1c17a4 (diff) |
Added shift instructions
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -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 |