1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insn

to clear what address.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2014-09-10 08:53:56 +00:00
parent c544c98570
commit 6f7eda7b30
2 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,8 @@
Wed Sep 10 17:52:25 2014 Koichi Sasada <ko1@atdot.net>
* compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insn
to clear what address.
Wed Sep 10 16:22:26 2014 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_gc.rb: fix condition.

View file

@ -581,16 +581,17 @@ rb_iseq_translate_threaded_code(rb_iseq_t *iseq)
#if OPT_DIRECT_THREADED_CODE || OPT_CALL_THREADED_CODE
static int
rb_vm_addr2insn(const void *addr) /* cold path */
rb_vm_insn_addr2insn(const void *addr) /* cold path */
{
int insn;
const void * const *table = rb_vm_get_insns_address_table();
for (insn = 0; insn < VM_INSTRUCTION_SIZE; insn++) {
if (table[insn] == addr)
if (table[insn] == addr) {
return insn;
}
}
rb_bug("rb_vm_addr2insn: invalid insn address: %p", addr);
rb_bug("rb_vm_insn_addr2insn: invalid insn address: %p", addr);
}
#endif
@ -609,7 +610,7 @@ rb_iseq_original_iseq(rb_iseq_t *iseq) /* cold path */
for (i = 0; i < iseq->iseq_size; /* */ ) {
const void *addr = (const void *)iseq->iseq[i];
int insn = rb_vm_addr2insn(addr);
const int insn = rb_vm_insn_addr2insn(addr);
iseq->iseq[i] = insn;
i += insn_len(insn);