Front page | perl.cvs.parrot |
Postings from January 2009
[svn:parrot] r34745 - trunk/languages/pipp/src/pct
From:
bernhard
Date:
January 1, 2009 08:11
Subject:
[svn:parrot] r34745 - trunk/languages/pipp/src/pct
Message ID:
20090101161143.12F84CB9FA@x12.develooper.com
Author: bernhard
Date: Thu Jan 1 08:11:41 2009
New Revision: 34745
Modified:
trunk/languages/pipp/src/pct/actions.pm
Log:
[Pipp] Try to make closures_7.php pass, but do not succeed.
Maybe the readonly proberty needs to be set for $indention.
Modified: trunk/languages/pipp/src/pct/actions.pm
==============================================================================
--- trunk/languages/pipp/src/pct/actions.pm (original)
+++ trunk/languages/pipp/src/pct/actions.pm Thu Jan 1 08:11:41 2009
@@ -372,7 +372,7 @@
method simple_var($/) {
our @?BLOCK;
- unless @?BLOCK[0].symbol( ~$<VAR_NAME> ) {
+ unless ( @?BLOCK[0].symbol( ~$<VAR_NAME> ) || @?BLOCK[0].symbol( ~$<VAR_NAME> ~ '_hidden' ) ) {
@?BLOCK[0].symbol( ~$<VAR_NAME>, :scope('lexical') );
@?BLOCK[0].push(
PAST::Var.new(
@@ -511,7 +511,7 @@
# declare the bound vars a lexical
if +$<bind_list> == 1 {
for $<bind_list>[0]<VAR_NAME> {
- $block.symbol( ~$_, :scope('lexical') );
+ $block.symbol( ~$_ ~ '_hidden', :comment('bound with use') );
}
}
@?BLOCK.unshift( $block );
@@ -588,12 +588,33 @@
);
my $arity := 0;
for $<VAR_NAME> {
- my $param :=
+ $block.push(
PAST::Var.new(
:name(~$_),
:scope('parameter'),
- );
- $block.push($param);
+ )
+ );
+##### $block.push(
+##### PAST::Op.new(
+##### :pasttype('bind'),
+##### PAST::Var.new(
+##### :name(~$_),
+##### :scope('lexical')
+##### ),
+##### PAST::Op.new(
+##### :inline(
+##### '# %r = new "Perl6Scalar", %0',
+##### '# $P0 = get_hll_global ["Bool"], "True"',
+##### '# setprop %r, "readonly", $P0'
+##### ),
+##### PAST::Var.new(
+##### :name(~$_),
+##### :scope('lexical')
+##### )
+##### )
+##### )
+##### );
+
$arity++;
$block.symbol( ~$_, :scope('lexical') );
}
-
[svn:parrot] r34745 - trunk/languages/pipp/src/pct
by bernhard