[svn:parrot] r44579 - in trunk: lib/Parrot src/ops
cotto at svn.parrot.org
cotto at svn.parrot.org
Tue Mar 2 04:44:55 UTC 2010
Author: cotto
Date: Tue Mar 2 04:44:54 2010
New Revision: 44579
URL: https://trac.parrot.org/parrot/changeset/44579
Log:
[ops] replace HALT() with equivalent code, remove ops2c code dealing with HALT
Modified:
trunk/lib/Parrot/OpsFile.pm
trunk/src/ops/core.ops
Modified: trunk/lib/Parrot/OpsFile.pm
==============================================================================
--- trunk/lib/Parrot/OpsFile.pm Tue Mar 2 04:38:37 2010 (r44578)
+++ trunk/lib/Parrot/OpsFile.pm Tue Mar 2 04:44:54 2010 (r44579)
@@ -130,11 +130,6 @@
Transforms to C<S>, the size of an op.
-=item C<HALT()>
-
-Transforms to C<PC' = 0>. Halts run loop, and resets the current
-position to the start of the Parrot code, without resuming.
-
=item C<restart OFFSET(X)>
Transforms to C<PC' = 0> and restarts at C<PC + X>.
@@ -501,8 +496,6 @@
# expr ADDRESS(X) {{^X}} X Absolute address
# OP_SIZE {{^S}} S op size
#
- # HALT() {{=0}} PC' = 0 Halts run_ops loop, no resume
- #
# restart OFFSET(X) {{=0,+=X}} PC' = 0 Restarts at PC + X
# restart NEXT() {{=0,+=S}} PC' = 0 Restarts at PC + S
#
@@ -535,7 +528,6 @@
$next ||= $body =~ s/\bexpr\s+NEXT\(\)/{{^+$op_size}}/mg;
$body =~ s/\bgoto\s+NEXT\(\)/{{+=$op_size}}/mg;
- $body =~ s/\bHALT\(\)/{{=0}}/mg;
$body =~ s/\bOP_SIZE\b/{{^$op_size}}/mg;
if ( $body =~ s/\brestart\s+OFFSET\((.*?)\)/{{=0,+=$1}}/mg ) {
@@ -663,7 +655,6 @@
#s/goto\s+NEXT\(\)/{{+=$op_size}}/mg; #not supported--dependent on op size
s/goto\s+ADDRESS\((.*)\)/{{=$1}}/mg;
- s/HALT\(\)/{{=0}}/mg;
$_ = Parrot::Op->rewrite_body( $_, $trans, 'preamble' );
}
Modified: trunk/src/ops/core.ops
==============================================================================
--- trunk/src/ops/core.ops Tue Mar 2 04:38:37 2010 (r44578)
+++ trunk/src/ops/core.ops Tue Mar 2 04:44:54 2010 (r44579)
@@ -52,7 +52,7 @@
=cut
inline op end() :base_core :check_event :flow {
- HALT();
+ goto ADDRESS(0);
}
More information about the parrot-commits
mailing list