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

bacek at svn.parrot.org bacek at svn.parrot.org
Tue May 12 10:34:57 UTC 2009


Author: bacek
Date: Tue May 12 10:34:57 2009
New Revision: 38709
URL: https://trac.parrot.org/parrot/changeset/38709

Log:
Fix creating PMC-specific emitter

Modified:
   branches/pmc_pct/compilers/pmcc/src/emitter.pm

Modified: branches/pmc_pct/compilers/pmcc/src/emitter.pm
==============================================================================
--- branches/pmc_pct/compilers/pmcc/src/emitter.pm	Tue May 12 06:40:07 2009	(r38708)
+++ branches/pmc_pct/compilers/pmcc/src/emitter.pm	Tue May 12 10:34:57 2009	(r38709)
@@ -62,18 +62,20 @@
 sub get_pmc_emitter($name, $past) {
 PIR q<
     find_lex $P0, '$name'
+    find_lex $P1, '$past'
     $S0 = $P0
 
     .local pmc ctor
     ctor = get_hll_global ['PMC';'Emitter';'PMC'], $S0
-    $I0 = defined ctor
-    if $I0 goto done
+    push_eh not_found
+    %r = ctor.'new'($P1)
+    goto done
 
   not_found:
+    pop_eh
     ctor = get_hll_global ['PMC';'Emitter'], 'PMC'
-  done:
-    find_lex $P1, '$past'
     %r = ctor.'new'($P1)
+  done:
 >;
 }
 


More information about the parrot-commits mailing list