Commit 1c61537f authored by Daniel Dehennin's avatar Daniel Dehennin

Imported Upstream version 2016.07.1

parent eca46c9d
......@@ -8,7 +8,6 @@ use Text::ParseWords;
use Getopt::Long;
use File::Spec;
use Cwd;
use Perl::OSType 'is_os_type';
use lib 'tools/lib';
use NQP::Configure qw(sorry slurp cmp_rev gen_nqp read_config
fill_template_text fill_template_file
......@@ -169,7 +168,7 @@ MAIN: {
print $MAKEFILE "\n# Makefile code generated by Configure.pl:\n";
if (is_os_type('Unix')) {
if ( is_OS_type_Unix() ) {
$config{mkpath} = 'mkdir -p --';
$config{chmod} = 'chmod --';
$config{cp} = 'cp --';
......@@ -337,6 +336,22 @@ MAIN: {
exit 0;
}
sub is_OS_type_Unix {
# The following is a partial OS list taken from Perl::OSType module,
# copyright by David Golden. The up-to-date version of that module can
# be found at https://metacpan.org/pod/Perl::OSType
return 1 if grep $^O eq $_, qw/
aix bsdos beos bitrig dgux dragonfly dynixptx
freebsd linux haiku hpux iphoneos irix darwin
machten midnightbsd minix mirbsd next openbsd netbsd
dec_osf nto svr4 svr5 sco sco_sv unicos
unicosmk solaris sunos cygwin msys os2 interix
gnu gnukfreebsd nto qnx android
/;
return 0;
}
# Print some help text.
sub print_help {
......
......@@ -92,6 +92,8 @@ docs/announce/2016.03.md
docs/announce/2016.04.md
docs/announce/2016.05.md
docs/announce/2016.06.md
docs/announce/2016.07.1.md
docs/announce/2016.07.md
docs/architecture.html
docs/architecture.svg
docs/ChangeLog
......@@ -115,6 +117,7 @@ dynext/IGNORE
gen/jvm/.gitignore
gen/moar/.gitignore
INSTALL.txt
lib/CompUnit/Repository/Staging.pm
lib/experimental.pm6
lib/NativeCall/Compiler/GNU.pm6
lib/NativeCall/Compiler/MSVC.pm6
......@@ -169,6 +172,7 @@ src/core/CompUnit/Repository/NQP.pm
src/core/CompUnit/Repository/Perl5.pm
src/core/CompUnit/Repository.pm
src/core/CompUnit/RepositoryRegistry.pm
src/core/CompUnit/Repository/Unknown.pm
src/core/control.pm
src/core/Cool.pm
src/core/core_epilogue.pm
......@@ -303,6 +307,7 @@ src/main.nqp
src/Perl6/Actions.nqp
src/Perl6/Compiler.nqp
src/perl6-debug.nqp
src/Perl6/DebugPod.nqp
src/Perl6/Grammar.nqp
src/Perl6/Metamodel/Archetypes.nqp
src/Perl6/Metamodel/ArrayType.nqp
......@@ -359,6 +364,8 @@ src/Perl6/Optimizer.nqp
src/Perl6/Pod.nqp
src/Perl6/World.nqp
src/RESTRICTED.setting
src/vm/jvm/CompUnit/Repository/Java.pm
src/vm/jvm/CompUnit/Repository/JavaRuntime.pm
src/vm/jvm/ModuleLoaderVMConfig.nqp
src/vm/jvm/Perl6/JavaModuleLoader.nqp
src/vm/jvm/Perl6/Metamodel/JavaHOW.nqp
......@@ -401,10 +408,12 @@ t/01-sanity/99-test-basic.t
t/02-rakudo/01-is_approx.t
t/02-rakudo/02-new-is-approx.t
t/02-rakudo/03-cmp-ok.t
t/02-rakudo/04-diag.t
t/02-rakudo/dump.t
t/02-rakudo/repl.t
t/02-rakudo/test-packages/CustomOps.pm6
t/03-jvm/01-interop.t
t/03-jvm/Foo.java
t/04-nativecall/01-argless.c
t/04-nativecall/01-argless.t
t/04-nativecall/02-simple-args.c
......@@ -468,6 +477,7 @@ tools/build/makeSLICE.pl6
tools/build/moar_core_sources
tools/build/nqp-jvm-rr.pl
tools/build/NQP_REVISION
tools/build/upgrade-repository.pl
tools/commit-stats.pl
tools/contributors.pl6
tools/create-release-announcement.pl
......
......@@ -104,11 +104,12 @@ to cc: the perl6-compiler mailing list, as the RT system will handle
this on its own. Please start your subject with one (or more) of the
following text, including the brackets:
* [BUG] - this is an actual bug
* [LTA] - a "Less Than Awesome" diagnostic or warning is being generated
* [JVM] - issue only occurs on the JVM
* [PERF] - any performance related issue
* [UNI] - related to unicode support
* [BUG] - this is an actual bug
* [LTA] - a "Less Than Awesome" diagnostic or warning is being generated
* [JVM] - issue only occurs on the JVM
* [PERF] - any performance related issue
* [UNI] - related to unicode support
* [@LARRY] - this ticket requires a decision from the design team
If you find a bug in MoarVM or NQP, you can either discuss it on the IRC
and have it reported for you, or you can submit an issue to the issue
......
New in 2016.07.1
+ Fixes:
+ `make DESTDIR` now correctly finds CompUnit::Repository::Staging
+ .polymod with a lazy list no longer loses mods if the list runs out
+ Output from Test.pm6's diag() is no longer lost in non-verbose prove output
when called at the start of the test file or during TODO tests
+ Bitwise operators that return int/Int no longer fail with candidate error
when given a native int argument
+ Additions:
+ Improved error message when IO::Path.new is given incorrect arguments
+ Improved error message when .polymod is given a zero as divisor
+ Efficiency:
+ Str.samecase is now 5x faster
+ Str.indices is 10% faster
+ Str.rindex is 30% faster
+ Str.index is 30% faster
New in 2016.07
+ Fixes:
+ Mu can now be the result of a Promise
+ samewith() now also works on non-multi's
+ Many fixes in the area of pre-compilation and installing modules
+ Maps now correctly identify themselves as value objects
+ BagHashes and MixHashes no longer identify themselves as value objects
+ count-only and bool-only now are optional methods in Iterators
(only to be implemented if they can work without generating anything)
+ Hash.Map now properly creates immutable Map
+ IO::ArgFiles.slurp / IO::ArgFiles.eof are fixed
+ Several wrapper file fixes
+ If a file is unknown in an error report, it is no longer shown
(This typically happens in the REPL, or when doing an EVAL)
+ REPL whitespace and error handling
+ CompUnit::Repository::Installation no longer considers `bin/xxx` and
`resources/bin/xxx` the same content address
+ Callable in a Signatures stringifies correctly
+ BEGIN time EVAL no longer negatively affects MAIN_CTX
+ Str.chop correctly works when given very large arguments
+ min/max on Failures throw instead of returning ±Inf
+ NativeCall's is mangled trait no longer ignored for CPPStruct
+ Additions:
+ The "is required" trait on Attributes can now take a Bool or a Str
+ Support for new leap-second at 31-12-2016 added
+ IO::[Path,Handle] gained a .mode method which returns the POSIX file permissions
+ Fixed LTA error message with Str.samemark when no pattern present
+ Distribution is now a role interface that enables encapsulating IO
used for distribution installation
+ CompUnit::Repository::Installation now uses the new Distribution interface
+ The original distribution META `provides` data is now preserved
+ Custom repository implementations now supported, including precompilation
+ List.BIND-POS now fails instead of throwing
+ RAKUDO_JDB_PORT and RAKUDO_PRECOMP_NESTED_JDB debug environmental
variables
+ Failures in Cool.Numeric and related coercers now get propagated
+ Improved warning message for literals with leading zeros
+ Improved error message for attempts to `use` core types
+ Efficiency:
+ The MMD cache accepts candidates with named parameters if it can.
(This made adverbed slices about 18x as fast)
+ Str.samemark is 50x faster
+ Str.contains is 6x faster
+ Baggy.pick(N)/pick()/roll()/grab() are 6x faster
+ Array.List is 5x faster
+ List.elems is 4.5x faster
+ for/map with 2 arguments is 4x faster (e.g. for @a.kv -> $i, $v { })
+ Str.substr-eq is 4x faster
+ List.Bool is 4x faster
+ Str.chop is about 3.5x faster, Str.chop(N) 20% faster
+ Map eqv Map is 3x faster
+ Make "for List.pairs {}" 2.5x faster
+ Array.pop is 2.5x faster
+ List.AT-POS/EXISTS-POS are 2.5x faster
+ Creating arrays with [] is 2.5x faster
+ Array.AT-POS/ASSIGN-POS/BIND-POS at least 2x faster for unreified elements
+ Array.DELETE-POS is 7x faster
+ Str.starts-with is 2x faster
+ Array.shift is 2x faster
+ Baggy.roll(*) is 2x faster
+ Blob/Buf.AT-POS is 2x faster (underlying method of e.g. "$buf[2]")
+ List.STORE is 2x faster (e.g. "my ($a,$b,$c) = (1,2,3)")
+ Make "for List.kv {}" 1.8x faster
+ Array.push/append is 40% faster
+ Str.comb 30% faster
+ Map/Hash initializations are now 30% faster
+ A slurpy taking a list is 30% faster ("sub a(*@a) { }; a(1,2,3,4)")
+ Str.ends-with is 25% faster.
+ Str.chomp is 20% faster
+ single element for/map in sink context without phasers, is 20% faster
+ Pair.new is 10% faster
+ val() is 5% faster
+ {}|[]:adverb is 2.5x faster
+ foo xx Int is 10% faster
+ Str.Int is 5% faster
+ Code.arity|count are 2x faster
New in 2016.06
+ Fixes:
+ Arrays with holes (e.g. from :delete) now correctly iterate/auto-vivify
......
......@@ -40,13 +40,24 @@ Notable changes in this release are outlined below:
return handlers (including those that do not use return)
+ Deprecations:
+ The "is_approx" sub (note underscore) from Test
+ Potential issues:
+ There's been an unconfirmed report this release fails NativeCall
tests when attempting to build an .rpm package. Basic evaluation showed
packaged NativeCall still works fine and currently the cause of test
failures is unknown.
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
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
......
# Announce: Rakudo Perl 6 compiler, Release 2016.07.1
On behalf of the Rakudo development team, I'm announcing an
out-of-schedule release of the Rakudo Perl 6 compiler.
Rakudo is an implementation of Perl 6 on the Moar Virtual Machine[^1].
This release is a point release in addition to the regular, monthly
releases. Rakudo 2016.07 (note: no .1) was discovered to have issues with
make DESTDIR[^3], which creates a problem for packagers. As this month
will also see the next Rakudo Star[^2] release, based on the latest Rakudo,
the development team decided it was worth it to make a point release
fixing the packaging issues.
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/>.
Other changes since the 2016.07 release are also included in this point release:
New in 2016.07.1:
+ Fixes:
+ `make DESTDIR` now correctly finds CompUnit::Repository::Staging
+ .polymod with a lazy list no longer loses mods if the list runs out
+ Output from Test.pm6's diag() is no longer lost in non-verbose prove output
when called at the start of the test file or during TODO tests
+ Bitwise operators that return int/Int no longer fail with candidate error
when given a native int argument
+ Additions:
+ Improved error message when IO::Path.new is given incorrect arguments
+ Improved error message when .polymod is given a zero as divisor
+ Efficiency:
+ Str.samecase is now 5x faster
+ Str.indices is 10% faster
+ Str.rindex is 30% faster
+ Str.index is 30% faster
The following people contributed to this release:
Zoffix Znet, Stefan Seifert, Elizabeth Mattijsen, Christian Bartolomäus
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 (#102), is tentatively scheduled for 2016-08-20.
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?
[^3]: See https://rt.perl.org/Ticket/Display.html?id=128652
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.
# Announce: Rakudo Perl 6 compiler, Release #101 (2016.07)
On behalf of the Rakudo development team, I’m very happy to announce the
July 2016 release of Rakudo Perl 6 #101. 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.07:
+ Fixes:
+ Mu can now be the result of a Promise
+ samewith() now also works on none-multi's
+ Many fixes in the area of pre-compilation and installing modules
+ count-only and bool-only now are optional methods in Iterators
(only to be implemented if they can work without generating anything)
+ IO::ArgFiles.slurp / IO::ArgFiles.eof are fixed
+ REPL whitespace and error handling
+ CompUnit::Repository::Installation no longer considers `bin/xxx` and
`resources/bin/xxx` the same content address
+ min/max on Failures throw instead of returning ±Inf
+ NativeCall's is mangled trait no longer ignored for CPPStruct
+ Additions:
+ Support for new leap-second at 31-12-2016 added
+ The "is required" trait on Attributes can now take a Bool or a Str
+ IO::[Path,Handle] gained a .mode method which returns the POSIX file permissions
+ Distribution is now a role interface that enables encapsulating IO
used for distribution installation
+ CompUnit::Repository::Installation now uses the new Distribution interface
+ Custom repository implementations now supported, including precompilation
+ Efficiency:
+ The MMD cache accepts candidates with named parameters if it can.
(This made adverbed slices about 18x as fast)
+ Str.samemark is 50x faster
+ Str.contains is 6x faster
+ Baggy.pick(N)/pick()/roll()/grab() are 6x faster
+ Array.List is 5x faster
+ List.elems is 4.5x faster
+ for/map with 2 arguments is 4x faster (e.g. for @a.kv -> $i, $v { })
+ Str.substr-eq is 4x faster
+ List.Bool is 4x faster
+ Map eqv Map is 3x faster
+ Make "for List.pairs {}" 2.5x faster
+ Array.pop is 2.5x faster
+ List.AT-POS/EXISTS-POS are 2.5x faster
+ Creating arrays with [] is 2.5x faster
+ Array.AT-POS/ASSIGN-POS/BIND-POS at least 2x faster for unreified elements
+ Array.DELETE-POS is 7x faster
+ Str.starts-with is 2x faster
+ Array.shift is 2x faster
+ Blob/Buf.AT-POS is 2x faster (underlying method of e.g. "$buf[2]")
+ List.STORE is 2x faster (e.g. "my ($a,$b,$c) = (1,2,3)")
+ Make "for List.kv {}" 1.8x faster
+ Array.push/append is 40% faster
+ Str.comb 30% faster
+ Map/Hash initializations are now 30% faster
+ A slurpy taking a list is 30% faster ("sub a(*@a) { }; a(1,2,3,4)")
+ Pair.new is 10% faster
+ {}|[]:adverb is 2.5x 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:
Elizabeth Mattijsen, Zoffix Znet, Jan-Olof Hendig, Stefan Seifert, Tom Browder, Wenzel P. P. Peppmeyer, Pepe Schwarz, Brock Wilcox, Jonathan Worthington, Aleks-Daniel Jakimenko-Aleksejev, Pawel Murias, Will "Coke" Coleda, Daniel Green, Josh Soref, Nick Logan, Christian Bartolomäus, Salvador Ortiz, Altai-man, Jonathan Stowe, Timo Paulssen, Brad Gilbert, Moritz Lenz, Steve Mynott, David H. Adler, neuron, ianmcb, Tobias Leich, Matt Oates, Rob Hoelz, Altai-ch, LLFourn
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 (#102), is tentatively scheduled for 2016-08-20.
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-07-16 Rakudo #101
2016-08-20 Rakudo #102
2016-08-20 Rakudo #102 (Zoffix; but space open for anyone wanting to learn to do a release)
2016-09-17 Rakudo #103
2016-10-15 Rakudo #104
2016-11-19 Rakudo #105
......@@ -84,7 +83,9 @@ There is a helper script C<tools/create-release-announcement.pl> that
will create a basic release announcement for you based on the state
of the repository and the current date. Feel free to use it to
save yourself some time, but please look over its output if you decide
to use it.
to use it:
./perl6 tools/create-release-announcement.pl > docs/announce/YYYY.MM.md
=item *
......@@ -102,8 +103,9 @@ Update Rakudo’s leap-second tables:
$ perl tools/update-tai-utc.pl
If a new leap second has been announced, F<tai-utc.pm> will be modified, so
commit the new version:
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
......@@ -133,11 +135,14 @@ 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
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>.
To obtain all contributors, ensure you have all supporting repositories
checked out, before running (this is 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
......@@ -197,7 +202,7 @@ Make sure everything compiles and runs from a known clean state:
Install Inline::Perl5 so stresstest can use it.
$ git clone git@github.com:tadzik/panda.git
$ git clone https://github.com/tadzik/panda
$ export PATH=`pwd`/install/bin:$PATH
$ cd panda; perl6 bootstrap.pl
$ cd ..
......@@ -206,7 +211,9 @@ Install Inline::Perl5 so stresstest can use it.
=item 13.
Now run the stresstests for stable and lastest specs.
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
......@@ -257,7 +264,7 @@ 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 #nn" YYYY.MM # e.g., 2013.08
$ 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
......@@ -271,18 +278,18 @@ that prove impossible, you can omit the C<-s> from the command line.
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-YYY-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,
masak, tadzik, moritz, PerlJam/perlpilot, [Coke], lizmat, timotimo, fsergot,
hoelzro) on #perl6 to do it for you.
masak, tadzik, moritz, PerlJam/perlpilot, [Coke], lizmat, timotimo, fsergot,
hoelzro, Zoffix) on #perl6 or #perl6-dev to do it for you.
=item 19.
......@@ -404,6 +411,8 @@ Previous releases were bundled as part of monthly Parrot releases.
2016-04-19 Rakudo #98 "2016.04" (Coke)
2016-05-21 Rakudo #99 "2016.05" (hoelzro)
2016-06-18 Rakudo #100 "2016.06" (Zoffix)
2016-07-16 Rakudo #101 "2016.07" (Zoffix)
2016-07-18 2016.07.1 (Zoffix)
=head1 COPYRIGHT
......
class CompUnit::Repository::Staging is CompUnit::Repository::Installation {
has Str $.name;
submethod BUILD(Str :$!name --> Nil) { }
method short-id() { 'staging' }
method name(--> Str) {
$!name
}
method path-spec(CompUnit::Repository::Staging:D:) {
self.^name ~ '#name(' ~ $!name ~ ')#' ~ $.prefix.abspath;
}
method source-file(Str $name --> IO::Path) {
my $file = self.prefix.child($name);
$file.e ?? $file !! self.next-repo.source-file($name)
}
}
# vim: ft=perl6
......@@ -18,6 +18,22 @@ my constant CArray is export(:types, :DEFAULT) = NativeCall::Types::CArra
my constant Pointer is export(:types, :DEFAULT) = NativeCall::Types::Pointer;
my constant OpaquePointer is export(:types, :DEFAULT) = NativeCall::Types::Pointer;
# Role for carrying extra calling convention information.
my role NativeCallingConvention[$name] {
method native_call_convention() { $name };
}
# Role for carrying extra string encoding information.
my role NativeCallEncoded[$name] {
method native_call_encoded() { $name };
}
my role NativeCallMangled[$name] {
method native_call_mangled() { $name }
}
# Throwaway type just to get us some way to get at the NativeCall
# representation.
my class native_callsite is repr('NativeCall') { }
......@@ -164,15 +180,16 @@ sub type_code_for(Mu ::T) {
}
sub gen_native_symbol(Routine $r, :$cpp-name-mangler) {
if $r.package.REPR eq 'CPPStruct' {
$cpp-name-mangler($r, $r.?native_symbol // ($r.package.^name ~ '::' ~ $r.name))
}
elsif $r.?native_call_mangled {
if ! $r.?native_call_mangled {
# Native symbol or name is said to be already mangled
$r.?native_symbol // $r.name;
} elsif $r.package.REPR eq 'CPPStruct' {
# Mangle C++ classes
$cpp-name-mangler($r, $r.?native_symbol // ($r.package.^name ~ '::' ~ $r.name));
} else {
# Mangle C
$cpp-name-mangler($r, $r.?native_symbol // $r.name)
}
else {
$r.?native_symbol // $r.name
}
}
multi sub map_return_type(Mu $type) { Mu }
......@@ -273,9 +290,17 @@ my role Native[Routine $r, $libname where Str|Callable|List] {
has Pointer $!entry-point;
method !setup() {
# Make sure that C++ methotds are treated as mangled (unless set otherwise)
if self.package.REPR eq 'CPPStruct' and not self.does(NativeCallMangled) {
self does NativeCallMangled[True];
}
my $guessed_libname = guess_library_name($libname);
$!cpp-name-mangler = %lib{$guessed_libname} //
(%lib{$guessed_libname} = guess-name-mangler($r, $guessed_libname));
if self.does(NativeCallMangled) and $r.?native_call_mangled {
# if needed, try to guess mangler
$!cpp-name-mangler = %lib{$guessed_libname} //
(%lib{$guessed_libname} = guess-name-mangler($r, $guessed_libname));
}
my Mu $arg_info := param_list_for($r.signature, $r);
my $conv = self.?native_call_convention || '';
nqp::buildnativecall(self,
......@@ -304,20 +329,6 @@ my role Native[Routine $r, $libname where Str|Callable|List] {
}
}
# Role for carrying extra calling convention information.
my role NativeCallingConvention[$name] {
method native_call_convention() { $name };
}
# Role for carrying extra string encoding information.
my role NativeCallEncoded[$name] {
method native_call_encoded() { $name };
}
my role NativeCallMangled[$name] {
method native_call_mangled() { $name }
}
multi sub postcircumfix:<[ ]>(CArray:D \array, $pos) is export(:DEFAULT, :types) {
$pos ~~ Iterable ?? $pos.map: { array.AT-POS($_) } !! array.AT-POS($pos);
}
......
This diff is collapsed.
......@@ -58,7 +58,6 @@ class Perl6::Compiler is HLL::Compiler {
}
method interactive(*%adverbs) {
nqp::say("To exit type 'exit' or '^D'");
my $p6repl;
try {
......@@ -80,8 +79,7 @@ class Perl6::Compiler is HLL::Compiler {
nqp::setencoding($stdin, $encoding);
}
my $result := $p6repl.repl-loop(:interactive(1), |%adverbs);
$result
$p6repl.repl-loop(:interactive(1), |%adverbs)
}
method interactive_exception($ex) {
......
# various helper methods for debugging Pod parsing and
# processing
# to use these subroutines, in the calling file:
#
# use Perl6::DebugPod;
#
# to call the subroutines, in the using file:
#
# Perl6::DebugPod::foo(...);
class Perl6::DebugPod {
#============================================
# subs for debugging
#============================================
our sub is_type($obj) {
return 'list' if nqp::islist($obj);
return 'hash' if nqp::ishash($obj);
return 'int' if nqp::isint($obj);
return 'num' if nqp::isnum($obj);
return 'str' if nqp::isstr($obj);
my $s := $obj.ast;
die("FATAL: Unknown type '$s'");
}
our sub debug_rows($desc, @rows) {
say("=======================================================================");
say($desc);
say("=======================================================================");
my $i := 0;
while $i < +@rows {
# we expect table rows to be a list or a string--make sure they are
if !nqp::islist(@rows[$i]) {
my $typ := is_type(@rows[$i]);
nqp::die("FATAL: not a string, it's a '$typ'") if !nqp::isstr(@rows[$i]);
say("row $i: '{@rows[$i]}' ");
}
else {
print("row $i cells: ");
for @rows[$i] -> $cell {
print(" '$cell',");
}
print("\n");
}
$i := $i + 1;
}
say("=======================================================================");
say("End 'debug_rows'");
say("=======================================================================");
}
our sub debug_array($desc, @arr) {
say("=======================================================================");
say($desc);
say("=======================================================================");
# expecting a list
nqp::die("FATAL: incoming array is not a list") if !nqp::islist(@arr);