[svn:parrot] r42786 - in trunk/compilers/pct/src: PAST PCT
pmichaud at svn.parrot.org
pmichaud at svn.parrot.org
Sun Nov 22 09:55:14 UTC 2009
Author: pmichaud
Date: Sun Nov 22 09:55:12 2009
New Revision: 42786
URL: https://trac.parrot.org/parrot/changeset/42786
Log:
[pct]: Make compiler options more readily available to compilers.
Add handling for 'outer_ctx' option.
Modified:
trunk/compilers/pct/src/PAST/Compiler.pir
trunk/compilers/pct/src/PCT/HLLCompiler.pir
Modified: trunk/compilers/pct/src/PAST/Compiler.pir
==============================================================================
--- trunk/compilers/pct/src/PAST/Compiler.pir Sun Nov 22 08:48:27 2009 (r42785)
+++ trunk/compilers/pct/src/PAST/Compiler.pir Sun Nov 22 09:55:12 2009 (r42786)
@@ -69,6 +69,7 @@
piropsig['chr'] = 'Si'
piropsig['clone'] = 'PP'
piropsig['concat'] = 'PP~'
+ piropsig['defined'] = 'IP'
piropsig['die'] = 'v~'
piropsig['div'] = 'PP+'
piropsig['downcase'] = 'Ss'
Modified: trunk/compilers/pct/src/PCT/HLLCompiler.pir
==============================================================================
--- trunk/compilers/pct/src/PCT/HLLCompiler.pir Sun Nov 22 08:48:27 2009 (r42785)
+++ trunk/compilers/pct/src/PCT/HLLCompiler.pir Sun Nov 22 09:55:12 2009 (r42786)
@@ -289,6 +289,11 @@
.param pmc source
.param pmc adverbs :slurpy :named
+ .local pmc compiling, options
+ compiling = new ['Hash']
+ .lex '%*COMPILING', compiling
+ compiling['%?OPTIONS'] = adverbs
+
.local string target
target = adverbs['target']
target = downcase target
@@ -548,6 +553,13 @@
.local string target
target = adverbs['target']
if target != '' goto end
+ .local pmc outer_ctx, outer
+ outer_ctx = adverbs['outer_ctx']
+ if null outer_ctx goto outer_done
+ outer = outer_ctx['current_sub']
+ $P1 = $P0[0]
+ $P1.'set_outer'(outer)
+ outer_done:
$I0 = adverbs['trace']
trace $I0
$P0 = $P0(args :flat)
More information about the parrot-commits
mailing list