[svn:parrot] r46978 - in branches/gsoc_past_optimization: examples/library runtime/parrot/library/PAST t/library

tcurtis at svn.parrot.org tcurtis at svn.parrot.org
Tue May 25 00:59:23 UTC 2010


Author: tcurtis
Date: Tue May 25 00:59:23 2010
New Revision: 46978
URL: https://trac.parrot.org/parrot/changeset/46978

Log:
Remove trailing spaces and remove the clone in PAST::Transformer.walk.

Modified:
   branches/gsoc_past_optimization/examples/library/pasttransformer.pir
   branches/gsoc_past_optimization/runtime/parrot/library/PAST/Transformer.pir
   branches/gsoc_past_optimization/t/library/pasttransformer.t

Modified: branches/gsoc_past_optimization/examples/library/pasttransformer.pir
==============================================================================
--- branches/gsoc_past_optimization/examples/library/pasttransformer.pir	Tue May 25 00:14:17 2010	(r46977)
+++ branches/gsoc_past_optimization/examples/library/pasttransformer.pir	Tue May 25 00:59:23 2010	(r46978)
@@ -18,12 +18,12 @@
     dumper = new ['Data'; 'Dumper']
     past = 'build_past'(nqp)
     folder = new ['PAST'; 'Transformer'; 'FoldConstants']
-    
+
     dumper.'dumper'(past)
     $P0 = nqp.'post'(past)
     $P0 = nqp.'pir'($P0)
     say $P0
-    
+
     say "\nFolding:\n"
     result = folder.'walk'(past)
     dumper.'dumper'(result)

Modified: branches/gsoc_past_optimization/runtime/parrot/library/PAST/Transformer.pir
==============================================================================
--- branches/gsoc_past_optimization/runtime/parrot/library/PAST/Transformer.pir	Tue May 25 00:14:17 2010	(r46977)
+++ branches/gsoc_past_optimization/runtime/parrot/library/PAST/Transformer.pir	Tue May 25 00:59:23 2010	(r46978)
@@ -12,7 +12,7 @@
     .param pmc walker
     .param pmc node
     .local pmc newChildren, result
-    result = clone node
+    result = node
     newChildren = 'walkChildren'(walker, node)
     'replaceChildren'(result, newChildren)
     .return (result)

Modified: branches/gsoc_past_optimization/t/library/pasttransformer.t
==============================================================================
--- branches/gsoc_past_optimization/t/library/pasttransformer.t	Tue May 25 00:14:17 2010	(r46977)
+++ branches/gsoc_past_optimization/t/library/pasttransformer.t	Tue May 25 00:59:23 2010	(r46978)
@@ -99,7 +99,7 @@
     counter.'walk'(past)
     $P0 = getattribute counter, 'count'
     is($P0, 0, "The initial tree has no PAST::Op nodes.")
-    
+
     result = transformer.'walk'(past)
 
     counter.'reset'()
@@ -147,7 +147,7 @@
     is($P0, 8, "The initial node count was correct.")
 
     result = transformer.'walk'(past)
-    
+
     counter.'reset'()
     counter.'walk'(past)
     $P0 = getattribute counter, 'blocks'
@@ -195,7 +195,7 @@
     $P0 = subclass $P1, ['PAST'; 'Transformer'; 'Increment']
     $P0 = subclass $P1, ['PAST'; 'Transformer'; 'Negate']
     $P0 = subclass $P1, ['PAST'; 'Transformer'; 'Trim']
-    
+
     $P1 = get_class ['PAST'; 'Walker']
     $P0 = subclass $P1, ['PAST'; 'Walker'; 'SumVals']
     addattribute $P0, 'count'
@@ -313,7 +313,7 @@
     setattribute self, 'blocks', $P0
     setattribute self, 'nodes', $P0
 .end
-    
+
 # Local Variables:
 #   mode: pir
 #   fill-column: 100


More information about the parrot-commits mailing list