Created
January 31, 2017 17:16
-
-
Save perlpilot/bb541544ae518421bfd4cb64a6eb1b27 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
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp | |
index ace9b9b..b0ecaaa 100644 | |
--- a/src/Perl6/Actions.nqp | |
+++ b/src/Perl6/Actions.nqp | |
@@ -7832,6 +7832,8 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
QAST::IVal.new( :value($samemark) ), | |
); | |
+ my $Sname := QAST::Node.unique("__Sname"); | |
+ | |
$past := QAST::Op.new( :op('locallifetime'), :node($/), | |
QAST::Stmt.new( | |
@@ -7868,12 +7870,12 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
), | |
QAST::Op.new( :op('call'), :name('&infix:<=>'), | |
- WANTED(QAST::Var.new( :name($<sym> eq 's' ?? '$_' !! '$/'), :scope('lexical') ),'s/assign'), | |
+ WANTED(QAST::Var.new( :name($<sym> eq 's' ?? '$_' !! $Sname), :scope('lexical') ),'s/assign'), | |
$apply_matches | |
), | |
( $<sym> eq 'S' | |
?? QAST::Op.new( :op('p6store'), | |
- QAST::Var.new( :name('$/'), :scope('lexical') ), | |
+ QAST::Var.new( :name($Sname), :scope('lexical') ), | |
WANTED(QAST::Var.new( :name('$_'), :scope('lexical') ),'S'), | |
) | |
!! QAST::Stmt.new() | |
@@ -7909,7 +7911,8 @@ class Perl6::Actions is HLL::Actions does STDActions { | |
) !! QAST::Stmt.new(), | |
# The result of this operation. | |
- QAST::Var.new( :name('$/'), :scope('lexical') ) | |
+ ($<sym> eq 's' ?? QAST::Var.new( :name('$/'), :scope('lexical') ) | |
+ !! QAST::Var.new( :name($Sname), :scope('lexical') ) ) | |
), | |
); | |
$past.annotate('is_S', $<sym> eq 'S'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment