Commit 971bbbf1 authored by Alessandro Ghedini's avatar Alessandro Ghedini

Imported Upstream version 2014.01

parent 356d756d
......@@ -371,6 +371,7 @@ E: tene@allalone.org
N: Timo Paulssen
U: timo
U: timotimo
E: timonator@perpetuum-immobile.de
N: Timothy Totten
......
......@@ -34,6 +34,7 @@ MAIN: {
GetOptions(\%options, 'help!', 'prefix=s',
'backends=s', 'no-clean!',
'gen-nqp:s',
'gen-moar:s',
'gen-parrot:s', 'parrot-option=s@',
'parrot-make-option=s@',
'make-install!', 'makefile-timing!',
......@@ -51,7 +52,7 @@ MAIN: {
$options{prefix} ||= 'install';
$options{prefix} = File::Spec->rel2abs($options{prefix});
my $prefix = $options{'prefix'};
my %known_backends = (parrot => 1, jvm => 1);
my %known_backends = (parrot => 1, jvm => 1, moar => 1);
my %letter_to_backend;
my $default_backend;
for (keys %known_backends) {
......@@ -83,9 +84,16 @@ MAIN: {
$default_backend ||= $b;
}
}
$backends{parrot} = 1 if exists $options{'gen-parrot'};
if (exists $options{'gen-moar'}) {
$backends{moar} = 1;
$default_backend ||= 'moar';
}
if (exists $options{'gen-parrot'}) {
$backends{parrot} = 1;
$default_backend ||= 'parrot';
}
unless (%backends) {
die "No suitable nqp executables found! Please specify some --backends, or a --prefix that contains nqp-{p,j} executables\n";
die "No suitable nqp executables found! Please specify some --backends, or a --prefix that contains nqp-{p,j,m} executables\n";
}
}
......@@ -103,6 +111,8 @@ MAIN: {
$config{'stagestats'} = '--stagestats' if $options{'makefile-timing'};
$config{'cpsep'} = $^O eq 'MSWin32' ? ';' : ':';
$config{'shell'} = $^O eq 'MSWin32' ? 'cmd' : 'sh';
$config{'runner_suffix'} = $^O eq 'MSWin32' ? '.bat' : '';
my $make = $config{'make'} = $^O eq 'MSWin32' ? 'nmake' : 'make';
open my $MAKEFILE, '>', 'Makefile'
......@@ -124,6 +134,8 @@ MAIN: {
# determine the version of NQP we want
my ($nqp_want) = split(' ', slurp('tools/build/NQP_REVISION'));
$options{'gen-nqp'} ||= '' if exists $options{'gen-parrot'} || exists $options{'gen-moar'};
my %binaries;
my %impls = gen_nqp($nqp_want, prefix => $prefix, backends => join(',', sort keys %backends), %options);
......@@ -165,7 +177,7 @@ MAIN: {
sorry(@errors) if @errors;
print "Using $impls{parrot}{bin} (version $nqp_config{'nqp::version'}).\n";
print "Using $impls{parrot}{bin} (version $nqp_config{'nqp::version'} / Parrot $nqp_config{'parrot::VERSION'}).\n";
if ($^O eq 'MSWin32' or $^O eq 'cygwin') {
$config{'dll'} = '$(PARROT_BIN_DIR)/$(PARROT_LIB_SHARED)';
......@@ -197,8 +209,13 @@ MAIN: {
}
sorry(@errors) if @errors;
my $java_version = `java -version 2>&1`;
$java_version = $java_version =~ /(?<v>[\d\._]+).+\n(?<n>\S+)/
? "$+{'n'} $+{'v'}"
: 'no java version info available';
print "Using $bin.\n";
print "Using $bin (version $nqp_config{'nqp::version'} / $java_version).\n";
$config{'nqp_prefix'} = $nqp_config{'jvm::runtime.prefix'};
$config{'nqp_jars'} = $nqp_config{'jvm::runtime.jars'};
......@@ -208,6 +225,30 @@ MAIN: {
fill_template_file('tools/build/Makefile-JVM.in', $MAKEFILE, %config);
}
if ($backends{moar}) {
$config{m_nqp} = $impls{moar}{bin};
$config{m_nqp} =~ s{/}{\\}g if $^O eq 'MSWin32';
my %nqp_config;
if ( $impls{moar}{config} ) {
%nqp_config = %{ $impls{moar}{config} };
}
else {
push @errors, "Unable to read configuration from NQP on MoarVM";
}
sorry(@errors) if @errors;
print "Using $config{m_nqp} (version $nqp_config{'nqp::version'} / MoarVM $nqp_config{'moar::version'}).\n";
$config{'perl6_ops_dll'} = sprintf($nqp_config{'moar::dll'}, 'perl6_ops_moar');
# Add moar library to link command
# TODO: Get this from Moar somehow
$config{'moarimplib'} = $^O eq 'MSWin32' ? "$prefix/bin/moar.dll.lib"
: $^O eq 'darwin' ? "$prefix/lib/libmoar.dylib"
: '';
fill_template_file('tools/build/Makefile-Moar.in', $MAKEFILE, %config, %nqp_config);
}
my $l = uc substr($default_backend, 0, 1);
print $MAKEFILE qq[\nt/*/*.t t/*.t t/*/*/*.t: all\n\t\$(${l}_HARNESS_WITH_FUDGE) --verbosity=1 \$\@\n];
......@@ -246,9 +287,12 @@ Configure.pl - $lang Configure
General Options:
--help Show this text
--prefix=dir Install files in dir; also look for executables there
--backends=parrot,jvm Which backend(s) to use
--backends=parrot,jvm,moar
Which backend(s) to use
--gen-nqp[=branch]
Download and build a copy of NQP
--gen-moar[=branch]
Download and build a copy of MoarVM to use
--gen-parrot[=branch]
Download and build a copy of Parrot
--parrot-option='--option'
......
......@@ -61,6 +61,7 @@ docs/announce/2013.09.md
docs/announce/2013.10.md
docs/announce/2013.11.md
docs/announce/2013.12.md
docs/announce/2014.01.md
docs/architecture.html
docs/architecture.svg
docs/ChangeLog
......@@ -270,6 +271,11 @@ src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java
src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerConfigurer.java
src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerSpec.java
src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java
src/vm/moar/ModuleLoaderVMConfig.nqp
src/vm/moar/ops/container.c
src/vm/moar/ops/container.h
src/vm/moar/ops/perl6_ops.c
src/vm/moar/Perl6/Ops.nqp
src/vm/parrot/guts/bind.c
src/vm/parrot/guts/bind.h
src/vm/parrot/guts/container.c
......@@ -285,28 +291,28 @@ src/vm/parrot/ModuleLoaderVMConfig.nqp
src/vm/parrot/ops/.gitignore
src/vm/parrot/ops/perl6.ops
src/vm/parrot/Perl6/Ops.nqp
t/00-parrot/01-literals.t
t/00-parrot/02-op-math.t
t/00-parrot/03-op-logic.t
t/00-parrot/04-op-cmp.t
t/00-parrot/05-var.t
t/00-parrot/06-op-inplace.t
t/00-parrot/07-op-string.t
t/00-parrot/08-var-array.t
t/00-parrot/09-pir.t
t/00-parrot/10-regex.t
t/01-sanity/01-tap.t
t/01-sanity/02-counter.t
t/01-sanity/03-equal.t
t/01-sanity/04-if.t
t/01-sanity/05-sub.t
t/01-sanity/06-eqv.t
t/01-sanity/07-isa.t
t/01-sanity/08-simple-multisubs.t
t/01-sanity/01-literals.t
t/01-sanity/02-op-math.t
t/01-sanity/03-op-logic.t
t/01-sanity/04-op-cmp.t
t/01-sanity/05-var.t
t/01-sanity/06-op-inplace.t
t/01-sanity/07-op-string.t
t/01-sanity/08-var-array.t
t/01-sanity/09-end-blocks.t
t/01-sanity/10-say.t
t/01-sanity/11-defined.t
t/01-sanity/12-try.t
t/01-sanity/10-regex.t
t/01-sanity/11-tap.t
t/01-sanity/12-counter.t
t/01-sanity/13-equal.t
t/01-sanity/14-if.t
t/01-sanity/15-sub.t
t/01-sanity/16-eqv.t
t/01-sanity/17-isa.t
t/01-sanity/18-simple-multisubs.t
t/01-sanity/19-say.t
t/01-sanity/20-defined.t
t/01-sanity/21-try.t
t/01-sanity/99-test-basic.t
t/02-rakudo/dump.t
t/fudgeandrun
......@@ -316,11 +322,13 @@ tools/benchmark.pl
tools/bisect-parrot.pl
tools/build/check-versions.pl
tools/build/create-jvm-runner.pl
tools/build/create-moar-runner.pl
tools/build/gen-cat.pl
tools/build/gen-version.pl
tools/build-localtest.pl
tools/build/Makefile-common.in
tools/build/Makefile-JVM.in
tools/build/Makefile-Moar.in
tools/build/Makefile-Parrot.in
tools/build/nqp-jvm-rr.pl
tools/build/NQP_REVISION
......@@ -607,6 +615,7 @@ t/spec/S03-operators/comparison-simple.t
t/spec/S03-operators/comparison.t
t/spec/S03-operators/context-forcers.t
t/spec/S03-operators/context.t
t/spec/S03-operators/custom.t
t/spec/S03-operators/div.t
t/spec/S03-operators/equality.t
t/spec/S03-operators/eqv.t
......@@ -795,7 +804,6 @@ t/spec/S05-metasyntax/litvar.t
t/spec/S05-metasyntax/longest-alternative.t
t/spec/S05-metasyntax/lookaround.t
t/spec/S05-metasyntax/null.t
t/spec/S05-metasyntax/prior.t
t/spec/S05-metasyntax/proto-token-ltm.t
t/spec/S05-metasyntax/regex.t
t/spec/S05-metasyntax/repeat.t
......@@ -1230,6 +1238,7 @@ t/spec/S32-num/fatrat.t
t/spec/S32-num/int.t
t/spec/S32-num/is-prime.t
t/spec/S32-num/log.t
t/spec/S32-num/narrow.t
t/spec/S32-num/pi.t
t/spec/S32-num/polar.t
t/spec/S32-num/power.t
......
Rakudo Perl 6
This is Rakudo Perl, a Perl 6 compiler for the Parrot virtual machine.
This is Rakudo Perl, a Perl 6 compiler for the Parrot virtual machine,
the JVM and MoarVM.
Rakudo Perl is Copyright (C) 2008-2013, The Perl Foundation. Rakudo Perl
Rakudo Perl is Copyright (C) 2008-2014, The Perl Foundation. Rakudo Perl
is distributed under the terms of the Artistic License 2.0. For more
details, see the full text of the license in the file LICENSE.
......@@ -47,6 +48,19 @@ Rakudo Perl 6
as options passed to java in the installed nqp / nqp.bat.
Building Rakudo on MoarVM
The easiest way is:
$ perl Configure.pl --gen-moar --gen-nqp --backends=moar
$ make
$ make spectest # optional
$ make install # IMPORTANT, installs to install/bin/perl6
Note that the 'make install' step is necessary for running
Rakudo from outside the build directory. But don't worry, it
installs locally by default, so you don't need any administrator
privileges for carrying out this step.
Where to get help or answers to questions
There are several mailing lists, IRC channels, and wikis available with
help for Perl 6 and Rakudo on Parrot. Figuring out the right one to use
......
New in 2014.01
+ Use .narrow on Numeric to coerce to narrowest Type possible
+ Can now supply blocks with multiple arguments as sequence endpoints
+ <prior> rule no longer exists
+ The eval sub and method are now spelled EVAL
+ Method calls and hash/list access on Nil give Nil
+ No longer need to separate adverbs with comma in argument lists
+ div on parrot will now always round towards -Inf
+ Added support for MoarVM; passes >99% of the spectests that Rakudo JVM does
+ Fixed gather/take stack overflow bug in JVM backend
+ Fixed closure in regex bug on JVM
+ Fixed some line number reporting bugs on JVM
+ Optimized Enum($value) coercion
+ Regexes: Aliased assertions now properly create sub-captures
+ Regexes: Improved detection/reporting of null patterns
+ Implemented IO::Async::File.spurt (JVM only)
+ Implemented Setty.kv and Baggy.kv
+ Use a global ByteClassLoader rather than one per class. (JVM only)
+ Implement more parts of NativeCall for the JVM
New in 2013.12
+ The Whatever Star now works inside chain operators like comparisons
......
# Announce: Rakudo Perl 6 compiler, Development Release #72 ("Plano")
On behalf of the Rakudo development team, I'm happy to announce the
January 2014 release of Rakudo Perl #72 "Plano". Rakudo is an
implementation of Perl 6 on the Parrot Virtual Machine, the Java Virtual
Machine and the Moar Virtual Machine[^1]. The tarball for this release
is available from <http://rakudo.org/downloads/rakudo/>.
Please note: This announcement is not for the Rakudo Star
distribution[^2] --- it's announcing a new release of the compiler
only. For the latest Rakudo Star release, see
<http://rakudo.org/downloads/star/>.
The Rakudo Perl compiler follows a monthly release cycle, with each
release named after a Perl Mongers group. The January 2014 release is
code-named after Plano, because that suggestion was way better than
"Three Blind Mice".
<masak> hm, so what should we name this release...
<PerlJam> Fred
<TimToady> Three Musketeers
<TimToady> Three Stooges
<TimToady> Three Blind Mice
<TimToady> Three Little Pigs
...
<TimToady> maybe we should name it Plano because that implies at least three dimensions
<jnthn> oooh!
<PerlJam> +1
<jnthn> TimToady++
Some of the changes in this release are outlined below:
+ `Numeric.narrow` to coerce to narrowest type possible
+ Can now supply blocks with multiple arguments as sequence endpoints
+ The `eval` sub and method are now spelled `EVAL`
+ Method calls and hash/list access on `Nil` give `Nil`
+ Added support for MoarVM; passes >99% of the spectests that Rakudo JVM does
+ Implement more parts of `NativeCall` for the JVM
+ Fixed gather/take stack overflow bug in JVM backend
These are only some of the changes in this release. For a more
detailed list, see "docs/ChangeLog".
The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible, as well as those people who worked on
Parrot, the Perl 6 test suite and the specification.
The following people contributed to this release:
Jonathan Worthington, Tobias Leich, Timo Paulssen, Moritz Lenz, Will "Coke"
Coleda, Brian Gernhardt, Carl Masak, Rob Hoelz, Geoffrey Broadwell, Kevan
Benson, Solomon Foster, grondilu, diakopter, Elizabeth Mattijsen, Mouq,
Jonathan Scott Duff, Tadeusz Sośnierz, lue
If you would like to contribute, see <http://rakudo.org/how-to-help>,
ask on the <perl6-compiler@perl.org> mailing list, or ask on IRC
\#perl6 on freenode.
The next release of Rakudo (#73), is scheduled for February 20, 2014.
A list of the other planned release dates and code names for future
releases is available in the "docs/release_guide.pod" file. A Rakudo
development release typically occurs a few days (often two) after the
third Tuesday of each month.
On behalf of the development team, I encourage you to enjoy the new release,
try awesome stuff, and get back to us with feedback.
[^1]: See <http://6guts.wordpress.com/2013/05/31/moarvm-a-virtual-machine-for-nqp-and-rakudo/>
and <http://moarvm.org/>
[^2]: What's the difference between the Rakudo compiler and the Rakudo
Star distribution?
The Rakudo compiler is a compiler for the Perl 6 language.
Nothing else.
The Rakudo Star distribution is the Rakudo compiler plus a selection
of useful Perl 6 modules, a module installer, the most recent
incarnation of the "Using Perl 6" book, and other software that can
be used with the Rakudo compiler to enhance its utility. Rakudo Star
is meant for early adopters who wish to explore what's possible with
Rakudo Perl 6 and provide feedback on what works, what doesn't, and
what else they would like to see included in the distribution.
Deprecations in 2013.12
eval is now spelled EVAL
Deprecations in 2013.11
Order::Increase and Order::Decrease are now called Order::Less and
......
......@@ -17,8 +17,7 @@ end of this document.
Releases are typically on the third Thursday of each month.
2014-01-23 Rakudo #72 masak
2014-02-20 Rakudo #73
2014-02-20 Rakudo #73 timotimo
2014-03-20 Rakudo #74
2014-04-17 Rakudo #75
2014-05-22 Rakudo #76
......@@ -297,6 +296,7 @@ You're done! Celebrate with the appropriate amount of fun.
2013-10-17 Rakudo #69 "Roederbergweg" (Coke)
2013-11-21 Rakudo #70 "Malmö" (lizmat)
2013-12-19 Rakudo #71 "Advent" (moritz)
2014-01-23 Rakudo #72 "Plano" (masak)
=head1 COPYRIGHT
......
......@@ -237,7 +237,7 @@ sub _is_deeply(Mu $got, Mu $expected) {
sub eval_exception($code) {
try {
eval ($code);
EVAL ($code);
}
$!;
}
......
This diff is collapsed.
......@@ -855,6 +855,9 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
# Quasis and unquotes
:my $*IN_QUASI := 0; # whether we're currently in a quasi block
# performance improvement stuff
:my $*FAKE_INFIX_FOUND := 0;
# Setting loading and symbol setup.
{
# Create unit outer (where we assemble any lexicals accumulated
......@@ -1580,7 +1583,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
token special_variable:sym<$@> {
<sym> <?before \W | '(' | <sigil> >
<sym> <!before \w | '(' | <sigil> >
<.obs('$@ variable as eval error', '$!')>
}
......@@ -2160,6 +2163,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
<DECL=multi_declarator>
| <DECL=multi_declarator>
] <.ws>
|| <.ws>[<typename><.ws>]* <ident> <?before <.ws> [':'?':'?'=' | ';' | '}' ]> {}
<.malformed("$*SCOPE (did you mean to declare a sigilless \\{~$<ident>} or \${~$<ident>}?)")>
|| <.ws><typo_typename> <!>
|| <.malformed($*SCOPE)>
]
......@@ -2427,6 +2432,8 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
elsif $kind eq '*' {
$*zone := 'var';
}
%*PARAM_INFO<node> := $/;
}
}
......@@ -2723,6 +2730,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
token args {
:my $*GOAL := '';
:my $*FAKE_INFIX_FOUND := 0;
:dba('argument list')
[
| '(' ~ ')' <semiarglist>
......@@ -3151,6 +3159,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
token fake_infix {
<O('%item_assignment, :assoc<unary>, :fake<1>, :dba<adverb>')>
{ $*FAKE_INFIX_FOUND := 1 }
}
regex infixstopper {
......
This diff is collapsed.
......@@ -9,9 +9,11 @@ role Perl6::Metamodel::MROBasedMethodDispatch {
return %methods{$name}
}
}
my %submethods := $obj.HOW.submethod_table($obj);
if nqp::existskey(%submethods, $name) {
return %submethods{$name}
if nqp::can($obj.HOW, 'submethod_table') {
my %submethods := $obj.HOW.submethod_table($obj);
if nqp::existskey(%submethods, $name) {
return %submethods{$name}
}
}
!$no_fallback && nqp::can(self, 'find_method_fallback') ??
self.find_method_fallback($obj, $name) !!
......
......@@ -153,7 +153,7 @@ class Perl6::ModuleLoader does Perl6::ModuleLoaderVMConfig {
my $source := $fh.readall();
$fh.close();
#?endif
#?if jvm
#?if !parrot
my $fh := nqp::open(%chosen<pm>, 'r');
nqp::setencoding($fh, 'utf8');
my $source := nqp::readallfh($fh);
......
......@@ -227,7 +227,7 @@ class Perl6::World is HLL::World {
# Creates a new lexical scope and puts it on top of the stack.
method push_lexpad($/) {
# Create pad, link to outer and add to stack.
my $pad := QAST::Block.new( QAST::Stmts.new(), :node($/) );
my $pad := QAST::Block.new( QAST::Stmts.new( :node($/) ) );
if +@!BLOCKS {
$pad<outer> := @!BLOCKS[+@!BLOCKS - 1];
}
......@@ -365,7 +365,8 @@ class Perl6::World is HLL::World {
:op('loadbytecode'),
QAST::VM.new(
:parrot(QAST::SVal.new( :value('ModuleLoader.pbc') )),
:jvm(QAST::SVal.new( :value('ModuleLoader.class') ))
:jvm(QAST::SVal.new( :value('ModuleLoader.class') )),
:moar(QAST::SVal.new( :value('ModuleLoader.moarvm') ))
)),
QAST::Op.new(
:op('callmethod'), :name('load_module'),
......@@ -592,7 +593,7 @@ class Perl6::World is HLL::World {
:scope('lexical'), :name($name), :decl('var'),
:returns(%cont_info<bind_constraint>)
);
$block[0].push($var);
$block[0].unshift($var);
}
$block.symbol($name, :scope('lexical'), :type(%cont_info<bind_constraint>), :descriptor($descriptor));
......@@ -964,7 +965,8 @@ class Perl6::World is HLL::World {
# Also compile the candidates if this is a proto.
if $is_dispatcher {
for nqp::getattr($code, $routine_type, '$!dispatchees') {
my $past := nqp::getattr($_, $code_type, '$!compstuff')[0];
my $cs := nqp::getattr($_, $code_type, '$!compstuff');
my $past := $cs[0] unless nqp::isnull($cs);
if $past {
self.compile_in_context($past, $code_type);
}
......@@ -1134,9 +1136,11 @@ class Perl6::World is HLL::World {
$code_past[0].push(self.run_phasers_code($code, $block_type, 'ENTER'));
}
if nqp::existskey(%phasers, '!LEAVE-ORDER') || nqp::existskey(%phasers, 'POST') {
$code_past[+@($code_past) - 1] := QAST::Op.new(
:op('p6return'),
$code_past[+@($code_past) - 1]);
if nqp::getcomp('perl6').backend.name eq 'parrot' {
$code_past[+@($code_past) - 1] := QAST::Op.new(
:op('p6return'),
$code_past[+@($code_past) - 1]);
}
$code_past.has_exit_handler(1);
}
}
......@@ -1787,7 +1791,8 @@ class Perl6::World is HLL::World {
'bit_ops', 'math_ops', 'trans_ops', 'io_ops',
'obscure_ops', 'os', 'file', 'sys_ops',
'nqp_bigint_ops', 'nqp_dyncall_ops' ],
jvm => QAST::Op.new( :op('null') )));
jvm => QAST::Op.new( :op('null') ),
moar => QAST::Op.new( :op('null') )));
}
# Represents a longname after having parsed it.
......@@ -2392,7 +2397,8 @@ class Perl6::World is HLL::World {
QAST::VM.new( :pirop('get_class Ps'), QAST::SVal.new( :value('NQPLexPad') ) )
)
)),
:jvm(QAST::Op.new( :op('null') ))
:jvm(QAST::Op.new( :op('null') )),
:moar(QAST::Op.new( :op('null') ))
)));
}
}
......
......@@ -13,10 +13,10 @@ class Array { # declared in BOOTSTRAP
}
multi method at_pos(Array:D: $pos) is rw {
#?if jvm
#?if !parrot
if nqp::istype($pos, Num) && nqp::isnanorinf($pos) {
#?endif
#?if !jvm
#?if parrot
if nqp::isnanorinf($pos) {
#?endif
X::Item.new(aggregate => self, index => $pos).throw;
......
......@@ -37,7 +37,7 @@ my class Backtrace is List {
#?if parrot
self.new(nqp::getattr(nqp::decont($e), Exception, '$!ex').backtrace, $offset);
#?endif
#?if jvm
#?if !parrot
self.new(nqp::backtrace(nqp::getattr(nqp::decont($e), Exception, '$!ex')), $offset);
#?endif
}
......@@ -56,21 +56,25 @@ my class Backtrace is List {
next if nqp::isnull($sub);
my $code;
try {
$code = nqp::getcodeobj($sub);
$code := nqp::getcodeobj($sub);
$code := Any unless nqp::istype($code, Mu);
};
my $line = $bt[$_]<annotations><line>;
my $line = $bt[$_]<annotations><line>.Int;
my $file = $bt[$_]<annotations><file>;
next unless $line && $file;
# now *that's* an evil hack
next if $file eq 'src/gen/BOOTSTRAP.nqp' ||
$file eq 'src\\gen\\BOOTSTRAP.nqp';
$file eq 'src/gen/m-BOOTSTRAP.nqp' ||
$file eq 'src\\gen\\BOOTSTRAP.nqp' ||
$file eq 'src\\gen\\m-BOOTSTRAP.nqp';
last if $file eq 'src/stage2/gen/NQPHLL.nqp' ||
$file eq 'src\\stage2\\gen\\NQPHLL.nqp' ||
$file eq 'gen/parrot/stage2/NQPHLL.nqp' ||
$file eq 'gen\\parrot\\stage2\\NQPHLL.nqp' ||
$file eq 'gen/jvm/stage2/NQPHLL.nqp' ||
$file eq 'gen\\jvm\\stage2\\NQPHLL.nqp';
# XXX extend for moar
$file eq 'gen\\jvm\\stage2\\NQPHLL.nqp' ||
$file eq 'gen/moar/stage2/NQPHLL.nqp' ||
$file eq 'gen\\moar\\stage2\\NQPHLL.nqp';
my $subname = nqp::p6box_s(nqp::getcodename($sub));
$subname = '<anon>' if $subname.substr(0, 6) eq '_block';
$new.push: Backtrace::Frame.new(
......
......@@ -5,6 +5,7 @@ my role Baggy does QuantHash {
method default(--> Int) { 0 }
method keys { %!elems.values.map( {.key} ) }
method values { %!elems.values.map( {.value} ) }
method kv { %!elems.values.map( {.key, .value} ) }
method elems(--> Int) { %!elems.elems }
method total(--> Int) { [+] self.values }
method exists ($k --> Bool) { # is DEPRECATED doesn't work in settings
......
......@@ -7,9 +7,8 @@ my class Capture { # declared in BOOTSTRAP
nqp::bindattr(self, Capture, '$!list',