From 18f6978625fe8adc4fe6e414e73e97d52b566592 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 23 Jul 2015 09:34:31 +0000 Subject: * 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 --- compile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'compile.c') diff --git a/compile.c b/compile.c index f570a6de88..a0efd68d37 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 -- cgit v1.2.3