Navigation Menu

Skip to content

Commit

Permalink
[lib] Fixed the CONTEXT(interp)->current_pc setting code from r32804;…
Browse files Browse the repository at this point in the history
… the goto

code has to be a single expression, otherwise testC and similar cores will
hang.

git-svn-id: https://svn.parrot.org/parrot/trunk@32826 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
chromatic committed Nov 18, 2008
1 parent e6c82f8 commit 6d00fe3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Parrot/OpTrans/CGP.pm
Expand Up @@ -106,8 +106,9 @@ relevant C code.
sub goto_offset {
my ( $self, $offset ) = @_;

return "CONTEXT(interp)->current_pc = CUR_OPCODE + $offset;\n"
. "goto **(void **)(cur_opcode += $offset)";
# this must be a single expression, in case it's in a single-statement if
return "do {\nCONTEXT(interp)->current_pc = CUR_OPCODE + $offset;\n"
. "goto **(void **)(cur_opcode += $offset);\n} while (1)";
}

=item C<goto_pop()>
Expand Down

0 comments on commit 6d00fe3

Please sign in to comment.