summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c18
1 files changed, 12 insertions, 6 deletions
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