Created
November 15, 2011 17:29
-
-
Save mlschroe/1367707 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/src/Perl6/Actions.pm | |
+++ b/src/Perl6/Actions.pm | |
@@ -1410,6 +1410,7 @@ class Perl6::Actions is HLL::Actions { | |
# install it in the lexpad. | |
my $outer := $*ST.cur_lexpad(); | |
$outer[0].push(PAST::Stmt.new($block)); | |
+ $outer[0].push(PAST::Op.new( :pirop('capture_lex__vP'), PAST::Val.new( :value($block)))); | |
# Install &?ROUTINE. | |
$*ST.install_lexical_symbol($block, '&?ROUTINE', $code); | |
@@ -1631,6 +1632,7 @@ class Perl6::Actions is HLL::Actions { | |
# Install PAST block so that it gets capture_lex'd correctly. | |
my $outer := $*ST.cur_lexpad(); | |
$outer[0].push($past); | |
+ $outer[0].push(PAST::Op.new( :pirop('capture_lex__vP'), PAST::Val.new( :value($past)))); | |
# Apply traits. | |
for $<trait> { | |
@@ -1822,6 +1824,7 @@ class Perl6::Actions is HLL::Actions { | |
# Install PAST block so that it gets capture_lex'd correctly. | |
my $outer := $*ST.cur_lexpad(); | |
$outer[0].push($past); | |
+ $outer[0].push(PAST::Op.new( :pirop('capture_lex__vP'), PAST::Val.new( :value($past)))); | |
# Apply traits. | |
if $traits { | |
@@ -4041,7 +4045,9 @@ class Perl6::Actions is HLL::Actions { | |
my $code := $*ST.create_code_object($block, 'Method', $sig); | |
# Block should go in current lexpad, in correct lexical context. | |
- ($*ST.cur_lexpad())[0].push($block); | |
+ my $outer := $*ST.cur_lexpad(); | |
+ $outer[0].push($block); | |
+ $outer[0].push(PAST::Op.new( :pirop('capture_lex__vP'), PAST::Val.new( :value($block)))); | |
# Dispatch trait. XXX Should really be Bool::True, not Int here... | |
my $true := ($*ST.add_constant('Int', 'int', 1))<compile_time_value>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment