Commit 75294a6b authored by Dominique Dumont's avatar Dominique Dumont

New upstream version 2017.03

parent b2eb8909
......@@ -61,6 +61,80 @@ very basic guidelines:
* Perl 5 code (part of the build system) should `use strict; use warnings;`
and loosely follow [perlstyle](http://perldoc.perl.org/perlstyle.html).
## Commit messages
How to write a good **and** useful commit message. Commit messages are where you
tell the what, why and how of your commit to others.
The subject/title of a commit should 50 or less characters ideally. The absolute
maximum is 72. Title's usually will tell what you did. You should almost always
have a body except in the case of the most trivial changes. These style guidelines
are best practices, but use your judgment. You may want to fit 100 characters
into the commit title to get in all the details, but `git` will cut it off if
the window is not wide enough, and github.com will truncate it at the end if it
is too long. The commit body is where you can go into detail about these things,
the subject should be easy to read at a glance what you did.
A good commit is one where months from now you be able to read
this commit and understand what you did and why you did it.
Don't make a commit that only says `Fix RT #130979` because when the time to do
the monthly changelog comes, someone will need to look up the ticket.
And then usually wade through several replies on that ticket to figure out what
the problem was and at the end I'm often unsure what the ACTUAL problem was
that got fixed in the commit, not just the RT number.
If somebody is trying to find a recent commit that affected, say, `infix:<xx>`,
would they be able to find it by searching through the subject and body for
`xx`?
The body should tell the reader:
* **What** you did/changed
* **Why** you did it
* Background info
Don't end commit subjects with periods for ease of viewing a commit log by
title. If there are multiple
sentences in the subject, you can have a period, but do not have one at the end
of the commit. Example: `Fix foo and bar. This is good because reasons`
This makes them look better and easier to read in shortlog/oneline form.
If you fixed a ticket, or the commit relates to a specific ticket, please
mention the ticket in the title or the body as `RT #12345`.
If there was an IRC conversation that can give some background or useful information,
you can link to it by visiting [irclog.perlgeek.de](https://irclog.perlgeek.de/perl6/) and
linking the link provided by the timestamps on the left side of the page.
Put links on their own line if they are going to go over the 76 character maximum
for the body text.
#### Sample/Tutorial Commit
```git
Capitalized, short (50 chars or less) summary
More detailed explanatory text. The commit relates to a ticket,
please write it as RT #12345. Wrap at about 72 characters, but never above
76, unless it is a URL or code that cannot be separated.
The blank line separating the summary from the body is critical;
tools like rebase can get confused if you run the two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a
single space.
- Indent the lines following the bullet the same as the line above.
NOT like this.
```
Above faux commit adapted from [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
, which also has some more information on how to make a good commit.
## Have Fun!
Enjoy the ride, and please join our IRC channels to meet the great community.
......@@ -279,6 +279,11 @@ E: felix@herrmann-koenigsberg.de
N: Fernando Brito
E: email@fernandobrito.com
N: Fernando Corrêa de Oliveira
U: FCO
E: fco@cpan.org
S: Rio de Janeiro, RJ, Brazil
N: Filip Sergot
E: filip@sergot.pl
......@@ -580,9 +585,6 @@ D: Test infrastructure, tests, general Rakudo hacking
N: Mouq
E: alexmoquin@gmail.com
N: Nami-Doc
E: vendethiel@hotmail.fr
N: Nicholas Clark
U: nicholas
E: nick@ccl4.org
......
......@@ -103,6 +103,7 @@ docs/announce/2016.11.md
docs/announce/2016.12.md
docs/announce/2017.01.md
docs/announce/2017.02.md
docs/announce/2017.03.md
docs/architecture.html
docs/architecture.svg
docs/ChangeLog
......@@ -532,6 +533,7 @@ tools/update-tai-utc.pl
tools/util/perlcritic.conf
t/spec/fudge
t/spec/fudgeall
t/spec/fudgeandrun
t/spec/integration/99problems-01-to-10.t
t/spec/integration/99problems-11-to-20.t
t/spec/integration/99problems-21-to-30.t
......
New in 2017.03
+ Fixes:
+ Made IO::Path.lines non-lazy so it can always close the file handle [0083c4f]
+ Fixed unwanted container re-use in `infix:<x>` [5b7b7fb]
+ Made Emoji_Modifier_Base return Bool instead of int with uniprop [2125d4d]
+ Fixed JIT rounding bug for negatives in nqp::div_i [deac603][f73d984]
+ Fixed failure in `\c[]` with non-ASCII names [deac603]
+ Fixed issues in `infix:<div>` optimization [deac603]
+ Fixed .split(...:skip-empty) not skipping with empty strings [fc86084]
+ Fixed duplicated .done/.quit on Channels in Proc::Async on exit [c4a4c84]
+ Fixed error handling when Proc::Async process failed to spawn [f73d984]
+ Made sure `infix:<xx>` always returns a Seq [1eb7b1f]
+ Partially fixed `infix:<xx>` being non-lazy [f190f24]
+ Fixed SC collision when loading identical modules from
different dists [254f76a]
+ Fixed CURI loading of modules with identical short-names [c1a0fa7]
+ Fixed SEGV in exception handler resolution in sub/INIT/return [b2eb115]
+ Fixed SEGV on `xx` with a huge repeat values [1cafc67]
+ Fixed SEGV on chars with a huge number of combiners [1cafc67]
+ Fixed SEGV when `Scalar` type object is processed by `unique` [cfe0e04]
+ Fixed .comb(Int) failing to work on Cool [a08e953]
+ Fixed hang in dispatch of .lines/.words when given wrong args [7425737]
+ Fixed cases of lack of panic upon with quantifiers in regexes [91a4ac5]
+ Fixed broken thunking of infix:<notandthen> [5e6f30a]
+ Fixed failure to thunk RHS on `or=`, `and=`, and `notandthen=` [3e88c41]
+ Fixed precision loss with `cmp` involving Rationals/Int [9e8ecb7]
+ Fixed crash in .Bool, .so, .not, .hash, and .elems on Baggy:U [e8af855]
+ Fixed crash in .Str on Bool:U [3de5fb2]
+ Fixed crash in IO::Special .WHICH/.Str [dd4dfb1]
+ Fixed install wrapper when no binaries are found [796b6a8]
+ Fixed crash when calling .sort on reified empty Array [8e250db][75e070f]
+ Fixed `Nil` being displayed as `Mu` in REPL [a274bdd][cd47e2a]
+ Fixed previous output silencing exceptions in REPL
[db70a1f][61a65ce][7f9235c]
+ Fixed loss of data when using a hash in assignment to itself [ae7bcf1]
+ Fixed IO::Path.e failing to detect changes on the filesystem [76f7187]
+ Fixed `infix:<eqv>` with Seq/List containing same elements [f9eb811]
+ Fixed CArray to pass NULL when for type object elements [26e6993]
+ Fixed GC deadlock when event loop worker thread was spawned [26e6993]
+ Fixed `:i` in regexes using lowercase instead of fold case [26e6993]
+ Fixed parsing issue with detached methods in `[…]` metaop [e1ebb50]
+ Fixed unwanted list flattening in triangle reduce [10f5f74]
+ Fixed Range.int-bounds for NaN and Inf end points [79f2681][16ef21c]
+ JVM backend fixes [b1def95][2f6d2c6][dc19892][cef41b2]
+ Various improvements to error reporting
[dc5fb20][d66c382][b11dc88][6cb9be2][3bf734f][26e6993]
[20fa14b][127338a][1934a56][27dc7b1][1e24666]
+ Additions:
+ Made symbol imports of `require`d modules lexical. For more information,
see http://rakudo.org/2017/03/18/lexical-require-upgrade-info/
[63cf5ca][3e86d0f][5b98caa][6771dee][9da6de4][4fce405][030c4c5]
+ Added ≤, ≥, ≠ as Unicode versions of <=, >=, and != [5c68ea6]
+ Made it possible to hyper ops that return a Seq [e2db7b8]
+ Made `infix:<∘>` keep RHS's .count and .arity and LHS's .of [032b283][cb149a8]
+ Made purity propagate up through meta-meta ASTs [68a40f7]
+ Made Proc::Async default to translating newlines [05add43][2973ccd]
+ Implemented Str.parse-names [5c1761a]
+ Added `$epsilon` argument to Complex.Rat/.FatRat [a4af702]
+ Fixed loss of precision in Instant.Rat [a4af702]
+ Implemented .FatRat coercer in Cool and Numeric [a4af702]
+ Added Mu candidate for `infix:<xx>` [e270a15]
+ Implemented Mu.iterator [81fcd1b]
+ Made sure Str.split always returns a Seq [f595733][8301a30]
+ Made List.reverse return a Seq [beda576]
+ [EXPERIMENTAL] Added support for Parameter.set_default [d6c95ea]
+ Implemented new internal braids API to make future optimizations easier.
This affects any slang modules that access `%*LANG`, `%*PRAGMAS`, and
`$*ACTIONS` internals using unofficial API.
+ Removals:
+ Removed IO::Path.Bridge [212cc8a]
+ Removed support for IO::Handle.lines(:close) agument [76a59cf]
+ Efficiency:
+ Made min/max/min=/max= about 3x faster [a9c5196]
+ Made .WHICH of numerous types about 1.8x faster [79bb179][65b0040]
+ Made case-insensitive regex match 20%-30% faster [5b6e0fb][f73d984]
+ Made triangle reduce right op with 2 params 2x faster [e114d52]
+ Made triangle reduce right op with 2+ params 1.5x faster [d04c47f]
+ Made IO::Handle.lines about 10% faster [9019a5b]
+ Made IO::Handle.getc about 3% faster [9019a5b]
+ Made reduce chain op about 5% faster [9cec31a]
+ Made IO::Handle.lines about 10% faster [9da50e3]
+ Made List.reverse 0%–30% faster and reduced memory pressure by up to 70%
[beda576]
+ Made loops/maps with NEXT phaser about 5% faster [80e0bce]
+ Made `infix:<%%>` about 14x faster for Int,Int case [755e25b]
+ Made `infix:<%>` about 8x faster for Int,Int case [5ec2517]
+ Made Junction creation about 20% faster [fafe663]
+ Made callframe() about 20% faster [7966dad][9a74cd0]
+ Made meta reduce with right-assoc. op 30%–200% faster [60a8f9e][2cf9b53]
+ REMOVED caching of IO::Path.e results to fix unwanted behaviour [76f7187]
+ Assorted internal improvements to CPU/memory use
[b2e0ac0][25a3cc5][b61b3c7][829762a][45b3af8][7010ae9][556db9d][9e9a4ad]
[8e8cd14][7556498][adb6f87][9a109c9][3de7b08][b283e52][0be7247][74573d0]
[79d5670][313e7b2][e723e00][5843ee6][7c279c3][318f8ee][4ef1e69][9d497e9]
[b597398][4bc826d][9da50e3][2a2e460][0633f03][d444f65][f94a2c7]
New in 2017.02
+ 6.d.PREVIEW changes:
+ It is now possible to use different language versions in different comp units.
......@@ -6,11 +102,11 @@ New in 2017.02
+ Made `react` non-blocking [4aa8d70]
+ Various improvements to error reporting [ee7c1bb][a2d69a0][f22170f]
+ Fixes:
+ Fixed data race in NFA cache [8f53a6f]
+ Fixed handling of Unicode characters on Windows command line [8f53a6f]
+ Fixed overflow during full GC collection on 32-bit systems [8f53a6f]
+ Fixed GC problem in string repeat op [8f53a6f]
+ Fixed .perl.EVAL roundtripping for circular Arrays and
+ Fixed data race in NFA cache [8f53a6f]
+ Fixed handling of Unicode characters on Windows command line [8f53a6f]
+ Fixed overflow during full GC collection on 32-bit systems [8f53a6f]
+ Fixed GC problem in string repeat op [8f53a6f]
+ Fixed .perl.EVAL roundtripping for circular Arrays and
Hashes [67aeefa][673f06b]
+ Fixed instantiation of subclasses of classes that do Rational [7f245f7]
+ Fixed incorrect handling of precision flag in sprintf '%d' [a1c7d01]
......
......@@ -31,11 +31,11 @@ New in 2017.02:
+ Made `react` non-blocking [4aa8d70]
+ Various improvements to error reporting [ee7c1bb][a2d69a0][f22170f]
+ Fixes:
+ Fixed data race in NFA cache [8f53a6f]
+ Fixed handling of Unicode characters on Windows command line [8f53a6f]
+ Fixed overflow during full GC collection on 32-bit systems [8f53a6f]
+ Fixed GC problem in string repeat op [8f53a6f]
+ Fixed .perl.EVAL roundtripping for circular Arrays and
+ Fixed data race in NFA cache [8f53a6f]
+ Fixed handling of Unicode characters on Windows command line [8f53a6f]
+ Fixed overflow during full GC collection on 32-bit systems [8f53a6f]
+ Fixed GC problem in string repeat op [8f53a6f]
+ Fixed .perl.EVAL roundtripping for circular Arrays and
Hashes [67aeefa][673f06b]
+ Fixed instantiation of subclasses of classes that do Rational [7f245f7]
+ Fixed incorrect handling of precision flag in sprintf '%d' [a1c7d01]
......
# Announce: Rakudo Perl 6 compiler, Release #109 (2017.03)
On behalf of the Rakudo development team, I’m very happy to announce the
March 2017 release of Rakudo Perl 6 #109. 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 2017 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 2017.03:
+ Fixes:
+ Made IO::Path.lines non-lazy so it can always close the file handle [0083c4f]
+ Fixed unwanted container re-use in `infix:<x>` [5b7b7fb]
+ Made Emoji_Modifier_Base return Bool instead of int with uniprop [2125d4d]
+ Fixed JIT rounding bug for negatives in nqp::div_i [deac603][f73d984]
+ Fixed failure in `\c[]` with non-ASCII names [deac603]
+ Fixed issues in `infix:<div>` optimization [deac603]
+ Fixed .split(...:skip-empty) not skipping with empty strings [fc86084]
+ Fixed duplicated .done/.quit on Channels in Proc::Async on exit [c4a4c84]
+ Fixed error handling when Proc::Async process failed to spawn [f73d984]
+ Made sure `infix:<xx>` always returns a Seq [1eb7b1f]
+ Partially fixed `infix:<xx>` being non-lazy [f190f24]
+ Fixed SC collision when loading identical modules from
different dists [254f76a]
+ Fixed CURI loading of modules with identical short-names [c1a0fa7]
+ Fixed SEGV in exception handler resolution in sub/INIT/return [b2eb115]
+ Fixed SEGV on `xx` with a huge repeat values [1cafc67]
+ Fixed SEGV on chars with a huge number of combiners [1cafc67]
+ Fixed SEGV when `Scalar` type object is processed by `unique` [cfe0e04]
+ Fixed .comb(Int) failing to work on Cool [a08e953]
+ Fixed hang in dispatch of .lines/.words when given wrong args [7425737]
+ Fixed cases of lack of panic upon with quantifiers in regexes [91a4ac5]
+ Fixed broken thunking of infix:<notandthen> [5e6f30a]
+ Fixed failure to thunk RHS on `or=`, `and=`, and `notandthen=` [3e88c41]
+ Fixed precision loss with `cmp` involving Rationals/Int [9e8ecb7]
+ Fixed crash in .Bool, .so, .not, .hash, and .elems on Baggy:U [e8af855]
+ Fixed crash in .Str on Bool:U [3de5fb2]
+ Fixed crash in IO::Special .WHICH/.Str [dd4dfb1]
+ Fixed install wrapper when no binaries are found [796b6a8]
+ Fixed crash when calling .sort on reified empty Array [8e250db][75e070f]
+ Fixed `Nil` being displayed as `Mu` in REPL [a274bdd][cd47e2a]
+ Fixed previous output silencing exceptions in REPL
[db70a1f][61a65ce][7f9235c]
+ Fixed loss of data when using a hash in assignment to itself [ae7bcf1]
+ Fixed IO::Path.e failing to detect changes on the filesystem [76f7187]
+ Fixed `infix:<eqv>` with Seq/List containing same elements [f9eb811]
+ Fixed CArray to pass NULL when for type object elements [26e6993]
+ Fixed GC deadlock when event loop worker thread was spawned [26e6993]
+ Fixed `:i` in regexes using lowercase instead of fold case [26e6993]
+ Fixed parsing issue with detached methods in `[…]` metaop [e1ebb50]
+ Fixed unwanted list flattening in triangle reduce [10f5f74]
+ Fixed Range.int-bounds for NaN and Inf end points [79f2681][16ef21c]
+ JVM backend fixes [b1def95][2f6d2c6][dc19892][cef41b2]
+ Various improvements to error reporting
[dc5fb20][d66c382][b11dc88][6cb9be2][3bf734f][26e6993]
[20fa14b][127338a][1934a56][27dc7b1][1e24666]
+ Additions:
+ Made symbol imports of `require`d modules lexical. For more information,
see http://rakudo.org/2017/03/18/lexical-require-upgrade-info/
[63cf5ca][3e86d0f][5b98caa][6771dee][9da6de4][4fce405][030c4c5]
+ Added ≤, ≥, ≠ as Unicode versions of <=, >=, and != [5c68ea6]
+ Made it possible to hyper ops that return a Seq [e2db7b8]
+ Made `infix:<∘>` keep RHS's .count and .arity and LHS's .of [032b283][cb149a8]
+ Made purity propagate up through meta-meta ASTs [68a40f7]
+ Made Proc::Async default to translating newlines [05add43][2973ccd]
+ Implemented Str.parse-names [5c1761a]
+ Added `$epsilon` argument to Complex.Rat/.FatRat [a4af702]
+ Fixed loss of precision in Instant.Rat [a4af702]
+ Implemented .FatRat coercer in Cool and Numeric [a4af702]
+ Added Mu candidate for `infix:<xx>` [e270a15]
+ Implemented Mu.iterator [81fcd1b]
+ Made sure Str.split always returns a Seq [f595733][8301a30]
+ Made List.reverse return a Seq [beda576]
+ [EXPERIMENTAL] Added support for Parameter.set_default [d6c95ea]
+ Implemented new internal braids API to make future optimizations easier.
This affects any slang modules that access `%*LANG`, `%*PRAGMAS`, and
`$*ACTIONS` internals using unofficial API.
+ Removals:
+ Removed IO::Path.Bridge [212cc8a]
+ Removed support for IO::Handle.lines(:close) agument [76a59cf]
+ Efficiency:
+ Made min/max/min=/max= about 3x faster [a9c5196]
+ Made .WHICH of numerous types about 1.8x faster [79bb179][65b0040]
+ Made case-insensitive regex match 20%-30% faster [5b6e0fb][f73d984]
+ Made triangle reduce right op with 2 params 2x faster [e114d52]
+ Made triangle reduce right op with 2+ params 1.5x faster [d04c47f]
+ Made IO::Handle.lines about 10% faster [9019a5b]
+ Made IO::Handle.getc about 3% faster [9019a5b]
+ Made reduce chain op about 5% faster [9cec31a]
+ Made IO::Handle.lines about 10% faster [9da50e3]
+ Made List.reverse 0%–30% faster and reduced memory pressure by up to 70%
[beda576]
+ Made loops/maps with NEXT phaser about 5% faster [80e0bce]
+ Made `infix:<%%>` about 14x faster for Int,Int case [755e25b]
+ Made `infix:<%>` about 8x faster for Int,Int case [5ec2517]
+ Made Junction creation about 20% faster [fafe663]
+ Made callframe() about 20% faster [7966dad][9a74cd0]
+ Made meta reduce with right-assoc. op 30%–200% faster [60a8f9e][2cf9b53]
+ REMOVED caching of IO::Path.e results to fix unwanted behaviour [76f7187]
+ Assorted internal improvements to CPU/memory use
[b2e0ac0][25a3cc5][b61b3c7][829762a][45b3af8][7010ae9][556db9d][9e9a4ad]
[8e8cd14][7556498][adb6f87][9a109c9][3de7b08][b283e52][0be7247][74573d0]
[79d5670][313e7b2][e723e00][5843ee6][7c279c3][318f8ee][4ef1e69][9d497e9]
[b597398][4bc826d][9da50e3][2a2e460][0633f03][d444f65][f94a2c7]
The following people contributed to this release:
Zoffix Znet, Elizabeth Mattijsen, Wenzel P. P. Peppmeyer, Samantha McVey,
Will "Coke" Coleda, Pawel Murias, Jonathan Worthington, Daniel Green,
Brian Duggan, Tom Browder, Larry Wall, Christian Bartolomäus, Altai-man,
Fernando Correa de Oliveira, Stefan Seifert, Itsuki Toyota, LLFourn,
Aleks-Daniel Jakimenko-Aleksejev, Naoum Hankache, Bart Wiegmans, Cale,
Fernando Correa, Timo Paulssen, Nick Logan, Ronald Schmidt, Brad Gilbert,
Claudio Ramirez, Will Coleda, raiph, ven, David Warring, Jan-Olof Hendig
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.
Additionally, we invite you to make a donation to The Perl Foundation
to sponsor Perl 6 development: <https://donate.perlfoundation.org/>
(put "Perl 6 Core Development Fund" in the 'Purpose' text field)
The next release of Rakudo (#110), is tentatively scheduled for 2017-04-15.
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, Perl 6 introductory documentation,
and other software that can be used with the Rakudo compiler to enhance its utility.
......@@ -22,8 +22,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.
2017-02-18 Rakudo #108 (Zoffix)
2017-03-18 Rakudo #109
2017-03-18 Rakudo #109 (Zoffix)
2017-04-15 Rakudo #110
2017-05-20 Rakudo #111
2017-06-17 Rakudo #112
......@@ -200,12 +199,12 @@ Make sure everything compiles and runs from a known clean state:
Install Inline::Perl5 so stresstest can use it.
git clone https://github.com/tadzik/panda
git clone https://github.com/ugexe/zef
export PATH=`pwd`/install/bin:$PATH
cd panda; perl6 bootstrap.pl
cd zef; perl6 -Ilib bin/zef install .
cd ..
export PATH=`pwd`/install/share/perl6/site/bin:$PATH
panda install Inline::Perl5
zef install Inline::Perl5
=item 13.
......@@ -427,6 +426,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2016-11-19 Rakudo #105 "2016.11" (Zoffix + NeuralAnomaly)
2016-12-17 Rakudo #106 "2016.12" (Zoffix + NeuralAnomaly)
2017-01-20 Rakudo #107 "2017.01" (Zoffix + NeuralAnomaly)
2017-02-18 Rakudo #108 "2017.02" (Zoffix + NeuralAnomaly)
=head1 COPYRIGHT
......
This diff is collapsed.
This diff is collapsed.
......@@ -349,7 +349,7 @@ my class Binder {
my int $num_type_caps := nqp::elems($type_caps);
my int $i := 0;
while $i < $num_type_caps {
nqp::bindkey($lexpad, nqp::atpos($type_caps, $i), $oval.WHAT);
nqp::bindkey($lexpad, nqp::atpos_s($type_caps, $i), $oval.WHAT);
$i++;
}
}
......@@ -816,7 +816,7 @@ my class Binder {
my int $j := 0;
my str $cur_name;
while $j < $num_names {
$cur_name := nqp::atpos($named_names, $j);
$cur_name := nqp::atpos_s($named_names, $j);
$value := nqp::atkey($named_args, $cur_name);
unless nqp::isnull($value) {
nqp::deletekey($named_args, $cur_name);
......@@ -1466,8 +1466,8 @@ BEGIN {
# has Mu $!why;
Parameter.HOW.add_parent(Parameter, Any);
Parameter.HOW.add_attribute(Parameter, Attribute.new(:name<$!variable_name>, :type(str), :package(Parameter)));
Parameter.HOW.add_attribute(Parameter, scalar_attr('@!named_names', List, Parameter, :!auto_viv_container));
Parameter.HOW.add_attribute(Parameter, scalar_attr('@!type_captures', List, Parameter, :!auto_viv_container));
Parameter.HOW.add_attribute(Parameter, scalar_attr('@!named_names', Mu, Parameter, :!auto_viv_container));
Parameter.HOW.add_attribute(Parameter, scalar_attr('@!type_captures', Mu, Parameter, :!auto_viv_container));
Parameter.HOW.add_attribute(Parameter, Attribute.new(:name<$!flags>, :type(int), :package(Parameter)));
Parameter.HOW.add_attribute(Parameter, Attribute.new(:name<$!nominal_type>, :type(Mu), :package(Parameter)));
Parameter.HOW.add_attribute(Parameter, scalar_attr('@!post_constraints', List, Parameter, :!auto_viv_container));
......@@ -1988,7 +1988,7 @@ BEGIN {
if $flags +& $SIG_ELEM_MULTI_INVOCANT {
unless $flags +& $SIG_ELEM_IS_OPTIONAL {
if nqp::elems($named_names) == 1 {
%info<req_named> := nqp::atpos($named_names, 0);
%info<req_named> := nqp::atpos_s($named_names, 0);
}
}
%info<bind_check> := 1;
......@@ -2826,10 +2826,10 @@ BEGIN {
Nil.HOW.compose_repr(Nil);
# class List is Cool {
# has List $!reified;
# has Mu $!reified;
# has Mu $!todo;
List.HOW.add_parent(List, Cool);
List.HOW.add_attribute(List, scalar_attr('$!reified', List, List));
List.HOW.add_attribute(List, scalar_attr('$!reified', Mu, List));
List.HOW.add_attribute(List, scalar_attr('$!todo', Mu, List));
List.HOW.compose_repr(List);
......
......@@ -1383,7 +1383,7 @@ class Perl6::Optimizer {
if $op.name eq '&infix:<,>' {
if +@($op) {
# keep void setting to distribute sink warnings
try self.visit_children($op);
try self.visit_children($op, :void_default($!void_context));
}
elsif $!void_context {
my $suggest := ($op.okifnil ?? ' (use Nil instead to suppress this warning)' !! '');
......@@ -1644,16 +1644,29 @@ class Perl6::Optimizer {
$op.pop;
$op.push($assignee);
my $call := 'call';
my $obj;
try {
$obj := $!symbols.find_lexical($metaop[0].name);
}
if $obj {
my $scopes := $!symbols.scopes_in($metaop[0].name);
if $scopes == 0 || $scopes == 1 && nqp::can($obj, 'soft') && !$obj.soft {
$call := 'callstatic';
}
}
if ($is-always-definite) {
$op.push(QAST::Op.new( :op('call'), :name($metaop[0].name),
$op.push(QAST::Op.new( :op($call), :name($metaop[0].name),
$assignee_var,
$operand));
} else {
$op.push(QAST::Op.new( :op('call'), :name($metaop[0].name),
$op.push(QAST::Op.new( :op($call), :name($metaop[0].name),
QAST::Op.new( :op('if'),
QAST::Op.new( :op('p6definite'), $assignee_var),
$assignee_var,
QAST::Op.new( :op('call'), :name($metaop[0].name) ) ),
QAST::Op.new( :op($call), :name($metaop[0].name) ) ),
$operand));
}
......
This diff is collapsed.
......@@ -138,7 +138,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
}
nqp::if(
$!did-iterate && nqp::eqaddr($result,IterationEnd),
&!block.fire_phasers('LAST')
&!block.fire_if_phasers('LAST')
);
$result
}
......@@ -196,7 +196,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
)
)
}
nqp::if($!did-iterate,&!block.fire_phasers('LAST'))
nqp::if($!did-iterate,&!block.fire_if_phasers('LAST'))
}
method sink-all(--> IterationEnd) {
......@@ -246,7 +246,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
)
)
}
nqp::if($!did-iterate,&!block.fire_phasers('LAST'))
nqp::if($!did-iterate,&!block.fire_if_phasers('LAST'))
}
}
......@@ -745,7 +745,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
),
:nohandler);
}
&!block.fire_phasers('LAST')
&!block.fire_if_phasers('LAST')
if $!CAN_FIRE_PHASERS
&& $!did-iterate
&& nqp::eqaddr($result, IterationEnd);
......@@ -909,7 +909,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
has $!arity;
has $!count;
method set-cheat($new-arity, $new-count) {
method set-cheat($new-arity, $new-count --> Nil) {
$!arity = $new-arity;
$!count = $new-count;
}
......@@ -1933,6 +1933,10 @@ proto sub infix:<min>(|) is pure { * }
multi sub infix:<min>(Mu:D \a, Mu:U) { a }
multi sub infix:<min>(Mu:U, Mu:D \b) { b }
multi sub infix:<min>(Mu:D \a, Mu:D \b) { (a cmp b) < 0 ?? a !! b }
multi sub infix:<min>(Int:D \a, Int:D \b) { nqp::if(nqp::islt_i(nqp::cmp_I(nqp::decont(a), nqp::decont(b)), 0), a, b) }
multi sub infix:<min>(int \a, int \b) { nqp::if(nqp::islt_i(nqp::cmp_i(a, b), 0), a, b) }
multi sub infix:<min>(Num:D \a, Num:D \b) { nqp::if(nqp::islt_i(nqp::cmp_n(a, b), 0), a, b) }
multi sub infix:<min>(num \a, num \b) { nqp::if(nqp::islt_i(nqp::cmp_n(a, b), 0), a, b) }
multi sub infix:<min>(+args is raw) { args.min }
sub min(+args, :&by = &infix:<cmp>) { args.min(&by) }
......@@ -1940,6 +1944,10 @@ proto sub infix:<max>(|) is pure { * }
multi sub infix:<max>(Mu:D \a, Mu:U) { a }
multi sub infix:<max>(Mu:U, Mu:D \b) { b }
multi sub infix:<max>(Mu:D \a, Mu:D \b) { (a cmp b) > 0 ?? a !! b }
multi sub infix:<max>(Int:D \a, Int:D \b) { nqp::if(nqp::isgt_i(nqp::cmp_I(nqp::decont(a), nqp::decont(b)), 0), a, b) }
multi sub infix:<max>(int \a, int \b) { nqp::if(nqp::isgt_i(nqp::cmp_i(a, b), 0), a, b) }
multi sub infix:<max>(Num:D \a, Num:D \b) { nqp::if(nqp::isgt_i(nqp::cmp_n(a, b), 0), a, b) }
multi sub infix:<max>(num \a, num \b) { nqp::if(nqp::isgt_i(nqp::cmp_n(a, b), 0), a, b) }
multi sub infix:<max>(+args) { args.max }
sub max(+args, :&by = &infix:<cmp>) { args.max(&by) }
......
......@@ -25,13 +25,13 @@ my class Any { # declared in BOOTSTRAP
multi method EXISTS-KEY(Any:D: $) { False }
proto method DELETE-KEY(|) is nodal { * }
multi method DELETE-KEY(Any:U: $) { Nil }
multi method DELETE-KEY(Any:U: $ --> Nil) { }
multi method DELETE-KEY(Any:D: $) {
Failure.new("Can not remove values from a {self.^name}")
}
proto method DELETE-POS(|) is nodal { * }
multi method DELETE-POS(Any:U: $pos) { Nil }
multi method DELETE-POS(Any:U: $pos --> Nil) { }
multi method DELETE-POS(Any:D: $pos) {
Failure.new("Can not remove elements from a {self.^name}")
}
......@@ -115,7 +115,6 @@ my class Any { # declared in BOOTSTRAP
multi method roll() { self.list.roll }
multi method roll($n) { self.list.roll($n) }
proto method iterator(|) { * }
multi method iterator(Any:) { self.list.iterator }
proto method match(|) { $/ := nqp::getlexcaller('$/'); {*} }
......
......@@ -712,8 +712,7 @@ my class Array { # declared in BOOTSTRAP
)
}
my $nqplist := nqp::list; # for splicing in without values
proto method splice(|) is nodal { * }
my $empty := nqp::create(IterationBuffer); # splicing in without values
#------ splice() candidates
multi method splice(Array:D \SELF:) {
nqp::if(
......@@ -787,7 +786,7 @@ my class Array { # declared in BOOTSTRAP
nqp::atpos(nqp::getattr(self,List,'$!reified'),$i))
),
nqp::splice(
nqp::getattr(self,List,'$!reified'),$nqplist,$offset,$size),
nqp::getattr(self,List,'$!reified'),$empty,$offset,$size),
$result
)
}
......@@ -871,7 +870,7 @@ my class Array { # declared in BOOTSTRAP
nqp::stmts(
(my $result := self!splice-save($offset,$size,my int $removed)),
nqp::splice(
nqp::getattr(self,List,'$!reified'),$nqplist,$offset,$removed),
nqp::getattr(self,List,'$!reified'),$empty,$offset,$removed),
$result
)
}
......@@ -987,7 +986,8 @@ my class Array { # declared in BOOTSTRAP
nqp::elems(nqp::if(
nqp::getattr(self,List,'$!reified').DEFINITE,
nqp::getattr(self,List,'$!reified'),
nqp::bindattr(self,List,'$!reified',nqp::list)
nqp::bindattr(self,List,'$!reified',
nqp::create(IterationBuffer))
)),
nqp::unbox_i($offset),
),
......
......@@ -10,7 +10,7 @@ my class Bag does Baggy {
$!WHICH := self!WHICH
)
}
method total(Bag:D: --> Int) {
method total(Bag:D: --> Int:D) {
nqp::if(
nqp::attrinited(self,Bag,'$!total'),
$!total,
......
......@@ -47,18 +47,24 @@ my role Baggy does QuantHash {
}
fail "Found negative values for {@toolow} in {self.^name}" if @toolow;
}
method !LISTIFY(&formatter) {
my $elems := nqp::getattr(%!elems,Map,'$!storage');
my $list := nqp::list();
nqp::setelems($list,nqp::elems($elems)); # presize
nqp::setelems($list,0);
my $iter := nqp::iterator($elems);
while $iter {
my \pair = nqp::iterval(nqp::shift($iter));
nqp::push($list,formatter(pair