Commit eca46c9d authored by Dominique Dumont's avatar Dominique Dumont

Imported Upstream version 2016.06

parent 55280122

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

This diff is collapsed.
New in 2016.06
+ Fixes:
+ Arrays with holes (e.g. from :delete) now correctly iterate/auto-vivify
+ Hash.keyof now correctly returns Str(Any)
+ Precompilation from a debug Perl 6 now uses "normal" Perl 6 executor
+ Inf,NaN,-Inf now can be coerced to Rat, and back to Num
+ Creating an Enum from a List/Range no longer warns
+ Precompilation on file systems with coarse timestamps no longer fails
+ An issue with reverse dependencies of installed modules was fixed
+ Fixed issue with comparing v6 and v6.c Version objects
+ Fixed ≅ ignoring the signs of compared numbers
+ Additions:
+ Add default for CompUnit::PrecompilationRepository.precompile(:source-name)
+ The "is-approx" sub from Test now allows for relative/absolute tolerance
+ The "cmp-ok" sub from Test now can take any infix as Str, even custom ones
+ A fail in a custom BUILD will now be returned, rather than thrown
+ use MONKEY-WRENCH and use MONKEY-BARS are now reserved names for future use
+ Efficiency:
+ .map between 10% and 30% faster
+ .unique, .repeated and .squish 10% to 20% faster
+ gather/take about 10% faster
+ Basic object creation (using either .new or .bless) now up to 3x faster
+ (+@a), (*@a) and (**@a) signature handling between 20% and 4x faster
+ Iterating List/Array now uses less memory and is faster
+ All routines now have less overhead, thanks to improved implementation of
return handlers (including those that do not use return)
+ return, next, last, and redo are now all faster
+ infix:<,> about 40% faster
+ numerous other smaller or edge-case speed improvements
+ Deprecations:
+ The "is_approx" sub (note underscore) from Test
New in 2016.05
+ Fixes:
+ Fix EVAL during precompilation
......
# Announce: Rakudo Perl 6 compiler, Release #100 (2016.06)
On behalf of the Rakudo development team, I’m very happy to announce the
June 2016 release of Rakudo Perl 6 #100. 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/>.
Notable changes in this release are outlined below:
+ Fixes:
+ Arrays with holes (e.g. from :delete) now correctly iterate/auto-vivify
+ Precompilation on file systems with coarse timestamps no longer fails
+ An issue with reverse dependencies of installed modules was fixed
+ Additions:
+ The "is-approx" sub from Test now allows for relative/absolute tolerance
+ A fail in a custom BUILD will now be returned, rather than thrown
+ Efficiency:
+ .map between 10% and 30% faster
+ .unique, .repeated and .squish 10% to 20% faster
+ gather/take about 10% faster
+ Basic object creation (using either .new or .bless) now up to 3x faster
+ (+@a), (*@a) and (**@a) signature handling between 20% and 4x faster
+ All routines now have less overhead, thanks to improved implementation of
return handlers (including those that do not use return)
+ Deprecations:
+ The "is_approx" sub (note underscore) from Test
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:
Elizabeth Mattijsen, Jonathan Worthington, Jan-Olof Hendig, Zoffix Znet, Josh Soref, Pawel Murias, Wenzel P. P. Peppmeyer, Aleks-Daniel Jakimenko-Aleksejev, Tom Browder, Daniel Green, Jonathan Stowe, titsuki, Stefan Seifert, Pepe Schwarz, Christian Bartolomäus, Will "Coke" Coleda, Steve Mynott, Tobias Leich, Larry Wall, Timo Paulssen, Brock Wilcox, Moritz Lenz, Bruce Gray, raiph, LLFourn, Bart Wiegmans, Jimmy Zhuo, Steve Bertrand, Brad Gilbert, diakopter, Nick Logan, Sterling Hanenkamp, Carl Masak, Rob Hoelz, David H. Adler, David Warring, ab5tract, Christopher Bottoms
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 (#101), is tentatively scheduled for 2016-07-16.
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.
......@@ -31,7 +31,6 @@
- [p6recont_ro](#p6recont_ro)
- [p6reprname](#p6reprname)
- [p6return](#p6return)
- [p6routinereturn](#p6routinereturn)
- [p6scalarfromdesc](#p6scalarfromdesc)
- [p6setautothreader](#p6setautothreader)
- [p6setbinder](#p6setbinder)
......@@ -181,9 +180,6 @@ Returns the name of the REPR underlying $obj.
## p6return
* p6return(Mu $value)
## p6routinereturn
* p6routinereturn(Mu $value)
## p6scalarfromdesc
* p6scalarfromdesc(Mu $container-descriptor)
......@@ -242,4 +238,3 @@ Checks if $return-value satisifies the declared return type of $routine, letting
## p6var
* p6var(Mu $variable)
......@@ -18,14 +18,24 @@ 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-05-21 Rakudo #99 hoelzro
2016-06-18 Rakudo #100 ZoffixW
2016-07-16 Rakudo #101
2016-08-20 Rakudo #102
2016-09-17 Rakudo #103
2016-10-15 Rakudo #104
2016-11-19 Rakudo #105
2016-12-17 Rakudo #106
2017-01-21 Rakudo #107
2017-02-18 Rakudo #108
2017-03-18 Rakudo #109
2017-04-15 Rakudo #110
2017-05-20 Rakudo #111
2017-06-17 Rakudo #112
2017-07-15 Rakudo #113
2017-08-19 Rakudo #114
2017-09-16 Rakudo #115
2017-10-21 Rakudo #116
2017-11-18 Rakudo #117
2017-12-16 Rakudo #118
(More planned dates can be generated with F<tools/release-dates.pl>).
......@@ -55,7 +65,7 @@ any occurrences, remove the code and make sure the spectest is still ok.
Review the RT queue for tickets that might need resolving
prior to the release, addressing them as needed. “Tickets
that need resolving” is left your discretion. Any problem
that need resolving” is left to your discretion. Any problem
that has a large impact on users is worth addressing either
as a fix or as prominent documentation (the README and/or
the release announcement).
......@@ -148,7 +158,9 @@ releases are typically handled by a separate team.
=item 7.
Create an NQP release with the same C<YYYY.MM> version number
as Rakudo. Follow NQP’s C<docs/release_guide.pod> file to do that.
as Rakudo. Follow NQP’s
L<docs/release_guide.pod|https://github.com/perl6/nqp/blob/master/docs/release_guide.pod>
file to do that.
=item 8.
......@@ -391,6 +403,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2016-03-23 Rakudo #97 "2016.03" (Coke)
2016-04-19 Rakudo #98 "2016.04" (Coke)
2016-05-21 Rakudo #99 "2016.05" (hoelzro)
2016-06-18 Rakudo #100 "2016.06" (Zoffix)
=head1 COPYRIGHT
......
......@@ -416,43 +416,4 @@ sub cglobal($libname, $symbol, $target-type) is export is rw {
}
sub EXPORT(|) {
use NQPHLL:from<NQP>;
my role HAS-decl-grammar {
# This is a direct copy of scope_declarator:sym<has>, besides the uppercase spelling.
token scope_declarator:sym<HAS> {
:my $*LINE_NO := HLL::Compiler.lineof(self.orig(), self.from(), :cache(1));
<sym>
:my $*HAS_SELF := 'partial';
:my $*ATTR_INIT_BLOCK;
<scoped('has')>
}
}
my role HAS-decl-actions {
method scope_declarator:sym<HAS>(Mu $/) {
# my $scoped := $<scoped>.ast;
my Mu $scoped := nqp::atkey(nqp::findmethod($/, 'hash')($/), 'scoped').ast;
my Mu $attr := $scoped.ann('metaattr');
if $attr.package.REPR ne 'CStruct'
&& $attr.package.REPR ne 'CPPStruct'
&& $attr.package.REPR ne 'CUnion' {
die "Can only use HAS-scoped attributes in classes with repr CStruct, CPPStruct and CUnion, not " ~ $attr.package.REPR;
}
if nqp::objprimspec($attr.type) != 0 {
warn "Useless use of HAS scope on an attribute with type { $attr.type.^name }.";
}
# Mark $attr as inlined, that's why we do all this.
nqp::bindattr_i(nqp::decont($attr), $attr.WHAT, '$!inlined', 1);
# make $scoped
nqp::bindattr(nqp::decont($/), $/.WHAT, '$!made', $scoped);
}
}
my Mu $MAIN-grammar := nqp::atkey(%*LANG, 'MAIN');
my Mu $MAIN-actions := nqp::atkey(%*LANG, 'MAIN-actions');
nqp::bindkey(%*LANG, 'MAIN', $MAIN-grammar.HOW.mixin($MAIN-grammar, HAS-decl-grammar));
nqp::bindkey(%*LANG, 'MAIN-actions', $MAIN-actions.HOW.mixin($MAIN-actions, HAS-decl-actions));
{}
}
# vim:ft=perl6
......@@ -194,23 +194,36 @@ multi sub cmp-ok(Mu $got, $op, Mu $expected, $desc = '') is export {
$time_after = nqp::time_n;
$got.defined; # Hack to deal with Failures
my $ok;
if $op ~~ Callable ?? $op !! try EVAL "&infix:<$op>" -> $matcher {
# the three labeled &CALLERS below are as follows:
# #1 handles ops that don't have '<' or '>'
# #2 handles ops that don't have '«' or '»'
# #3 handles all the rest by escaping '<' and '>' with backslashes.
# Note: #3 doesn't eliminate #1, as #3 fails with '<' operator
my $matcher = $op ~~ Callable ?? $op
!! &CALLERS::("infix:<$op>") #1
// &CALLERS::("infix:«$op»") #2
// &CALLERS::("infix:<$op.subst(/<?before <[<>]>>/, "\\", :g)>"); #3
if $matcher {
$ok = proclaim(?$matcher($got,$expected), $desc);
if !$ok {
diag "expected: '{$expected // $expected.^name}'";
diag " matcher: '$matcher'";
diag " matcher: '{$matcher.?name || $matcher.^name}'";
diag " got: '$got'";
}
}
else {
$ok = proclaim(False, $desc);
diag "Could not use '$op' as a comparator";
diag "Could not use '$op.perl()' as a comparator.";
}
$time_before = nqp::time_n;
$ok;
}
multi sub is_approx(Mu $got, Mu $expected, $desc = '') is export {
DEPRECATED('is-approx'); # Remove at 20161217 release (6 months from today)
$time_after = nqp::time_n;
my $tol = $expected.abs < 1e-6 ?? 1e-5 !! $expected.abs * 1e-6;
my $test = ($got - $expected).abs <= $tol;
......@@ -224,40 +237,66 @@ multi sub is_approx(Mu $got, Mu $expected, $desc = '') is export {
}
multi sub is-approx(Numeric $got, Numeric $expected, $desc = '') is export {
is-approx($got, $expected, 1e-6, $desc);
is-approx-calculate($got, $expected, 1e-5, Nil, $desc);
}
multi sub is-approx(Numeric $got, Numeric $expected, Numeric $tol, $desc = '') is export {
$time_after = nqp::time_n;
die "Tolerance must be a positive number greater than zero" unless $tol > 0;
my $abs-diff = ($got - $expected).abs;
my $abs-max = max($got.abs, $expected.abs);