cvsuser     03/11/15 20:36:09

  Modified:    imcc/t/imcpasm optc.t pcc.t
  Log:
  Code generation has changed for .sub
  Now is a PCC sub by default. The main difference
  is _main which now gets the save continuation OP (P1) generated
  at the beginning, even though P1 isn't used. Need to fix
  optimizer to eliminate it.
  
  Revision  Changes    Path
  1.6       +14 -0     parrot/imcc/t/imcpasm/optc.t
  
  Index: optc.t
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/t/imcpasm/optc.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -r1.5 -r1.6
  --- optc.t    23 Oct 2003 17:02:56 -0000      1.5
  +++ optc.t    16 Nov 2003 04:36:09 -0000      1.6
  @@ -27,6 +27,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     new P5, \d+ # \.PerlUndef
     set P5, 42
     newsub P0, \d+, _sub
  @@ -35,8 +36,10 @@
     null I1
     set I2, 1
     null I3
  +  pushtopp
     invokecc
   ret:
  +  poptopp
     end
   _sub:
     print P5
  @@ -68,6 +71,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     new P5, \d+ # \.PerlUndef
     set P5, 42
     newsub P0, \d+, _sub
  @@ -76,8 +80,10 @@
     null I1
     set I2, 1
     set I3, -2
  +  pushtopp
     invokecc
   ret:
  +  poptopp
     print P5
     end
   _sub:
  @@ -120,6 +126,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     new P5, \d+ # \.PerlUndef
     set P5, 42
     new P16, \d+ # \.PerlUndef
  @@ -174,6 +181,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     new P5, \d+ # \.PerlUndef
     set P5, 42
     newsub P0, \d+, _sub
  @@ -182,8 +190,10 @@
     null I1
     set I2, 1
     set I3, -2
  +  pushtopp
     invokecc
   ret:
  +  poptopp
     print P5
     end
   _sub:
  @@ -224,6 +234,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     new P16, \d+ # \.PerlUndef
     set P16, 42
     newsub P0, \d+, _sub
  @@ -280,14 +291,17 @@
   .end
   CODE
   /_main:
  +        set P16, P1
           newsub P0, \d+, _sub1
   #pcc_sub_call_\d+:
           set I0, 1
           null I1
           null I2
           null I3
  +        pushtopp
           invokecc
   ret:
  +        poptopp
           end
   _sub1:
           set P17, P1
  
  
  
  1.16      +14 -4     parrot/imcc/t/imcpasm/pcc.t
  
  Index: pcc.t
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/t/imcpasm/pcc.t,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -w -r1.15 -r1.16
  --- pcc.t     23 Oct 2003 17:02:56 -0000      1.15
  +++ pcc.t     16 Nov 2003 04:36:09 -0000      1.16
  @@ -23,6 +23,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     set I5, 10
  @@ -68,13 +69,14 @@
   .end
   CODE
   /_main:
  -  newsub P16, \d+, _sub
  -  newsub P17, \d+, ret
  +  set P16, P1
  +  newsub P17, \d+, _sub
  +  newsub P16, \d+, ret
   #pcc_sub_call_\d:
     set I5, 10
     set I6, 20
  -  set P0, P16
  -  set P1, P17
  +  set P0, P17
  +  set P1, P16
     set I0, 1
     set I1, 0
     set I2, 0
  @@ -117,6 +119,7 @@
   .end
   CODE
   _main:
  +  set P16, P1
     print "ok 1\n"
   #pcc_sub_call_5:
     set I5, 10
  @@ -155,6 +158,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     set I(\d+), 10
     set I(\d+), 20
   #pcc_sub_call_\d:
  @@ -189,6 +193,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     new P3,.*?
  @@ -224,6 +229,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P(\d+), \d+, _sub
   #pcc_sub_call_\d:
     set P5, P\d+
  @@ -259,6 +265,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     new P3,.*?
  @@ -302,6 +309,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     set I5, 10
  @@ -347,6 +355,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     set P5, P17
  @@ -392,6 +401,7 @@
   .end
   CODE
   /_main:
  +  set P16, P1
     newsub P16, \d+, _sub
   #pcc_sub_call_\d:
     set P0, P16
  
  
  

Reply via email to