зеркало из https://github.com/github/ruby.git
iseq.c: dump as non-trace instructions
* iseq.c (iseq_data_to_ary): when OPT_CALL_THREADED_CODE is used, iseq_encoded is overwritten by instructions with trace and the original_iseq is not stored. convert these instructions to the original instructions as external representation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9869ec7a7d
Коммит
2f67833473
6
iseq.c
6
iseq.c
|
@ -2220,7 +2220,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
|
|||
VALUE exception = rb_ary_new(); /* [[....]] */
|
||||
VALUE misc = rb_hash_new();
|
||||
|
||||
static VALUE insn_syms[VM_INSTRUCTION_SIZE];
|
||||
static VALUE insn_syms[VM_INSTRUCTION_SIZE/2]; /* w/o-trace only */
|
||||
struct st_table *labels_table = st_init_numtable();
|
||||
|
||||
DECL_SYMBOL(top);
|
||||
|
@ -2235,7 +2235,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
|
|||
|
||||
if (sym_top == 0) {
|
||||
int i;
|
||||
for (i=0; i<VM_INSTRUCTION_SIZE; i++) {
|
||||
for (i=0; i<numberof(insn_syms); i++) {
|
||||
insn_syms[i] = ID2SYM(rb_intern(insn_name(i)));
|
||||
}
|
||||
INIT_SYMBOL(top);
|
||||
|
@ -2331,7 +2331,7 @@ iseq_data_to_ary(const rb_iseq_t *iseq)
|
|||
VALUE *nseq = seq + len - 1;
|
||||
VALUE ary = rb_ary_new2(len);
|
||||
|
||||
rb_ary_push(ary, insn_syms[insn]);
|
||||
rb_ary_push(ary, insn_syms[insn%numberof(insn_syms)]);
|
||||
for (j=0; j<len-1; j++, seq++) {
|
||||
switch (insn_op_type(insn, j)) {
|
||||
case TS_OFFSET: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче