# HG changeset patch # User Takahiro SHIMIZU # Date 1542099268 -32400 # Node ID 0853778b49ee9e972b88eead71b9e3cbdab5352c # Parent a5f4b3f1c5d16606e5a96bfd85a42f8de9cc756d fix insert cbc_next(i) for throw code sgemtns diff -r a5f4b3f1c5d1 -r 0853778b49ee cbctools/change_OP_to_cbc.pl --- a/cbctools/change_OP_to_cbc.pl Tue Nov 13 17:44:43 2018 +0900 +++ b/cbctools/change_OP_to_cbc.pl Tue Nov 13 17:54:28 2018 +0900 @@ -79,6 +79,7 @@ # 例外だったらかえってこないはずなのでgoto if ( $cbc_lines[$i] =~ /MVM_exception_throw_adhoc/ && $cbc_lines[$i+1] =~ /OP\(/){ push @rewritec, change_i($cbc_lines[$i]); + insert_cbc_next(); insert_right_blanket(); next; } @@ -111,11 +112,16 @@ $str =~ s/cur_op/i->cur_op/g; $str =~ s/tc/i->tc/g; $str =~ s/cur_callsite/i->cur_callsite/g; - $str =~ s/NEXT;/NEXT(i);/; + $str =~ s/NEXT;/cbc_next(i);/; $str =~ s/ / /g; return $str; } +sub insert_cbc_next{ + #push @rewritec,"$indent}\n"; + push @rewritec," goto cbc_next(i);\n"; +} + sub insert_right_blanket { #push @rewritec,"$indent}\n"; push @rewritec,"}\n";