[svn:parrot] r44707 - branches/ops_pct/compilers/opsc/src/Ops/Compiler

cotto at svn.parrot.org cotto at svn.parrot.org
Sat Mar 6 18:41:19 UTC 2010


Author: cotto
Date: Sat Mar  6 18:41:17 2010
New Revision: 44707
URL: https://trac.parrot.org/parrot/changeset/44707

Log:
[opsc] set jump flag for ops with goto/restart OFFSET

Modified:
   branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm

Modified: branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm
==============================================================================
--- branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm	Sat Mar  6 18:26:44 2010	(r44706)
+++ branches/ops_pct/compilers/opsc/src/Ops/Compiler/Actions.pm	Sat Mar  6 18:41:17 2010	(r44707)
@@ -253,6 +253,10 @@
     # with labels, etc.).
     #
 
+    if ($body ~~ / [ goto | restart ] \s+ OFFSET / ) {
+        $op<flags> := 'PARROT_JUMP_RELATIVE';
+    }
+
     #'goto ADDRESS((foo))' -> '{{=foo}}'
     $body := subst($body,
                 /goto \s+ ADDRESS '((' $<addr>=[.*?] '))'/,


More information about the parrot-commits mailing list