Commit 20630c1f authored by Robert Lemmen's avatar Robert Lemmen

New upstream version 2018.11

parent 2d3b1604
......@@ -641,6 +641,7 @@ U: paultcochrane
E: paul@liekut.de
N: Paweł Murias
N: Pawel Murias
U: pmurias
E: pawelmurias@gmail.com
......
......@@ -361,7 +361,7 @@ MAIN: {
sorry($options{'ignore-errors'}, @errors) if @errors;
my $l = uc $backend_prefix{$default_backend};
print $MAKEFILE qq[\nt/*/*.t t/*.t t/*/*/*.t: all\n\t\$(${l}_HARNESS_WITH_FUDGE) --verbosity=1 \$\@\n];
print $MAKEFILE qq[\nt/*/*.t t/*.t t/*/*/*.t: all\n\t\$(${l}_HARNESS5_WITH_FUDGE) --verbosity=1 \$\@\n];
close $MAKEFILE or die "Cannot write 'Makefile': $!";
......
......@@ -127,6 +127,7 @@ docs/announce/2018.06.md
docs/announce/2018.08.md
docs/announce/2018.09.md
docs/announce/2018.10.md
docs/announce/2018.11.md
docs/architecture.html
docs/architecture.svg
docs/archive/2017-IO-Grant--Action-Plan.md
......@@ -255,6 +256,7 @@ src/core/Grammar.pm6
src/core/Hash.pm6
src/core/hash_slice.pm6
src/core/HyperConfiguration.pm6
src/core/Hyper.pm6
src/core/HyperSeq.pm6
src/core/Instant.pm6
src/core/Int.pm6
......@@ -451,6 +453,8 @@ src/Perl6/PodGrammar.nqp
src/Perl6/Pod.nqp
src/Perl6/World.nqp
src/RESTRICTED.setting
src/vm/js/CompUnit/Repository/FileSystemWithRecording.pm6
src/vm/js/load-compiler.nqp
src/vm/js/make-release.js
src/vm/js/ModuleLoaderVMConfig.nqp
src/vm/js/Perl6/Ops.nqp
......
New in 2018.11:
+ SPECIAL NOTES:
+ 🎆❇️🔥 Default language version is now `v6.d` 🔥❇️🎆 [46ef0ea0]
+ Deprecations:
+ Deprecated `.path`/`.args` in `Proc::Async`, use `.command`
instead [45bbc946]
+ Fixes:
+ Fixed `$*PERL.version` to always report the right version [c9ecfb7a]
+ Consistified `:U.pairup` with `:D.pairup` to return a Seq [d73272e4]
+ Provided a stable `.WHICH` for `Map` [4e0a1c24][052067fd]
+ Made sure `DEPRECATED` reports location correctly when
using `:up` [8561d0ae]
+ Fixed literal `\` in `tr///` [85107ec0]
+ Fixed tap add/remove race in `Supplier` and `Supplier::Preserving`
[7ee1f3c5][68d79e70]
+ `QuantHash`es now properly report `.of` and `.keyof` [8b93ec9f]
+ Added type constraints to port numbers in `IO::Socket::Async` [547f28ba]
+ Fixed re-initialization on some types of arrays [f1fa5adf]
[7262b4e8][49f07abe]
+ Gave 6.d correct `is rw` Proxy semantics [7d37f9aa]
+ Fixed `Match.^roles` [becbdeb9]
+ Fixed missing path volume after `..` is resolved [8854bbd3]
+ The `.values` method can now be used to change values in
object hashes [a728bb2d]
+ Fixed shaped dynamic variables like `my %*a{Int}` [bcdf87a6]
+ Made `my @a is Blob / Buf = ...` work [762c708f]
+ Object hashes and `QuantHash`es can now be used with
metaops [Hyper refactor]
+ Many improvements to the JS backend [32b7c089][f35dd301][9457f7e5]
[ea69c0a0][0e4969fe][9df074ba][78389aa2][1ef62aca][f460ad1a][cbbe16ed]
+ Improved error message when using placeholders with methods [deae5bcd]
[0896c301][48093d0d][0bda7dc1][90103f6d][68b44e33][8549c4c1]
+ Various improvements to produced messages [15c16e35][e6758492]
+ Additions:
+ Implemented `X::Language::TooLate` [3365094f]
+ `$*COLLATION.set` is no longer experimental [20c41ca5]
+ Added dynamic variable `$*FOLDING` [cec1f511]
+ Removals:
+ Removed unspecced `.allowed` attribute in `Pod::Block::Code` [5aba3e96]
+ Set operators `(<+)`, `≼`, `(>+)`, `≽` now die when used [951303f9]
[7a1a1868][81474bf9][5598f37d]
+ `Associative >>op<< Iterable` now dies, as the results are indeterminate
due to random hash key order [Hyper refactor]
+ Build system:
+ Fixed `t/*/*.t` rule in generated Makefile [d2c7e327]
+ Made running timing based tests optional [72b896c8]
+ Efficiency:
+ Made `Int eqv Int` 3x and `int eqv int` 5x as fast [fb9a0454][94dd0a41]
+ Made `ObjAt` `eqv` `ObjAt` also faster [5120d3d2]
+ Made `Hash`/`Map` slices about 5x as fast [6fe27894][b83179f0]
[c4da4c7e][9a2c4b44]
+ Optimized various operations on `Date` and `DateTime` making
them up to 3x as fast [11cb4fac][b6292fe9][08fac045][98d07cf6]
[b463746d][bf3eb8ec][a11d599f]
+ Made metaops use the fast path for `&[+=]`-like ops [e7ce194a]
+ Hyper operator refactor makes many things like
`%h >>+>> 1` 1.3x to 8x as fast [bfe2ad63][130cc817][0bc72e05]
[75c9456a][ec2848c4][f06e8582][73eb297f][194daab7][a575effe]
[c50cf82a][1a2b39dc][307a98bd][843118ea][6208c266][9221c08d]
[c03e71d5][78f64203][63ae9dcc][fa5215b6][d5a751d9][674a0837]
[8fa72681][80edefcf][cf5c8a09][534d8f65][7fad12b0][800d8fbb]
[c3f03e67][1ed2b098][21434dda][234e298b][e8285c01][32ab0d30]
[90ac0940][f7007ac0][dc67ee75][cae9847e][481dbf92][c4445649]
[19f0c842][86ce4f4e][50f2207b][2e5be5b8][1b7253df][64a47d87]
[005261a4][10693d16]
+ Internal:
+ Changed CORE.d setting compilation to propagate indicator flags [4a6d9108]
+ Made sure we don't add object to serialization context more
than once [3995e423]
+ New QAST to mbc compiler [edc4c054][6aafe18d][f8be2fa0][656a8045][bb43acdb]
+ Added `Hash.STORE(\keys,\values)` [faa19ab9]
+ Introduced `R:I.AssociativeIterableKeys` [6fe27894]
+ Various internal optimizations [5f1a81e0][1766435a][8e858c8d][00eb7b85]
[0fa6988c][bf3575cc][18ded174]
New in 2018.10:
+ SPECIAL NOTES:
+ This is the first Rakudo release that comes with an additional
......@@ -18,7 +93,7 @@ New in 2018.10:
+ Fixed indexing of shaped arrays with a dimension higher than 3 [0307c366]
+ `.in-timezone`s value is now coerced to Int [c8438e6a]
+ Stub methods from roles are now verified [fd5d5bdf]
+ Fixed double-closing of handles in `.lines` when `:close` and
+ Fixed double-closing of handles in `IO::Handle.lines` when `:close` and
`$limit` are used [6edb142f]
+ Fixed closing of handles in `IO::Handle.lines` when `$limit`
is used [c1c75740]
......@@ -62,14 +137,14 @@ New in 2018.10:
+ Other minor optimizations [464a86b1][ab83b9d8][8cc3d5d7][b107cda5]
+ Internal:
+ Made `make` an only [369068ae]
+ Added skip-one method to appropriate PredictiveIterators [e54885e5]
+ Added skip-one method to appropriate `PredictiveIterator`s [e54885e5]
+ More things are now initialized at setting compile time
[06dfbf02][688cbac1][92735770]
+ Simplified initialization of `CompUnit::RepositoryRegistry`
[0425d927][8e1cd01a]
+ Introduced `IterationBuffer.List` [8c10da6a]
+ Made it not go through `.new` if we can `nqp::create` [84311b77]
+ Made sure `.STORE` only works on instances [9daac683]
+ Use `nqp::create` for IterationBuffer instead of .new [84311b77]
+ Made sure `.STORE` only works on instances of mixy/baggy types [9daac683]
+ Added `$*INSIDE-EVAL` to mark that we're inside an `EVAL` [73b7c603]
New in 2018.09:
......
......@@ -43,7 +43,7 @@ New in 2018.10:
+ Fixed indexing of shaped arrays with a dimension higher than 3 [0307c366]
+ `.in-timezone`s value is now coerced to Int [c8438e6a]
+ Stub methods from roles are now verified [fd5d5bdf]
+ Fixed double-closing of handles in `.lines` when `:close` and
+ Fixed double-closing of handles in `IO::Handle.lines` when `:close` and
`$limit` are used [6edb142f]
+ Fixed closing of handles in `IO::Handle.lines` when `$limit`
is used [c1c75740]
......@@ -87,14 +87,14 @@ New in 2018.10:
+ Other minor optimizations [464a86b1][ab83b9d8][8cc3d5d7][b107cda5]
+ Internal:
+ Made `make` an only [369068ae]
+ Added skip-one method to appropriate PredictiveIterators [e54885e5]
+ Added skip-one method to appropriate `PredictiveIterator`s [e54885e5]
+ More things are now initialized at setting compile time
[06dfbf02][688cbac1][92735770]
+ Simplified initialization of `CompUnit::RepositoryRegistry`
[0425d927][8e1cd01a]
+ Introduced `IterationBuffer.List` [8c10da6a]
+ Made it not go through `.new` if we can `nqp::create` [84311b77]
+ Made sure `.STORE` only works on instances [9daac683]
+ Use `nqp::create` for IterationBuffer instead of .new [84311b77]
+ Made sure `.STORE` only works on instances of mixy/baggy types [9daac683]
+ Added `$*INSIDE-EVAL` to mark that we're inside an `EVAL` [73b7c603]
......
# Announce: Rakudo Perl 6 compiler, Release #128 (2018.11)
On behalf of the Rakudo development team, I’m very happy to announce the
November 2018 release of Rakudo Perl 6 #128. Rakudo is an implementation of
Perl 6 on the Moar Virtual Machine[^1].
This release implements 6.c and 6.d versions of the Perl 6 specification.
6.c version of the language is available if you use the `use v6.c`
version pragma, otherwise 6.d is the default.
Upcoming releases in 2018 will include new functionality that is not
part of 6.c or 6.d specifications, available with a lexically scoped
pragma. Our goal is to ensure that anything that is tested as part of
6.c and 6.d specifications will continue to work unchanged. There may
be incremental spec releases this year as well.
The tarball for this release is available from <https://rakudo.org/files/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
<https://rakudo.org/files/star>.
The changes in this release are outlined below:
New in 2018.11:
+ SPECIAL NOTES:
+ 🎆❇️🔥 Default language version is now `v6.d` 🔥❇️🎆 [46ef0ea0]
+ Deprecations:
+ Deprecated `.path`/`.args` in `Proc::Async`, use `.command`
instead [45bbc946]
+ Fixes:
+ Fixed `$*PERL.version` to always report the right version [c9ecfb7a]
+ Consistified `:U.pairup` with `:D.pairup` to return a Seq [d73272e4]
+ Provided a stable `.WHICH` for `Map` [4e0a1c24][052067fd]
+ Made sure `DEPRECATED` reports location correctly when
using `:up` [8561d0ae]
+ Fixed literal `\` in `tr///` [85107ec0]
+ Fixed tap add/remove race in `Supplier` and `Supplier::Preserving`
[7ee1f3c5][68d79e70]
+ `QuantHash`es now properly report `.of` and `.keyof` [8b93ec9f]
+ Added type constraints to port numbers in `IO::Socket::Async` [547f28ba]
+ Fixed re-initialization on some types of arrays [f1fa5adf]
[7262b4e8][49f07abe]
+ Gave 6.d correct `is rw` Proxy semantics [7d37f9aa]
+ Fixed `Match.^roles` [becbdeb9]
+ Fixed missing path volume after `..` is resolved [8854bbd3]
+ The `.values` method can now be used to change values in
object hashes [a728bb2d]
+ Fixed shaped dynamic variables like `my %*a{Int}` [bcdf87a6]
+ Made `my @a is Blob / Buf = ...` work [762c708f]
+ Object hashes and `QuantHash`es can now be used with
metaops [Hyper refactor]
+ Many improvements to the JS backend [32b7c089][f35dd301][9457f7e5]
[ea69c0a0][0e4969fe][9df074ba][78389aa2][1ef62aca][f460ad1a][cbbe16ed]
+ Improved error message when using placeholders with methods [deae5bcd]
[0896c301][48093d0d][0bda7dc1][90103f6d][68b44e33][8549c4c1]
+ Various improvements to produced messages [15c16e35][e6758492]
+ Additions:
+ Implemented `X::Language::TooLate` [3365094f]
+ `$*COLLATION.set` is no longer experimental [20c41ca5]
+ Added dynamic variable `$*FOLDING` [cec1f511]
+ Removals:
+ Removed unspecced `.allowed` attribute in `Pod::Block::Code` [5aba3e96]
+ Set operators `(<+)`, `≼`, `(>+)`, `` now die when used [951303f9]
[7a1a1868][81474bf9][5598f37d]
+ `Associative >>op<< Iterable` now dies, as the results are indeterminate
due to random hash key order [Hyper refactor]
+ Build system:
+ Fixed `t/*/*.t` rule in generated Makefile [d2c7e327]
+ Made running timing based tests optional [72b896c8]
+ Efficiency:
+ Made `Int eqv Int` 3x and `int eqv int` 5x as fast [fb9a0454][94dd0a41]
+ Made `ObjAt` `eqv` `ObjAt` also faster [5120d3d2]
+ Made `Hash`/`Map` slices about 5x as fast [6fe27894][b83179f0]
[c4da4c7e][9a2c4b44]
+ Optimized various operations on `Date` and `DateTime` making
them up to 3x as fast [11cb4fac][b6292fe9][08fac045][98d07cf6]
[b463746d][bf3eb8ec][a11d599f]
+ Made metaops use the fast path for `&[+=]`-like ops [e7ce194a]
+ Hyper operator refactor makes many things like
`%h >>+>> 1` 1.3x to 8x as fast [bfe2ad63][130cc817][0bc72e05]
[75c9456a][ec2848c4][f06e8582][73eb297f][194daab7][a575effe]
[c50cf82a][1a2b39dc][307a98bd][843118ea][6208c266][9221c08d]
[c03e71d5][78f64203][63ae9dcc][fa5215b6][d5a751d9][674a0837]
[8fa72681][80edefcf][cf5c8a09][534d8f65][7fad12b0][800d8fbb]
[c3f03e67][1ed2b098][21434dda][234e298b][e8285c01][32ab0d30]
[90ac0940][f7007ac0][dc67ee75][cae9847e][481dbf92][c4445649]
[19f0c842][86ce4f4e][50f2207b][2e5be5b8][1b7253df][64a47d87]
[005261a4][10693d16]
+ Internal:
+ Changed CORE.d setting compilation to propagate indicator flags [4a6d9108]
+ Made sure we don't add object to serialization context more
than once [3995e423]
+ New QAST to mbc compiler [edc4c054][6aafe18d][f8be2fa0][656a8045][bb43acdb]
+ Added `Hash.STORE(\keys,\values)` [faa19ab9]
+ Introduced `R:I.AssociativeIterableKeys` [6fe27894]
+ Various internal optimizations [5f1a81e0][1766435a][8e858c8d][00eb7b85]
[0fa6988c][bf3575cc][18ded174]
The following people contributed to this release:
Stefan Seifert, Elizabeth Mattijsen, Zoffix Znet,
Aleks-Daniel Jakimenko-Aleksejev, Paweł Murias, Timo Paulssen, Nick Logan,
Tom Browder, Rob Hoelz, Jonathan Worthington, Joelle Maslak, Donald Hunter,
Bart Wiegmans, Daniel Green, Fernando Correa de Oliveira,
Juan Julián Merelo Guervós, Samantha McVey
If you would like to contribute or find out more information, visit
<https://perl6.org>, <https://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 (#129), is tentatively scheduled for 2018-12-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.
This diff is collapsed.
......@@ -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.
2018-11-17 Rakudo #128 (AlexDaniel + Releasable)
2018-12-15 Rakudo #129
2018-12-15 Rakudo #129 (AlexDaniel + Releasable)
(More planned dates can be generated with F<tools/release-dates.p6>).
......@@ -495,6 +494,7 @@ Previous releases were bundled as part of monthly Parrot releases.
2018-09-02 Rakudo #125 "2018.08" (AlexDaniel + Releasable)
2018-09-23 Rakudo #126 "2018.09" (AlexDaniel + Releasable)
2018-10-28 Rakudo #127 "2018.10" (AlexDaniel + Releasable)
2018-11-29 Rakudo #128 "2018.11" (AlexDaniel + Releasable) # v6.d
=head1 COPYRIGHT
......
......@@ -12,18 +12,21 @@ if %*ENV<POD_TO_TEXT_ANSI> {
sub pod2text($pod) is export {
given $pod {
when Pod::Heading { heading2text($pod) }
when Pod::Block::Code { code2text($pod) }
when Pod::Block::Named { named2text($pod) }
when Pod::Block::Para { twrap( $pod.contents.map({pod2text($_)}).join("") ) }
when Pod::Block::Table { table2text($pod) }
when Pod::Block::Declarator { declarator2text($pod) }
when Pod::Item { item2text($pod).indent(2) }
when Pod::FormattingCode { formatting2text($pod) }
when Positional { .flat».&pod2text.grep(?*).join: "\n\n" }
when Pod::Block::Comment { '' }
when Pod::Config { '' }
default { $pod.Str }
when Pod::Heading { heading2text($pod) }
when Pod::Block::Code { code2text($pod) }
when Pod::Block::Named { named2text($pod) }
when Pod::Block::Para { twrap( $pod.contents.map({pod2text($_)}).join("") ) }
when Pod::Block::Table { table2text($pod) }
when Pod::Block::Declarator { declarator2text($pod) }
when Pod::Item { item2text($pod).indent(2) }
when Pod::Defn { pod2text($pod.contents[0]) ~ "\n"
~ pod2text($pod.contents[1..*-1]) }
when Pod::FormattingCode { formatting2text($pod) }
when Positional { .flat».&pod2text.grep(?*).join: "\n\n" }
when Pod::Block::Comment { '' }
when Pod::Config { '' }
default { $pod.Str }
}
}
......@@ -47,8 +50,6 @@ sub named2text($pod) {
given $pod.name {
when 'pod' { pod2text($pod.contents) }
when 'para' { para2text($pod.contents[0]) }
when 'defn' { pod2text($pod.contents[0]) ~ "\n"
~ pod2text($pod.contents[1..*-1]) }
when 'config' { }
when 'nested' { }
default { $pod.name ~ "\n" ~ pod2text($pod.contents) }
......
......@@ -193,7 +193,12 @@ package EXPORT::pack {
}
package EXPORT::collation {
OUR::<EXPERIMENTAL-COLLATION> := True;
# this is no longer experimental, but keep the package to prevent
# code that caters to this and earlier versions of compilers from
# breaking
#
# XXX TODO: should be fine to remove on 2019-12. There is also a test
# in t/02-rakudo/99-misc.t that will need to be removed too at the time
}
# vim: ft=perl6 expandtab sw=4
This diff is collapsed.
......@@ -4,6 +4,7 @@ use Perl6::Optimizer;
class Perl6::Compiler is HLL::Compiler {
has $!language_version;
has $!can_language_versions;
method compilation-id() {
my class IDHolder { }
......@@ -24,9 +25,14 @@ class Perl6::Compiler is HLL::Compiler {
$!language_version
}
else {
$!language_version := self.config<language_version>
$!language_version := self.config<language-version>
}
}
method can_language_versions() {
$!can_language_versions
?? $!can_language_versions
!! ($!can_language_versions := self.config<can-language-versions>)
}
method command_eval(*@args, *%options) {
if nqp::existskey(%options, 'doc') && !%options<doc> {
......
This diff is collapsed.
......@@ -79,9 +79,15 @@ role Perl6::Metamodel::BUILDPLAN {
# in Mu, we produce ops here per attribute that may
# need initializing.
for @attrs {
my int $primspec := nqp::objprimspec($_.type);
#?if js
my int $is_oversized_int := $primspec == 4 || $primspec == 5;
$primspec := $is_oversized_int ?? 0 !! $primspec;
#?endif
if $_.has_accessor {
nqp::push(@plan,[
nqp::add_i(0,nqp::objprimspec($_.type)),
0 + $primspec,
$obj,
$_.name,
nqp::substr($_.name, 2)
......@@ -102,9 +108,14 @@ role Perl6::Metamodel::BUILDPLAN {
for @attrs {
if nqp::can($_, 'build') {
my $default := $_.build;
my int $primspec := nqp::objprimspec($_.type);
#?if js
my int $is_oversized_int := $primspec == 4 || $primspec == 5;
$primspec := $is_oversized_int ?? 0 !! $primspec;
#?endif
if nqp::isconcrete($default) {
nqp::push(@plan,[
nqp::add_i(4,nqp::objprimspec($_.type)),
4 + $primspec,
$obj,
$_.name,
$default
......
......@@ -210,6 +210,8 @@ class Perl6::ModuleLoader does Perl6::ModuleLoaderVMConfig {
my $setting;
if $setting_name ne 'NULL' {
# XXX TODO: see https://github.com/rakudo/rakudo/issues/2432
$setting_name := 'CORE' if $setting_name eq 'NULL.d';
# Unless we already did so, locate and load the setting.
unless nqp::defined(%settings_loaded{$setting_name}) {
DEBUG("Loading settings $setting_name") if $DEBUG;
......
......@@ -1347,7 +1347,7 @@ class Perl6::Optimizer {
}
# May be able to eliminate some decontrv operations.
if $optype eq 'p6decontrv' {
if $optype eq 'p6decontrv' || $optype eq 'p6decontrv_6c' {
# If it's rw, don't need to decont at all.
my $value := $op[1];
return $value if $op[0].value.rw;
......@@ -1777,6 +1777,7 @@ class Perl6::Optimizer {
my int $survived := 0;
my $ret_value;
try {
my $*FOLDING := 1;
$ret_value := $obj(|@args);
$survived := 1 ;
CONTROL {
......@@ -1785,7 +1786,7 @@ class Perl6::Optimizer {
}
if $survived && self.constant_foldable_type($ret_value) {
return $NULL if $!void_context && !$!in_declaration;
$*W.add_object($ret_value);
$*W.add_object_if_no_sc($ret_value);
my $wval := QAST::WVal.new(:value($ret_value));
if $op.named {
$wval.named($op.named);
......@@ -2016,7 +2017,9 @@ class Perl6::Optimizer {
)
}
my @native_assign_ops := ['', 'assign_i', 'assign_n', 'assign_s'];
# The _i64 and _u64 are only used on backends that emulate int64/uint64
my @native_assign_ops := ['', 'assign_i', 'assign_n', 'assign_s', 'assign_i64', 'assign_u64'];
method optimize_nameless_call($op) {
return NQPMu
unless nqp::elems($op)
......@@ -2171,7 +2174,7 @@ class Perl6::Optimizer {
my $meth := $pkg.HOW.find_private_method($pkg, $name);
if nqp::defined($meth) && $meth {
if nqp::isnull(nqp::getobjsc($meth)) {
try $*W.add_object($meth);
try $*W.add_object_if_no_sc($meth);
}
unless nqp::isnull(nqp::getobjsc($meth)) {
my $call := QAST::WVal.new( :value($meth) );
......
This diff is collapsed.
......@@ -7,3 +7,20 @@ proto sub undefine(Mu, *%) is raw {
multi sub undefine(Mu \x) is raw { x = Nil }
multi sub undefine(Array \x) is raw { x = Empty }
multi sub undefine(Hash \x) is raw { x = Empty }
sub infix:<<(<+)>> (|) {
die "(<+) was removed in v6.d, please use (<=) operator instead
or compile your code with 'use v6.c'"
}
sub infix:<≼>(|) {
die "≼ was removed in v6.d, please use ⊆ operator instead
or compile your code with 'use v6.c'"
}
sub infix:<<(>+)>> (|) {
die "(>+) was removed in v6.d, please use (>=) operator instead
or compile your code with 'use v6.c'"
}
sub infix:<≽>(|) {
die "≽ was removed in v6.d, please use ⊇ operator instead
or compile your code with 'use v6.c'"
}
......@@ -1849,7 +1849,7 @@ Did you mean to add a stub (\{...\}) or did you mean to .classify?"
}
proto method pairup(|) is nodal {*}
multi method pairup(Any:U:) { () }
multi method pairup(Any:U:) { ().Seq }
multi method pairup(Any:D:) {
my \iter := self.iterator;
gather {
......
......@@ -30,6 +30,15 @@ my class Bag does Baggy {
!! self.SET-SELF(Rakudo::QuantHash.ADD-PAIRS-TO-BAG(
nqp::create(Rakudo::Internals::IterationSet), $iterator))
}
multi method STORE(Bag:D: \objects, \values, :$INITIALIZE! --> Bag:D) {
self.SET-SELF(
Rakudo::QuantHash.ADD-OBJECTS-VALUES-TO-BAG(
nqp::create(Rakudo::Internals::IterationSet),
objects.iterator,
values.iterator
)
)
}
multi method DELETE-KEY(Bag:D: \k) {
X::Immutable.new(method => 'DELETE-KEY', typename => self.^name).throw;
......
......@@ -12,6 +12,15 @@ my class BagHash does Baggy {
)
)
}
multi method STORE(BagHash:D: \objects, \values --> BagHash:D) {
self.SET-SELF(
Rakudo::QuantHash.ADD-OBJECTS-VALUES-TO-BAG(
nqp::create(Rakudo::Internals::IterationSet),
objects.iterator,
values.iterator
)
)
}
multi method AT-KEY(BagHash:D: \k) is raw {
Proxy.new(
FETCH => {
......@@ -203,12 +212,10 @@ my class BagHash does Baggy {
)
}
# same as Baggy.values
method push-all($target --> IterationEnd) {
nqp::while( # doesn't sink
$!iter,
$target.push(nqp::getattr(
nqp::iterval(nqp::shift($!iter)),Pair,'$!value'))
$target.push(proxy(nqp::shift($!iter),$!hash))
)
}
}
......
......@@ -12,6 +12,8 @@ my role Baggy does QuantHash {
# Immutables aspects of Bag/Mix, need to live to Bag/Mix respectively.
#--- interface methods
method of() { UInt }
multi method ACCEPTS(Baggy:U: \other --> Bool:D) {
other.^does(self)
}
......
......@@ -66,7 +66,7 @@ my class Block { # declared in BOOTSTRAP
method WHY() {
if nqp::isnull($!why) {
nextsame
nextsame unless $*COMPILING_CORE_SETTING;
} else {
$!why.set_docee(self);
$!why
......
my class X::Assignment::RO { ... }
my class X::Buf::AsStr { ... }
my class X::Buf::Pack { ... }
my class X::Buf::Pack::NonASCII { ... }
......@@ -41,11 +42,20 @@ my role Blob[::T = uint8] does Positional[T] does Stringy is repr('VMArray') is
nqp::splice(nqp::create(self),@values,0,0)
}
multi method new(Blob: @values) {
@values.is-lazy
?? Failure.new(X::Cannot::Lazy.new(:action<new>,:what(self.^name)))
!! self!push-list("initializ",nqp::create(self),@values)
nqp::create(self).STORE(@values, :INITIALIZE)
}
multi method new(Blob: *@values) {
nqp::create(self).STORE(@values, :INITIALIZE)
}
proto method STORE(Blob:D: |) {*}
multi method STORE(Blob:D: Iterable:D \iterable, :$INITIALIZE) {
$INITIALIZE
?? iterable.is-lazy
?? X::Cannot::Lazy.new(:action<store>,:what(self.^name)).throw
!! self!push-list("initializ",self,iterable)
!! X::Assignment::RO.new(:value(self)).throw
}
multi method new(Blob: *@values) { self.new(@values) }
proto method allocate(|) {*}
multi method allocate(Blob:U: Int:D $elements) {
......@@ -527,6 +537,19 @@ my role Buf[::T = uint8] does Blob[T] is repr('VMArray') is array_type(T) {
!! nqp::bindpos_i(self,$pos,assignee)
}
multi method STORE(Buf:D: Blob:D $blob) {
nqp::splice(nqp::setelems(self,0),$blob,0,0)
}
# The "is default" is needed to prevent runtime dispatch errors
multi method STORE(Buf:D: int @values) is default {
nqp::splice(nqp::setelems(self,0),@values,0,0)
}
multi method STORE(Buf:D: Iterable:D \iterable) {
iterable.is-lazy
?? X::Cannot::Lazy.new(:action<store>,:what(self.^name)).throw
!! self!push-list("initializ",nqp::setelems(self,0),iterable);
}
multi method list(Buf:D:) {
Seq.new(class :: does Rakudo::Iterator::Blobby {
method pull-one() is raw {
......
......@@ -12,10 +12,6 @@ class Collation {
Int :$tertiary = 1,
Int :$quaternary = 1)
{
nqp::isnull(nqp::getlexcaller('EXPERIMENTAL-COLLATION')) and X::Experimental.new(
feature => 'the $*COLLATION dynamic variable',
use => 'collation'
).throw;
my int $i = 0;
$i += 1 if $primary.sign == 1;
$i += 2 if $primary.sign == -1;
......
......@@ -285,7 +285,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
}
}
my @result = $out.lines.unique;
my @result is List = $out.lines.unique;
if $status { # something wrong
self.store.unlock;
$RMD("Precompiling $path failed: $status") if $RMD;
......
......@@ -6,7 +6,7 @@ class CompUnit::Repository::FileSystem does CompUnit::Repository::Locally does C
has $!precomp-stores;
has $!precomp-store;
my @extensions = <pm6 pm>;
my @extensions := <pm6 pm>;
my $extensions := nqp::hash('pm6',1,'pm',1);
# global cache of files seen
......
......@@ -145,7 +145,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
self!bin-dir;
if ($version < 1) {
for $short-dir.dir -> $file {
my @ids = $file.lines.unique;
my @ids is List = $file.lines.unique;
$file.unlink;
$file.mkdir;
for @ids -> $id {
......@@ -379,7 +379,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
# Scripts using this interface could only have been installed long after the introduction of
# repo version 1, so we don't have to care about very old repos in this method.
my @dists = $lookup.dir.map({
my @dists is List = $lookup.dir.map({
my ($ver, $auth, $api, $resource-id) = $_.slurp.split("\n");
$resource-id ||= self!read-dist($_.basename)<files>{$file};
(id => $_.basename, ver => Version.new( $ver || 0 ), :$auth, :$api, :$resource-id).hash
......@@ -398,7 +398,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
my $lookup = $prefix.add('short').add(nqp::sha1($name));
if $lookup.e {
my $repo-version = self!repository-version;
my @dists = $repo-version < 1
my @dists is List = $repo-version < 1
?? $lookup.lines.unique.map({
self!read-dist($_)
})
......@@ -423,7 +423,7 @@ sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {
my $repo-version = self!repository-version;
my $lookup = $.prefix.add('short').add(nqp::sha1($spec.short-name));
if $lookup.e {
my @dists = (
my @dists is List = (
$repo-version < 1
?? $lookup.lines.unique.map({
$_ => self!read-dist($_)
......
......@@ -10,6 +10,10 @@ class CompUnit::Repository::JavaRuntime { ... }
class CompUnit::Repository::Java { ... }
#?endif
#?if js
class CompUnit::Repository::FileSystemWithRecording { ... }