[svn:parrot] r38662 - branches/pmc_pct/compilers/pmcc/src/emitter

bacek at svn.parrot.org bacek at svn.parrot.org
Sun May 10 00:06:11 UTC 2009


Author: bacek
Date: Sun May 10 00:06:10 2009
New Revision: 38662
URL: https://trac.parrot.org/parrot/changeset/38662

Log:
Pass pmclass PAST as first argument during parsing.

It will require for proper emitting SUPER, SELF and other macros.

Modified:
   branches/pmc_pct/compilers/pmcc/src/emitter/c.pir

Modified: branches/pmc_pct/compilers/pmcc/src/emitter/c.pir
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/emitter/c.pir	Sat May  9 23:55:19 2009	(r38661)
+++ branches/pmc_pct/compilers/pmcc/src/emitter/c.pir	Sun May 10 00:06:10 2009	(r38662)
@@ -23,7 +23,7 @@
 
 .sub 'emit'
     .param pmc entry
-    .tailcall '!generate_children_body_part'(entry)
+    .tailcall '!generate_children_body_part'(entry, entry)
 .end
 
 =item C<!generate_body_part>
@@ -34,23 +34,26 @@
 
 =cut
 
-.sub '!generate_body_part' :multi(['PAST';'Op'])
+.sub '!generate_body_part' :multi(_, ['PAST';'Op'])
+    .param pmc pmclass
     .param pmc past
     $S0 = past['inline']
     .return ($S0)
 .end
 
-.sub '!generate_body_part' :multi(['PAST';'Stmts'])
+.sub '!generate_body_part' :multi(_, ['PAST';'Stmts'])
+    .param pmc pmclass
     .param pmc past
     .local string res
     res = "{\n"
-    $S0 = '!generate_children_body_part'(past)
+    $S0 = '!generate_children_body_part'(pmclass, past)
     concat res, $S0
     concat res, "}\n"
     .return (res)
 .end
 
 .sub '!generate_children_body_part'
+    .param pmc pmclass
     .param pmc entry
     
     .local pmc res
@@ -61,7 +64,7 @@
     $P1 = shift $P0
     #print 'P1 '
     #say $P1
-    $S0 = '!generate_body_part'($P1)
+    $S0 = '!generate_body_part'(pmclass, $P1)
     push res, $S0
     goto loop
   done:


More information about the parrot-commits mailing list