[svn:parrot] r45783 - branches/immutable_strings_part2/compilers/pct/src/PCT

bacek at svn.parrot.org bacek at svn.parrot.org
Sun Apr 18 11:19:58 UTC 2010


Author: bacek
Date: Sun Apr 18 11:19:57 2010
New Revision: 45783
URL: https://trac.parrot.org/parrot/changeset/45783

Log:
Update PCT compiler to avoid in-place string ops

Modified:
   branches/immutable_strings_part2/compilers/pct/src/PCT/Dumper.pir
   branches/immutable_strings_part2/compilers/pct/src/PCT/HLLCompiler.pir

Modified: branches/immutable_strings_part2/compilers/pct/src/PCT/Dumper.pir
==============================================================================
--- branches/immutable_strings_part2/compilers/pct/src/PCT/Dumper.pir	Sun Apr 18 11:19:45 2010	(r45782)
+++ branches/immutable_strings_part2/compilers/pct/src/PCT/Dumper.pir	Sun Apr 18 11:19:57 2010	(r45783)
@@ -41,7 +41,7 @@
     $I0 = length str
     if $I0 < 48 goto have_str
     str = substr str, 0, 48
-    str .= '...'
+    str = str . '...'
   have_str:
     str = escape str
 

Modified: branches/immutable_strings_part2/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- branches/immutable_strings_part2/compilers/pct/src/PCT/HLLCompiler.pir	Sun Apr 18 11:19:45 2010	(r45782)
+++ branches/immutable_strings_part2/compilers/pct/src/PCT/HLLCompiler.pir	Sun Apr 18 11:19:57 2010	(r45783)
@@ -745,7 +745,7 @@
     ifh.'encoding'(encoding)
   iter_loop_1:
     $S0 = ifh.'readall'(iname)
-    code .= $S0
+    code = code . $S0
     close ifh
     goto iter_loop
   iter_end:
@@ -928,7 +928,7 @@
 
   load_dumper:
     load_bytecode 'PCT/Dumper.pbc'
-    downcase $S0
+    $S0 = downcase $S0
     $P0 = get_hll_global ['PCT';'Dumper'], $S0
     .tailcall $P0(obj, name)
 .end


More information about the parrot-commits mailing list