Author: pmichaud
Date: Mon Dec  1 09:14:24 2008
New Revision: 33425

Modified:
   trunk/compilers/pct/src/PAST/Compiler.pir
   trunk/compilers/pct/src/PCT/HLLCompiler.pir
   trunk/compilers/pct/src/PCT/Node.pir
   trunk/compilers/pct/src/POST/Compiler.pir

Log:
[pct]:  Switch PCT to use box opcode at convenient places.


Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/PAST/Compiler.pir   Mon Dec  1 09:14:24 2008
@@ -95,8 +95,7 @@
     $P0 = new 'CodeString'
     set_global '%!codestring', $P0
 
-    $P0 = new 'Integer'
-    $P0 = 11
+    $P0 = box 11
     set_global '$!serno', $P0
 
     .return ()
@@ -1313,8 +1312,7 @@
     .local pmc returns
     returns = node.'returns'()
     if returns goto have_returns
-    returns = new 'String'
-    returns = 'ResizablePMCArray'
+    returns = box 'ResizablePMCArray'
   have_returns:
 
     .local pmc listpost, iter
@@ -1993,8 +1991,7 @@
     ops = call_on
     goto invocant_done
   use_self:
-    call_on = new 'String'
-    call_on = 'self'
+    call_on = box 'self'
     ops = $P0.'new'('node'=>node)
   invocant_done:
 

Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir (original)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir Mon Dec  1 09:14:24 2008
@@ -32,8 +32,7 @@
     $P0 = split ' ', 'e=s help|h target=s trace|t=s encoding=s output|o=s 
combine version|v'
     setattribute self, '@cmdoptions', $P0
 
-    $P1 = new 'String'
-    $P1 = <<'    USAGE'
+    $P1 = box <<'    USAGE'
   This compiler is based on PCT::HLLCompiler.
 
   Options:
@@ -57,8 +56,7 @@
     $S0  = $P0['revision']
   _handler:
     pop_eh
-    $P2 = new 'String'
-    $P2  = 'This compiler is built with the Parrot Compiler Toolkit, parrot 
revision '
+    $P2  = box 'This compiler is built with the Parrot Compiler Toolkit, 
parrot revision '
     $P2 .= $S0
     $P2 .= '.'
     setattribute self, '$version', $P2
@@ -756,8 +754,7 @@
     if $S0 goto eval_line
 
     .local pmc result
-    result = new 'String'
-    result = ''
+    result = box ''
     unless args goto interactive
     $I0 = adverbs['combine']
     if $I0 goto combine

Modified: trunk/compilers/pct/src/PCT/Node.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/Node.pir        (original)
+++ trunk/compilers/pct/src/PCT/Node.pir        Mon Dec  1 09:14:24 2008
@@ -22,8 +22,7 @@
     p6meta = new 'P6metaclass'
     p6meta.'new_class'('PCT::Node', 'parent'=>'Capture_PIR')
 
-    $P0 = new 'Integer'
-    $P0 = 10
+    $P0 = box 10
     set_hll_global ['PCT';'Node'], '$!serno', $P0
 
     .return ()

Modified: trunk/compilers/pct/src/POST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/POST/Compiler.pir   (original)
+++ trunk/compilers/pct/src/POST/Compiler.pir   Mon Dec  1 09:14:24 2008
@@ -26,8 +26,7 @@
     $P0 = new 'ResizablePMCArray'
     set_global '@!subcode', $P0
 
-    $P0 = new 'String'
-    $P0 = '[]'
+    $P0 = box '[]'
     set_global '$?NAMESPACE', $P0
     .return ()
 .end

Reply via email to