diff options
author | Alan Wu <[email protected]> | 2020-09-03 12:06:53 -0400 |
---|---|---|
committer | Alan Wu <[email protected]> | 2021-10-20 18:19:22 -0400 |
commit | 16c5ce863c06dd3ae5562f4ed86fb40ced670c69 (patch) | |
tree | a5153dbef5775eab4a7d28ca05fda694bdfac2ff /compile.c | |
parent | cec197696f3edcff553373e9597130fde2d1f7be (diff) |
Yeah, this actually works!
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -856,6 +856,8 @@ rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node) return iseq_setup(iseq, ret); } +extern uint8_t *native_pop_code; // TODO global hack + static int rb_iseq_translate_threaded_code(rb_iseq_t *iseq) { @@ -868,6 +870,9 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq) 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; + i += len; } FL_SET((VALUE)iseq, ISEQ_TRANSLATED); |