mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
iseq.c: local variable names
* iseq.c (rb_insn_operand_intern): simplified the condition for local variable names, assume TS_LINDEX and TS_NUM combinations are only for local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e3f46b1dc5
commit
2a723132e9
1 changed files with 2 additions and 8 deletions
10
iseq.c
10
iseq.c
|
@ -1433,14 +1433,8 @@ rb_insn_operand_intern(const rb_iseq_t *iseq,
|
|||
|
||||
case TS_LINDEX:{
|
||||
int level;
|
||||
if (insn == BIN(getlocal) || insn == BIN(setlocal) ||
|
||||
insn == BIN(getblockparam) || insn == BIN(setblockparam)) {
|
||||
if (pnop) {
|
||||
ret = local_var_name(iseq, *pnop, op);
|
||||
}
|
||||
else {
|
||||
ret = rb_sprintf("%"PRIuVALUE, op);
|
||||
}
|
||||
if (types[op_no+1] == TS_NUM && pnop) {
|
||||
ret = local_var_name(iseq, *pnop, op);
|
||||
}
|
||||
else if ((level = rb_insn_unified_local_var_level(insn)) >= 0) {
|
||||
ret = local_var_name(iseq, (VALUE)level, op);
|
||||
|
|
Loading…
Reference in a new issue