Commit a9c5af6b authored by Daniel Dehennin's avatar Daniel Dehennin

New upstream version 2016.08

parent 1c61537f
......@@ -107,6 +107,9 @@ E: bslaabs@gmail.com
N: Brian Gernhardt
E: benji@silverinsanity.com
N: Brian S. Julin
U: skids
N: Bruce Gray
U: util
E: bruce.gray@acm.org
......@@ -169,6 +172,15 @@ E: christoph@mksig.org
N: Christopher J. Madsen
E: perl@cjmweb.net
N: Claudio Ramirez
U: nxadm
U: El_Che
E: pub.claudio@gmail.com
N: Clifton Wood
U: Xliff
E: clifton.wood@gmail.com
N: Colin Kuskie
U: colink
E: ckuskie@sterling.net
......@@ -211,6 +223,10 @@ D: Architect emeritus (0.0.1-0.1.1)
E: dan@sidhe.org
W: http://www.sidhe.org/~dan/blog/
N: Daniel Green
U: MasterDuke17
E: ddgreen@gmail.com
N: Dave Rolsky
U: autarch
E: autarch@urth.org
......@@ -319,6 +335,10 @@ W: http://ingy.net/
S: Seattle, WA, USA
D: Make is() work like Perl 5; add .pm6 to extensions searched.
N: Itsuki Toyota
U: titsuki
E: titsuki@cpan.org
N: James E Keenan (Jim)
E: jkeenan@cpan.org
U: jkeenan
......@@ -771,6 +791,10 @@ E: thecrux@gmail.com
N: Vyacheslav Matjukhin
E: mmcleric@yandex-team.ru
N: Wenzel P. P. Peppmeyer
E: wenzel.peppmeyer@gmx.de
U: gfldex
N: Will "Coke" Coleda
U: coke
E: will@coleda.com
......
Build requirements (Installing from source)
For building Rakudo you need at least a C compiler, a "make" utility,
and Perl 5.8 or newer. To automatically obtain and build MoarVM
and Perl 5.10 or newer. To automatically obtain and build MoarVM
as well as NQP, you may also need a git client, which is also needed
for fetching the test suite.
......
......@@ -94,6 +94,7 @@ docs/announce/2016.05.md
docs/announce/2016.06.md
docs/announce/2016.07.1.md
docs/announce/2016.07.md
docs/announce/2016.08.md
docs/architecture.html
docs/architecture.svg
docs/ChangeLog
......@@ -459,7 +460,6 @@ t/harness6
tools/autounfudge.pl
tools/available-pm-names.pl6
tools/benchmark.pl
tools/build/check-versions.pl
tools/build/common_bootstrap_sources
tools/build/create-jvm-runner.pl
tools/build/create-moar-runner.pl
......
New in 2016.08
+ Fixes:
+ Numerous improvements to content of error messages and addition
of new previously-undetected warnings, such as on sinks and ... terms
+ Removed redeclaration error for anon subs
+ Concatenation/substr with strings constructed with repeat operator
no longer results in incorrect strings
+ Fixed error for unknown symbol in parametric type
+ Things that produce a Seq no longer get constant-folded, avoiding
bogus Seq exhaustion errors
+ where {} clause on unit sub MAIN no longer produces bogus errors
+ Fixed compilation and behaviour of :D on subsets
+ Assigning Nil to a :D variable now fails (unless its default is :D)
+ Fixed CURF's resolve generating the wrong repo-id
+ Fixed precomp file for Staging repo containing build path
+ Fixed merge global symbols failures when changing repositories
+ Fixed -Ilib and friends not overriding installed dependencies
+ Fixed <[a..z]> ranges breaking grapheme awareness
+ Fixed a race condition in Channel.Supply
+ Fixed an occasional deadlock when using the supply/react syntax
+ Fixed a race condition involving tearing down listening async sockets
+ start blocks now get their own fresh $! and $/
+ .squish, .unique, .repeated, and .grep now correctly pass on .is-lazy
+ Fixed segfault on "multi cross{}"
+ .sort stored in a Callable no longer incorrectly returns BOOTArray
+ Smartmatch with two signatures, only one of which has slurpy hash,
no longer produces spurious exception
+ @a.splice now returns array with correct descriptor
+ .rotor with negative gap that lands out of range now throws
+ Range.rotor with Rat arguments no longer crashes
+ .hash on Bag, Mix, BagHash, and MixHash types no longer stringifies keys
+ .abspath on filenames starting with '-' no longer results in empty string
+ generated setting file now has empty lines for those that were
skipped in the past, allowing to directly map the line in a setting
to the source code it was generated from
+ loop and repeat now properly self-sink
+ for { ... .map } now properly sinks
+ Backtrace::Frame.is-(hidden|routine) now returns Bool
+ Bool.Int now properly returns an Int
+ Starting the REPL with a module loading error, will now just exit
+ Names of phasers (such as BEGIN) will now be included in suggestions
+ Fixed loading of modules when a FileSystem repo doesn't actually exist
+ Fixed mis-scoping of blocks in s///
+ Closure clones are no longer double code-generated
+ Caller $/ is now propagated through deferral
+ Fixed inconsistent coersions to Bool
+ Fixed over-assuming optimization of R meta operator
+ Fixed endless recursion in Any::BIND-POS under certain conditions
+ Additions:
+ Str.samemark('') now returns self instead of failing
+ Test.pm now provides bail-out()
+ Implemented $?MODULE and ::?MODULE
+ Implemented CompUnit::Repository::Installation::installed
+ InstalledDistribution now gets returned where appropriate
+ returns in signatures of many builtins now marked as --> Nil
+ .min/.max can now be called on Hashes
+ Invocant marker (:) can now be used in bare signatures
+ Added X::Syntax::NonListAssociative exception type
+ Hash[Any].new.perl now roundtrips
+ Buf.push|append|unshift|prepend also allow Blob:D
+ .succ now increments additional 29 digit ranges, such as Thai digits
+ List.sum is now marked as nodal
+ Can now return Nil as a result of a Promise
+ Implemented :exists on multi-dim assoc subscript literals
+ Added PERL6_TEST_DIE_ON_FAIL env var in Test.pm6 to bail out of the
test suite on first failure
+ Efficiency:
+ Streamlined multiple internal code paths that may or may not
result in performance improvements in user code
+ Improved dynamic variable lookup (2x as fast)
+ Hash.AT-KEY is about 35% faster
+ Hash.ASSIGN-KEY about 2x as fast
+ Hash.DELETE-KEY about 2x as fast
+ Hash[Any,Any].AT-KEY about 20% faster
+ Hash[Any,Any].ASSIGN-KEY about 15% faster
+ Hash[Any,Any].BIND-KEY about 15% faster
+ Hash[Any,Any].EXISTS-KEY about 10% faster
+ Hash[Any,Any].DELETE-KEY 10% faster
+ Repeated calls on Bag.WHICH now 5x as fast
+ Backtrace creation 25% faster
+ .first/.first(:end) iteration is now about 10% faster
after testing 1000 elements
+ .minmax about 25% faster
+ .min/.max about 40% faster
+ min/max/minmax on native arrays is between 15x and 25x faster than
non-native equivalent
+ Array.splice() almost infinitely faster and is much easier on memory (no
longer copies anything but instead transplants internals)
+ Array.splice(offset,size) is now 20x to 40x faster for
small offsets and sizes
+ Array.splice(offset,size,@) is about 10x faster
+ 10% improvement to .map/for in special cases of one-argument block that
has a return signature that excludes Slips,
such as -> Int $_ --> Str { .Str }
+ Many Set/SetHash methods are now at least 5% faster
+ Coercing a MixHash/BagHash to a Mix/Bag is now 300x faster
+ Coercing a Bag/BagHash to Mix coercion is now 1000x faster
+ Coercing a SetHash to a Set is now 80x faster
New in 2016.07.1
+ Fixes:
+ `make DESTDIR` now correctly finds CompUnit::Repository::Staging
......
# Announce: Rakudo Perl 6 compiler, Release #102 (2016.08)
On behalf of the Rakudo development team, I’m very happy to announce the
August 2016 release of Rakudo Perl 6 #102. Rakudo is an implementation of
Perl 6 on the Moar Virtual Machine[^1].
This release implements the 6.c version of the Perl 6 specifications.
It includes bugfixes and optimizations on top of
the 2015.12 release of Rakudo, but no new features.
Upcoming releases in 2016 will include new functionality that is not
part of the 6.c specification, available with a lexically scoped
pragma. Our goal is to ensure that anything that is tested as part of the
6.c specification will continue to work unchanged. There may be incremental
spec releases this year as well.
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 changes in this release are outlined below:
New in 2016.08:
+ Fixes:
+ Numerous improvements to content of error messages and addition
of new previously-undetected warnings, such as on sinks and ... terms
+ Concatenation/substr with strings constructed with repeat operator
no longer results in incorrect strings
+ Fixed error for unknown symbol in parametric type
+ Fixed compilation and behaviour of :D on subsets
+ Assigning Nil to a :D variable now fails (unless its default is :D)
+ Fixed merge global symbols failures when changing repositories
+ Fixed -Ilib and friends not overriding installed dependencies
+ Fixed <[a..z]> ranges breaking grapheme awareness
+ Fixed a race condition in Channel.Supply
+ Fixed an occasional deadlock when using the supply/react syntax
+ Fixed a race condition involving tearing down listening async sockets
+ @a.splice now returns array with correct descriptor
+ Range.rotor with Rat arguments no longer crashes
+ .hash on Bag, Mix, BagHash, and MixHash types no longer stringifies keys
+ .abspath on filenames starting with '-' no longer results in empty string
+ loop and repeat now properly self-sink
+ for { ... .map } now properly sinks
+ Bool.Int now properly returns an Int
+ Starting the REPL with a module loading error, will now just exit
+ Fixed loading of modules when a FileSystem repo doesn't actually exist
+ Additions:
+ Str.samemark('') now returns self instead of failing
+ Test.pm now provides bail-out()
+ Added PERL6_TEST_DIE_ON_FAIL env var in Test.pm6 to bail out of the
test suite on first failure
+ Implemented $?MODULE and ::?MODULE
+ Implemented CompUnit::Repository::Installation::installed
+ .min/.max can now be called on Hashes
+ Invocant marker (:) can now be used in bare signatures
+ Added X::Syntax::NonListAssociative exception type
+ Buf.push|append|unshift|prepend also allow Blob:D
+ .succ now increments additional 29 digit ranges, such as Thai digits
+ Implemented :exists on multi-dim assoc subscript literals
+ Efficiency:
+ Improved dynamic variable lookup (2x as fast)
+ Hash.AT-KEY is about 35% faster
+ Hash.ASSIGN-KEY about 2x as fast
+ Hash.DELETE-KEY about 2x as fast
+ Hash[Any,Any].AT-KEY about 20% faster
+ Hash[Any,Any].ASSIGN-KEY about 15% faster
+ Hash[Any,Any].BIND-KEY about 15% faster
+ Hash[Any,Any].EXISTS-KEY about 10% faster
+ Hash[Any,Any].DELETE-KEY 10% faster
+ Repeated calls on Bag.WHICH now 5x as fast
+ Backtrace creation 25% faster
+ .first/.first(:end) iteration is now about 10% faster
after testing 1000 elements
+ .minmax about 25% faster
+ .min/.max about 40% faster
+ min/max/minmax on native arrays is between 15x and 25x faster than
non-native equivalent
+ Array.splice() almost infinitely faster and is much easier on memory (no
longer copies anything but instead transplants internals)
+ Array.splice(offset,size) is now 20x to 40x faster for
small offsets and sizes
+ Array.splice(offset,size,@) is about 10x faster
+ 10% improvement to .map/for in special cases of one-argument block that
has a return signature that excludes Slips,
such as -> Int $_ --> Str { .Str }
+ Many Set/SetHash methods are now at least 5% faster
+ Coercing a MixHash/BagHash to a Mix/Bag is now 300x faster
+ Coercing a Bag/BagHash to Mix coercion is now 1000x faster
+ Coercing a SetHash to a Set is now 80x faster
These are only some of the changes in this release. For a more
detailed list, see “docs/ChangeLog”.
The following people contributed to this release:
Zoffix Znet, Wenzel P. P. Peppmeyer, Elizabeth Mattijsen, Pawel Murias,
Jonathan Worthington, Altai-man, Larry Wall, Tom Browder, Will "Coke" Coleda,
Jan-Olof Hendig, Stefan Seifert, Moritz Lenz, Itsuki Toyota,
Christopher Bottoms, Aleks-Daniel Jakimenko-Aleksejev, Christian Bartolomäus,
Sterling Hanenkamp, Timo Paulssen, Steve Mynott, Claudio Ramirez, LemonBoy,
Brian S. Julin, Clifton Wood, Daniel Green, Brian Duggan, Nick Logan,
LE Manh Cuong, Pepe Schwarz, Daniel Dehennin, cognominal, David Warring,
LLFourn, smls, Jonathan Stowe, Jimmy Zhuo, Brent Laabs, Trey Harris, nsvedberg,
Bill Barry, 0racle, dmaestro, Eike Frost, ab5tract
Regrettably, a deficiency has been discovered in the contributor gathering
script, where it silently left out contributors to perl6/doc repository, if
the release manager did not have it checked out at a specific location. Due to
this, those contributors very likely have been accidentally left out from
previous announcements. Since Christmas 2015, the following people contributed
to our ever-improving documentation:
Wenzel P. P. Peppmeyer, Zoffix Znet, Jan-Olof Hendig, Tom Browder,
Aleks-Daniel Jakimenko-Aleksejev, Altai-man, Jonathan Stowe, Josh Soref,
Will "Coke" Coleda, Steve Mynott, Elizabeth Mattijsen, Brian S. Julin,
Daniel Green, Itsuki Toyota, Moritz Lenz, Brock Wilcox, Simon Ruderich,
Christopher Bottoms, raiph, Sterling Hanenkamp, Ahmad M. Zawawi, Daniel Perrett,
Claudio Ramirez, David Brunton, Jonathan Worthington, Jake Russo,
Salvador Ortiz, Siavash Askari Nasr, Bruce Gray, jjatria, John Gabriele,
Paul Cochrane, Jim Davis, Timo Paulssen, sylvarant, David H. Adler,
Sylvain Colinet, Donald Hunter, LLFourn, Shlomi Fish, Tobias Leich,
Eric de Hont, Mathieu Gagnon, parabolize, Brian Duggan, Jason Cole, dogbert17,
Fritz Zaucker, cognominal, Marcel Timmerman, Larry Wall, Dave Olszewski,
Dabrien 'Dabe' Murphy, smls, Emeric54, ab5tract, Jeffrey Goff, VZ, okaoka,
Steve Bertrand, ianmcb, Daniel Dehennin, vinc17fr, Dave Rolsky, Matt Oates,
Trey Harris, Nat, Altai-ch, nsvedberg, Bill Barry, fireartist, 0racle,
Robert Newbould, Coleoid, Brad Gilbert, James ( Jeremy ) Carman,
Stéphane Payrard, Dale Evans, Nick Logan, thundergnat, dmaestro, Carl Masak,
Eike Frost, Martin Dørum Nygaard, gotoexit, Neil Shadrach, Stefan Seifert
If you would like to contribute or find out more information, visit
<http://perl6.org>, <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 (#103), is tentatively scheduled for 2016-09-17.
A list of the other planned release dates is available in the
“docs/release_guide.pod” file.
The development team appreciates feedback! If you’re using Rakudo, do
get back to us. Questions, comments, suggestions for improvements, cool
discoveries, incredible hacks, or any other feedback -- get in touch with
us through (the above-mentioned) mailing list or IRC channel. Enjoy!
Please note that recent releases have known issues running on the JVM.
We are working to get the JVM backend working again but do not yet have
an estimated delivery date.
[^1]: See <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.
Not much more.
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.
......@@ -18,8 +18,7 @@ Note that we are trying very hard to ensure there are no backward
compatibility issues post Christmas. As such, we may end up delaying
some releases to ensure any compatibility issues are resolved.
2016-08-20 Rakudo #102 (Zoffix; but space open for anyone wanting to learn to do a release)
2016-09-17 Rakudo #103
2016-09-17 Rakudo #103 (Zoffix; but space open for anyone wanting to learn to do a release)
2016-10-15 Rakudo #104
2016-11-19 Rakudo #105
2016-12-17 Rakudo #106
......@@ -76,8 +75,8 @@ markdown format. You can often use the previous release’s file as a
starting point, updating the release number, version information, name,
etc. as appropriate.
$ git add docs/announce/YYYY.MM.md
$ git commit docs
git add docs/announce/YYYY.MM.md
git commit docs
There is a helper script C<tools/create-release-announcement.pl> that
will create a basic release announcement for you based on the state
......@@ -101,13 +100,13 @@ in a year not reflected by the file’s copyright notice.)
Update Rakudo’s leap-second tables:
$ perl tools/update-tai-utc.pl
perl tools/update-tai-utc.pl
If a new leap second has been announced, F<src/core/Rakudo/Internals.pm>
will be modified, so commit the new version. B<Note:> be sure to double
check the modifications are correct before committing.
$ git commit src
git commit src
But probably there won’t be any new leap seconds, in which case the file
will be unchanged.
......@@ -121,9 +120,9 @@ As the actual release date nears, review the git log history
to see if any additional items need to be added to the ChangeLog.
This can be conveniently done with
$ git log --since=yyyy-mm-dd --reverse # find commits
git log --since=yyyy-mm-dd --reverse # find commits
# update ChangeLog
$ git commit docs/ChangeLog # commit changes
git commit docs/ChangeLog # commit changes
=item 4.
......@@ -135,17 +134,17 @@ new release is significant.
Include a list of contributors since the last release in the announcement.
You can get an automatically generated list by running
$ ./perl6 tools/contributors.pl6
./perl6 tools/contributors.pl6
To obtain all contributors, ensure you have all supporting repositories
checked out, before running (this is can be achieved by building rakudo
checked out, before running (this can be achieved by building rakudo
and running a spectest). Please check the result manually for duplicates
and other errors. Note that you may not be able to run your system perl6
in a local checkout, you may have to wait until you build in this
directory and use C<./perl6>.
$ git add docs/announce/YYYY.MM.md
$ git commit docs
git add docs/announce/YYYY.MM.md
git commit docs
=item 5.
......@@ -153,7 +152,7 @@ Update the release dates and names at the bottom of this file
(F<docs/release_guide.pod>). Also improve these instructions if
you find any steps that are missing.
$ git commit docs/release_guide.pod
git commit docs/release_guide.pod
=item 6.
......@@ -171,43 +170,43 @@ file to do that.
Go back to the Rakudo repository, and update the NQP dependency:
$ echo YYYY.MM > tools/build/NQP_REVISION
$ git commit -m '[release] bump NQP revision' tools/build/NQP_REVISION
echo YYYY.MM > tools/build/NQP_REVISION
git commit -m '[release] bump NQP revision' tools/build/NQP_REVISION
=item 9.
Enter the new version into the F<VERSION> file, and commit the changes:
$ echo YYYY.MM > VERSION
$ git commit -m '[release] bump VERSION' VERSION
echo YYYY.MM > VERSION
git commit -m '[release] bump VERSION' VERSION
=item 10.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
git status
git push
=item 11.
Make sure everything compiles and runs from a known clean state:
$ make realclean
$ perl Configure.pl --gen-moar --backends=ALL
$ make
$ make install
$ make test
make realclean
perl Configure.pl --gen-moar --backends=ALL
make
make install
make test
=item 12.
Install Inline::Perl5 so stresstest can use it.
$ git clone https://github.com/tadzik/panda
$ export PATH=`pwd`/install/bin:$PATH
$ cd panda; perl6 bootstrap.pl
$ cd ..
$ export PATH=`pwd`/install/share/perl6/site/bin:$PATH
$ panda install Inline::Perl5
git clone https://github.com/tadzik/panda
export PATH=`pwd`/install/bin:$PATH
cd panda; perl6 bootstrap.pl
cd ..
export PATH=`pwd`/install/share/perl6/site/bin:$PATH
panda install Inline::Perl5
=item 13.
......@@ -215,16 +214,16 @@ Now run the stresstests for stable and lastest specs. The following commands
assume you already have a roast checkout in C<t/spec>. If not, run
C<make spectest> (you can abort it after the repository is retrieved).
$ (cd t/spec && git checkout master) # test latest language spec
$ make stresstest
$ (cd t/spec && git checkout 6.c-errata) # test stable language spec
$ make stresstest
(cd t/spec && git checkout master) # test latest language spec
make stresstest
(cd t/spec && git checkout 6.c-errata) # test stable language spec
make stresstest
There are many tests to run for the stresstest target. If
you have a machine with multiple CPU cores, you may want to
execute that last as
$ TEST_JOBS=4 make stresstest
TEST_JOBS=4 make stresstest
where 4 is the number of CPU cores. This should make the
total time to execute all of the tests dramatically less.
......@@ -264,8 +263,8 @@ If there are any problems, fix them and go back to step 11.
Tag the release by its release month ("YYYY.MM") and its code name.
$ git tag -u <email> -s -a -m"tag release #nnn" YYYY.MM # e.g., 2013.08
$ git push --tags
git tag -u <email> -s -a -m "tag release #nnn" YYYY.MM # e.g., 2013.08
git push --tags
The C<-s> tells git to sign the release with your PGP/GPG key, so it will
likely ask you for the passphrase of your secret key.
......@@ -274,17 +273,23 @@ If you have no PGP key, you might need to
L<create one first|https://fedoraproject.org/wiki/Creating_GPG_Keys>. Should
that prove impossible, you can omit the C<-s> from the command line.
Be sure to upload your public key to your GitHub account, so that GitHub
displays I<Verified> button next to the tag. You can do that by running
C<< gpg --armor --export <email> >> and adding the output as the
I<New GPG Key> at the bottom of the
L<< settings -> keys page|https://github.com/settings/keys >>
=item 17.
Sign the tarball with your PGP key:
$ gpg -b --armor rakudo-YYYY.MM.tar.gz
gpg -b --armor rakudo-YYYY.MM.tar.gz
=item 18.
Upload the tarball and the signature to L<http://rakudo.org/downloads/rakudo>:
$ scp rakudo-YYYY.MM.tar.gz rakudo-YYYY.MM.tar.gz.asc \
scp rakudo-YYYY.MM.tar.gz rakudo-YYYY.MM.tar.gz.asc \
rakudo@rakudo.org:public_html/downloads/rakudo/
If you do not have permissions for that, ask one of (pmichaud, jnthn, FROGGS,
......@@ -413,6 +418,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2016-06-18 Rakudo #100 "2016.06" (Zoffix)
2016-07-16 Rakudo #101 "2016.07" (Zoffix)
2016-07-18 2016.07.1 (Zoffix)
2016-08-20 Rakudo #102 "2016.08" (Zoffix)
=head1 COPYRIGHT
......
......@@ -321,7 +321,7 @@ my role Native[Routine $r, $libname where Str|Callable|List] {
X::TypeCheck::Argument.new(
:objname($.name),
:arguments(args.list.map(*.^name))
:signature(" Expected: " ~ try $r.signature.perl),
:signature(try $r.signature.gist),
).throw
}
......
......@@ -529,6 +529,7 @@ class Reporter::Console does Reporter {
my $header = sprintf '===( %7d;%d', $!tests, $now - $start;
my @items = @!active.map(*.summary);
my $ruler = ($header, |@items).join(' ') ~ ')===';
$ruler = $ruler.substr(0,70) if $ruler.chars > 70;
$handle.print($!formatter.format-return($ruler));
}
multi receive('update', Str $name, Str $header, Int $number, Int $plan) {
......
......@@ -5,6 +5,7 @@ unit module Test;
# settable from outside
my int $perl6_test_times = ?%*ENV<PERL6_TEST_TIMES>;
my int $die_on_fail = ?%*ENV<PERL6_TEST_DIE_ON_FAIL>;
# global state
my @vars;
......@@ -17,7 +18,6 @@ my int $todo_upto_test_num;
my $todo_reason;
my $num_of_tests_planned;
my int $no_plan;
my int $die_on_fail;
my num $time_before;
my num $time_after;
......@@ -56,11 +56,6 @@ our sub todo_output is rw {
$todo_output
}
# you can call die_on_fail; to turn it on and die_on_fail(0) to turn it off
sub die_on_fail(int $fail=1) {
$die_on_fail = $fail;
}
# "plan 'no_plan';" is now "plan *;"
# It is also the default if nobody calls plan at all
multi sub plan($number_of_tests) is export {
......@@ -221,6 +216,12 @@ multi sub cmp-ok(Mu $got, $op, Mu $expected, $desc = '') is export {
$ok;
}
sub bail-out ($desc?) is export {
$output.put: join ' ', 'Bail out!', ($desc if $desc);
$done_testing_has_been_run = 1;
exit 255;
}
multi sub is_approx(Mu $got, Mu $expected, $desc = '') is export {
DEPRECATED('is-approx'); # Remove at 20161217 release (6 months from today)
......@@ -586,8 +587,12 @@ sub proclaim($cond, $desc is copy ) {
!! "\nFailed test at {$caller.file} line {$caller.line}";
}
die "Test failed. Stopping test"
if !$cond && nqp::iseq_i($die_on_fail,1) && !$todo_reason;
if !$cond && !$todo_reason && nqp::iseq_i($die_on_fail,1) {
_diag 'Test failed. Stopping test suite, because'
~ ' PERL6_TEST_DIE_ON_FAIL environmental variable is set'
~ ' to a true value.';
exit 255;
}
# must clear this between tests
$todo_reason = '' if $todo_upto_test_num == $num_of_tests_run;
......@@ -623,7 +628,6 @@ sub _init_vars {
$todo_reason = '';
$num_of_tests_planned = Any;
$no_plan = 1;
$die_on_fail = 0;
$time_before = NaN;
$time_after = NaN;
$done_testing_has_been_run = 0;
......@@ -637,7 +641,6 @@ sub _push_vars {
$todo_reason,
$num_of_tests_planned,
$no_plan,
$die_on_fail,
$time_before,
$time_after,
$done_testing_has_been_run,
......@@ -652,7 +655,6 @@ sub _pop_vars {
$todo_reason,
$num_of_tests_planned,
$no_plan,
$die_on_fail,
$time_before,
$time_after,
$done_testing_has_been_run,
......
This diff is collapsed.
......@@ -60,19 +60,8 @@ class Perl6::Compiler is HLL::Compiler {
method interactive(*%adverbs) {
my $p6repl;
try {
my $repl-class := self.eval('REPL', :outer_ctx(nqp::null()), |%adverbs);
$p6repl := $repl-class.new(self, %adverbs);
CATCH {
nqp::say("Couldn't load Rakudo REPL.pm: $_");
nqp::say("Falling back to nqp REPL.");
my $super := nqp::findmethod(HLL::Compiler, 'interactive');
my $result := $super(self, :interactive(1), |%adverbs);
return $result;
}
}
my $repl-class := self.eval('REPL', :outer_ctx(nqp::null()), |%adverbs);
$p6repl := $repl-class.new(self, %adverbs);
my $stdin := nqp::getstdin();
my $encoding := ~%adverbs<encoding>;
if $encoding && $encoding ne 'fixed_8' {
......@@ -108,20 +97,22 @@ class Perl6::Compiler is HLL::Compiler {
-p same as -n, but also print \$_ at the end of lines
-I path adds the path to the module search path
-M module loads the module prior to running the program
--target=[stage] specify compilation stage to emit
--optimize=[level] use the given level of optimization (0..3)
--encoding=[mode] specify string encoding mode
-o, --output=[name] specify name of output file
--target=stage specify compilation stage to emit
--optimize=level use the given level of optimization (0..3)
--encoding=mode specify string encoding mode
-o, --output=name specify name of output file
-v, --version display version information
--stagestats display time spent in the compilation stages
--ll-exception display a low level backtrace on errors
--profile=kind write profile information to a file (MoarVM)
instrumented - performance measurements
--profile[=kind] write profile information to an HTML file (MoarVM)
instrumented - performance measurements (default)
heap - record heap snapshots after every
garbage collector run
--profile-filename provide a different filename; instrumented
profiles may be written to .json files, too.
--doc=[module] Use Pod::To::[module] to render inline documentation.
--profile-filename=name
provide a different filename; if the name ends in
.json, instrumented profiles will be written as
JSON instead of HTML
--doc=module use Pod::To::[module] to render inline documentation
Note that only boolean single-letter options may be bundled.
......
......@@ -274,13 +274,17 @@ role STD {
self.typed_panic('X::Syntax::Malformed', :$what);
}
method missing_block() {
my $marked := self.MARKED('ws');
my $pos := $marked ?? $marked.from !! self.pos;
if $*BORG<block> {
my $pos := self.pos;
self.'!clear_highwater'();
self.'!cursor_pos'($*BORG<block>.CURSOR.pos);
self.typed_sorry('X::Syntax::BlockGobbled', what => ($*BORG<name> // ''));
self.'!cursor_pos'($pos);
self.missing("block (apparently claimed by " ~ ($*BORG<name> ?? "'" ~ $*BORG<name> ~ "'" !! "expression") ~ ")");
} elsif nqp::substr(self.orig(), $pos - 1, 1) eq '}' {
self.missing("block (whitespace needed before curlies taken as a hash subscript?)");
} elsif %*MYSTERY {
self.missing("block (taken by some undeclared routine?)");
} else {
......@@ -303,6 +307,10 @@ role STD {
self.typed_panic('X::Syntax::NonAssociative', :left(~$left), :right(~$right));
}
method EXPR_nonlistassoc($cur, $left, $right) {
self.typed_panic('X::Syntax::NonListAssociative', :left(~$left), :right(~$right));
}
# "when" arg assumes more things will become obsolete after Perl 6 comes out...
method obs($old, $new, $when = 'in Perl 6') {
$*W.throw(self.MATCH(), ['X', 'Obsolete'],
......@@ -2284,7 +2292,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
}
# Install $?PACKAGE, $?ROLE, $?CLASS, and :: variants as needed.
# Install $?PACKAGE, $?MODULE, $?ROLE, $?CLASS, and :: variants as needed.
my $curpad := $*W.cur_lexpad();
unless $curpad.symbol('$?PACKAGE') {
$*W.install_lexical_symbol($curpad, '$?PACKAGE', $*PACKAGE);
......@@ -2297,7 +2305,11 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
$*W.install_lexical_symbol($curpad, '::?CLASS',
$*W.pkg_create_mo($/, $*W.resolve_mo($/, 'generic'), :name('::?CLASS')));
}
elsif $*PKGDECL ne 'package' && $*PKGDECL ne 'module' {
elsif $*PKGDECL eq 'module' {
$*W.install_lexical_symbol($<