summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 09:34:31 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-23 09:34:31 (GMT)
commit18f6978625fe8adc4fe6e414e73e97d52b566592 (patch)
treef3941e0d248e616a71d486a657de136e80df2a09 /compile.c
parentf965866f4f0a00c8179a1097e89fb4e61f71a92a (diff)
* vm_core.h: constify rb_iseq_constant_body::iseq_encoded and
rb_control_frame_t::pc. * compile.c (rb_iseq_translate_threaded_code): catch up this fix. * iseq.c: ditto. * vm_exec.c (vm_exec_core): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index f570a6d..a0efd68 100644
--- a/compile.c
+++ b/compile.c
@@ -578,11 +578,12 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
const void * const *table = rb_vm_get_insns_address_table();
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);
- iseq->body->iseq_encoded[i] = (VALUE)table[insn];
+ encoded[i] = (VALUE)table[insn];
i += len;
}
#endif