compile.c: restore catch entry sp
* compile.c (iseq_build_from_ary_exception): restore stack depth of catch entries. accurate stack depths cannot be calculated from dumped array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4de496034d
commit
c4770f1a10
@ -6597,7 +6597,14 @@ iseq_build_from_ary_exception(rb_iseq_t *iseq, struct st_table *labels_table,
|
|||||||
lcont = register_label(iseq, labels_table, ptr[4]);
|
lcont = register_label(iseq, labels_table, ptr[4]);
|
||||||
sp = NUM2UINT(ptr[5]);
|
sp = NUM2UINT(ptr[5]);
|
||||||
|
|
||||||
(void)sp;
|
/* TODO: Dirty Hack! Fix me */
|
||||||
|
if (type == CATCH_TYPE_RESCUE ||
|
||||||
|
type == CATCH_TYPE_BREAK ||
|
||||||
|
type == CATCH_TYPE_NEXT) {
|
||||||
|
++sp;
|
||||||
|
}
|
||||||
|
|
||||||
|
lcont->sp = sp;
|
||||||
|
|
||||||
ADD_CATCH_ENTRY(type, lstart, lend, eiseq, lcont);
|
ADD_CATCH_ENTRY(type, lstart, lend, eiseq, lcont);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user