Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Created September 25, 2014 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/0d4b5c771c7d9eb4f5b6 to your computer and use it in GitHub Desktop.
Save FROGGS/0d4b5c771c7d9eb4f5b6 to your computer and use it in GitHub Desktop.
cd ../zavolaj && perl6-j -Ilib t/01-argless.t; cd -
1..3
This representation can not unbox another
in method postcircumfix:<( )> at /home/froggs/dev/zavolaj/lib/NativeCall.pm6:127
in any at gen/jvm/BOOTSTRAP.nqp:1668
in block at t/01-argless.t:13
zavolaj's revision: ec3f50927bd5a658604da837e8ea51361fba1e32
rakudo:
e167669a498b91543144c7657e5cdb8d0cb40e65 is the first bad commit
commit e167669a498b91543144c7657e5cdb8d0cb40e65
Author: jnthn <jnthn@jnthn.net>
Date: Sat Aug 9 23:58:06 2014 +0200
In UNIT, no need for wasteful clone operations.
There's only ever going to be one anyway, since it's in UNIT. Avoids
a little work at startup and saves us some allocations, memory, etc.
diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp
index 87209ab..43719ed 100644
--- a/src/Perl6/Actions.nqp
+++ b/src/Perl6/Actions.nqp
@@ -2504,6 +2504,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
# Install PAST block so that it gets capture_lex'd correctly and also
# install it in the lexpad.
my $outer := $*W.cur_lexpad();
+ my $clone := !($outer =:= $*UNIT);
$outer[0].push(QAST::Stmt.new($block));
# Install &?ROUTINE.
@@ -2541,7 +2542,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
}
# Install in current scope.
- $*W.install_lexical_symbol($outer, $name, $new_proto, :clone(1));
+ $*W.install_lexical_symbol($outer, $name, $new_proto, :$clone);
$proto := $new_proto;
}
@@ -2565,12 +2566,12 @@ class Perl6::Actions is HLL::Actions does STDActions {
);
}
if $*SCOPE eq '' || $*SCOPE eq 'my' {
- $*W.install_lexical_symbol($outer, $name, $code, :clone(1));
+ $*W.install_lexical_symbol($outer, $name, $code, :$clone);
}
elsif $*SCOPE eq 'our' {
# Install in lexpad and in package, and set up code to
# re-bind it per invocation of its outer.
- $*W.install_lexical_symbol($outer, $name, $code, :clone(1));
+ $*W.install_lexical_symbol($outer, $name, $code, :$clone);
$*W.install_package_symbol($*PACKAGE, $name, $code);
$outer[0].push(QAST::Op.new(
:op('bindkey'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment