Commit 3f036b57 authored by Dominique Dumont's avatar Dominique Dumont

Imported Upstream version 2015.11

parent 6910f83b
......@@ -9,14 +9,15 @@ use Getopt::Long;
use File::Spec;
use Cwd;
use lib 'tools/lib';
use NQP::Configure qw(sorry slurp cmp_rev gen_nqp read_config
use NQP::Configure qw(sorry slurp cmp_rev gen_nqp read_config
fill_template_text fill_template_file
system_or_die verify_install);
my $lang = 'Rakudo';
my $lclang = lc $lang;
my $uclang = uc $lang;
my $slash = $^O eq 'MSWin32' ? '\\' : '/';
my $win = $^O eq 'MSWin32';
my $slash = $win ? '\\' : '/';
MAIN: {
......@@ -32,7 +33,8 @@ MAIN: {
my %options;
GetOptions(\%options, 'help!', 'prefix=s',
'backends=s', 'no-clean!',
'sysroot=s', 'sdkroot=s',
'backends=s', 'no-clean!',
'gen-nqp:s',
'gen-moar:s', 'moar-option=s@',
'git-protocol=s',
......@@ -50,9 +52,9 @@ MAIN: {
}
unless (defined $options{prefix}) {
my $dir = getcwd;
print "ATTENTION: no --prefix supplied, building and installing to $dir/install\n";
$options{prefix} = 'install';
my $default = defined($options{sysroot}) ? '/usr' : File::Spec->catdir(getcwd, 'install');
print "ATTENTION: no --prefix supplied, building and installing to $default\n";
$options{prefix} = $default;
}
$options{prefix} = File::Spec->rel2abs($options{prefix});
my $prefix = $options{'prefix'};
......@@ -122,15 +124,17 @@ MAIN: {
}
$config{prefix} = $prefix;
$config{sdkroot} = $options{sdkroot} || '';
$config{sysroot} = $options{sysroot} || '';
$config{slash} = $slash;
$config{'makefile-timing'} = $options{'makefile-timing'};
$config{'stagestats'} = '--stagestats' if $options{'makefile-timing'};
$config{'cpsep'} = $^O eq 'MSWin32' ? ';' : ':';
$config{'shell'} = $^O eq 'MSWin32' ? 'cmd' : 'sh';
$config{'runner_suffix'} = $^O eq 'MSWin32' ? '.bat' : '';
$config{'cpsep'} = $win ? ';' : ':';
$config{'shell'} = $win ? 'cmd' : 'sh';
$config{'runner_suffix'} = $win ? '.bat' : '';
my $make = 'make';
if ($^O eq 'MSWin32') {
if ($win) {
my $has_nmake = 0 == system('nmake /? >NUL 2>&1');
my $has_cl = `cl 2>&1` =~ /Microsoft Corporation/;
my $has_gmake = 0 == system('gmake --version >NUL 2>&1');
......@@ -147,37 +151,39 @@ MAIN: {
}
}
for my $target (qw/common_bootstrap_sources moar_core_sources/) {
open my $FILELIST, '<', "tools/build/$target"
or die "Cannot read 'tools/build/$target': $!";
my @lines;
while (<$FILELIST>) {
chomp;
push @lines, " $_\\\n";
}
close $FILELIST;
$config{$target} = join '', @lines;
}
open my $MAKEFILE, '>', 'Makefile'
or die "Cannot open 'Makefile' for writing: $!";
my @prefixes = map substr($_, 0, 1), @backends;
print $MAKEFILE "\n# Makefile code generated by Configure.pl:\n";
fill_template_file('tools/build/Makefile-common-macros.in', $MAKEFILE, %config);
my @prefixes = map substr($_, 0, 1), @backends;
my $launcher = substr($default_backend, 0, 1) . '-runner-default';
print $MAKEFILE "all: ", join(' ', map("$_-all", @prefixes), $launcher), "\n";
print $MAKEFILE "install: ", join(' ', map("$_-install", @prefixes), $launcher . '-install'), "\n";
print $MAKEFILE "clean: ", join(' ', map "$_-clean", @prefixes), "\n";
print $MAKEFILE "\t\$(RM_F) perl6\$(EXE) perl6\$(BAT)\n\n";
print $MAKEFILE "\t\$(RM_F) perl6", $config{'runner_suffix'},"\n\n";
for my $t (qw/test spectest coretest localtest stresstest/) {
print $MAKEFILE "$t: ", join(' ', map "$_-$t", @prefixes), "\n";
}
for my $target (qw/common_bootstrap_sources moar_core_sources/) {
open my $FILELIST, '<', "tools/build/$target"
or die "Cannot read 'tools/build/$target': $!";
my @lines;
while (<$FILELIST>) {
chomp;
push @lines, " $_\\\n";
}
close $FILELIST;
$config{$target} = join '', @lines;
}
fill_template_file('tools/build/Makefile-common.in', $MAKEFILE, %config);
fill_template_file('tools/build/Makefile-common-rules.in', $MAKEFILE, %config);
# determine the version of NQP we want
my ($nqp_want) = split(' ', slurp('tools/build/NQP_REVISION'));
......@@ -191,7 +197,7 @@ MAIN: {
my %errors;
if ($backends{jvm}) {
$config{j_nqp} = $impls{jvm}{bin};
$config{j_nqp} =~ s{/}{\\}g if $^O eq 'MSWin32';
$config{j_nqp} =~ s{/}{\\}g if $win;
my %nqp_config;
if ( $impls{jvm}{ok} ) {
%nqp_config = %{ $impls{jvm}{config} };
......@@ -220,8 +226,9 @@ MAIN: {
$config{'nqp_prefix'} = $nqp_config{'jvm::prefix'};
$config{'nqp_jars'} = $nqp_config{'jvm::runtime.jars'};
$config{'bld_nqp_jars'} = join( $config{'cpsep'}, map { $config{'sysroot'} . $_ } split( $config{'cpsep'}, $nqp_config{'jvm::runtime.jars'} ) );
$config{'nqp_classpath'} = $nqp_config{'jvm::runtime.classpath'};
$config{'j_runner'} = $^O eq 'MSWin32' ? 'perl6-j.bat' : 'perl6-j';
$config{'j_runner'} = $win ? 'perl6-j.bat' : 'perl6-j';
fill_template_file('tools/build/Makefile-JVM.in', $MAKEFILE, %config);
......@@ -229,7 +236,7 @@ MAIN: {
}
if ($backends{moar}) {
$config{m_nqp} = $impls{moar}{bin};
$config{m_nqp} =~ s{/}{\\}g if $^O eq 'MSWin32';
$config{m_nqp} =~ s{/}{\\}g if $win;
my %nqp_config;
if ( $impls{moar}{ok} ) {
%nqp_config = %{ $impls{moar}{config} };
......@@ -243,7 +250,7 @@ MAIN: {
$errors{moar}{'no gen-nqp'} = @errors && !defined $options{'gen-nqp'};
unless ($^O eq 'MSWin32') {
unless ($win) {
$config{'m_cleanups'} = " \$(M_GDB_RUNNER) \\\n \$(M_VALGRIND_RUNNER)";
$config{'m_all'} = '$(M_GDB_RUNNER) $(M_VALGRIND_RUNNER)';
$config{'m_install'} = ' $(PERL) tools/build/create-moar-runner.pl "$(MOAR)" perl6.moarvm $(DESTDIR)$(PREFIX)/bin/perl6-gdb-m "$(PERL6_LANG_DIR)/runtime" "gdb" "$(M_LIBPATH)" "$(PERL6_LANG_DIR)/lib" "$(PERL6_LANG_DIR)/runtime"' . "\n"
......@@ -254,10 +261,10 @@ MAIN: {
print "Using $config{m_nqp} (version $nqp_config{'nqp::version'} / MoarVM $nqp_config{'moar::version'}).\n";
$config{'perl6_ops_dll'} = sprintf($nqp_config{'moar::dll'}, 'perl6_ops_moar');
# Add moar library to link command
# TODO: Get this from Moar somehow
$config{'moarimplib'} = $^O =~ /^MSWin32|darwin$/
$config{'moarimplib'} = $win || $^O eq 'darwin'
? $nqp_config{'moar::libdir'} . '/' . $nqp_config{'moar::sharedlib'}
: '';
......@@ -320,6 +327,9 @@ Configure.pl - $lang Configure
General Options:
--help Show this text
--prefix=dir Install files in dir; also look for executables there
--sdkroot=dir When given, use for searching build tools here, e.g.
nqp, java etc.
--sysroot=dir When given, use for searching runtime components here
--backends=jvm,moar
Which backend(s) to use (or ALL for all of them)
--gen-nqp[=branch]
......
......@@ -90,6 +90,8 @@ docs/announce/2015.06.md
docs/announce/2015.07.md
docs/announce/2015.08.md
docs/announce/2015.09.md
docs/announce/2015.10.md
docs/announce/2015.11.md
docs/architecture.html
docs/architecture.svg
docs/compiler_overview.pod
......@@ -113,6 +115,7 @@ lib/NativeCall/Types.pm
lib/Pod/To/Text.pm
lib/Test.pm
lib/lib.pm6
lib/newline.pm6
src/Perl6/Actions.nqp
src/Perl6/Compiler.nqp
src/Perl6/Grammar.nqp
......@@ -131,6 +134,7 @@ src/Perl6/Metamodel/Configuration.nqp
src/Perl6/Metamodel/ContainerDescriptor.nqp
src/Perl6/Metamodel/CurriedRoleHOW.nqp
src/Perl6/Metamodel/DefaultParent.nqp
src/Perl6/Metamodel/DefiniteHOW.nqp
src/Perl6/Metamodel/Dispatchers.nqp
src/Perl6/Metamodel/Documenting.nqp
src/Perl6/Metamodel/EXPORTHOW.nqp
......@@ -205,8 +209,6 @@ src/core/Distribution.pm
src/core/Distro.pm
src/core/Duration.pm
src/core/EXPORTHOW.pm
src/core/Enum.pm
src/core/EnumMap.pm
src/core/Enumeration.pm
src/core/Env.pm
src/core/Exception.pm
......@@ -247,6 +249,8 @@ src/core/Iterable.pm
src/core/IterationBuffer.pm
src/core/Iterator.pm
src/core/JSON/Pretty.pm
src/core/JVM/IOAsyncFile.pm
src/core/JVM/KeyReducer.pm
src/core/Junction.pm
src/core/Kernel.pm
src/core/Label.pm
......@@ -254,6 +258,7 @@ src/core/List.pm
src/core/Lock.pm
src/core/Macro.pm
src/core/Main.pm
src/core/Map.pm
src/core/Match.pm
src/core/Metamodel/Primitives.pm
src/core/Method.pm
......@@ -269,7 +274,6 @@ src/core/ObjAt.pm
src/core/Order.pm
src/core/PIO.pm
src/core/Pair.pm
src/core/PairMap.pm
src/core/Parameter.pm
src/core/Perl.pm
src/core/Pod.pm
......@@ -280,6 +284,7 @@ src/core/Process.pm
src/core/Promise.pm
src/core/PseudoStash.pm
src/core/QuantHash.pm
src/core/Rakudo/Internals.pm
src/core/Range.pm
src/core/Rat.pm
src/core/Rational.pm
......@@ -341,8 +346,6 @@ src/vm/jvm/ModuleLoaderVMConfig.nqp
src/vm/jvm/Perl6/JavaModuleLoader.nqp
src/vm/jvm/Perl6/Metamodel/JavaHOW.nqp
src/vm/jvm/Perl6/Ops.nqp
src/vm/jvm/core/IOAsyncFile.pm
src/vm/jvm/core/KeyReducer.pm
src/vm/jvm/runtime/org/perl6/rakudo/Binder.java
src/vm/jvm/runtime/org/perl6/rakudo/RakOps.java
src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerConfigurer.java
......@@ -540,6 +543,7 @@ t/spec/S02-types/hash_ref.t
t/spec/S02-types/infinity.t
t/spec/S02-types/instants-and-durations.t
t/spec/S02-types/int-uint.t
t/spec/S02-types/is-type.t
t/spec/S02-types/isDEPRECATED.t
t/spec/S02-types/keyhash.t
t/spec/S02-types/lazy-lists.t
......@@ -608,13 +612,13 @@ t/spec/S03-operators/chained-declarators.t
t/spec/S03-operators/cmp.t
t/spec/S03-operators/comparison-simple.t
t/spec/S03-operators/comparison.t
t/spec/S03-operators/composition.t
t/spec/S03-operators/context-forcers.t
t/spec/S03-operators/context.t
t/spec/S03-operators/custom.t
t/spec/S03-operators/div.t
t/spec/S03-operators/equality.t
t/spec/S03-operators/eqv.t
t/spec/S03-operators/fiddly.t
t/spec/S03-operators/flip-flop.t
t/spec/S03-operators/gcd.t
t/spec/S03-operators/identity.t
......@@ -658,7 +662,6 @@ t/spec/S03-sequence/limit-arity-2-or-more.t
t/spec/S03-sequence/misc.t
t/spec/S03-sequence/nonnumeric.t
t/spec/S03-smartmatch/any-any.t
t/spec/S03-smartmatch/any-array.t
t/spec/S03-smartmatch/any-bool.t
t/spec/S03-smartmatch/any-callable.t
t/spec/S03-smartmatch/any-complex.t
......@@ -687,6 +690,7 @@ t/spec/S04-declarations/implicit-parameter.t
t/spec/S04-declarations/multiple.t
t/spec/S04-declarations/my.t
t/spec/S04-declarations/our.t
t/spec/S04-declarations/smiley.t
t/spec/S04-declarations/state.t
t/spec/S04-declarations/will.t
t/spec/S04-exception-handlers/catch.t
......@@ -736,7 +740,6 @@ t/spec/S04-statements/label.t
t/spec/S04-statements/last.t
t/spec/S04-statements/lazy.t
t/spec/S04-statements/leave.t
t/spec/S04-statements/lift.t
t/spec/S04-statements/loop.t
t/spec/S04-statements/map-and-sort-in-for.t
t/spec/S04-statements/next.t
......@@ -894,6 +897,7 @@ t/spec/S06-other/main-usage.t
t/spec/S06-other/main.t
t/spec/S06-other/misc.t
t/spec/S06-other/pairs-as-lvalues.t
t/spec/S06-parameters/smiley.t
t/spec/S06-routine-modifiers/lvalue-subroutines.t
t/spec/S06-routine-modifiers/native-lvalue-subroutines.t
t/spec/S06-routine-modifiers/proxy.t
......@@ -921,6 +925,7 @@ t/spec/S06-signature/passing-hashes.t
t/spec/S06-signature/positional-placeholders.t
t/spec/S06-signature/positional.t
t/spec/S06-signature/scalar-type.t
t/spec/S06-signature/shape.t
t/spec/S06-signature/sigilless.t
t/spec/S06-signature/slurpy-and-interpolation.t
t/spec/S06-signature/slurpy-blocks.t
......@@ -944,9 +949,16 @@ t/spec/S06-traits/native-is-rw.t
t/spec/S06-traits/precedence.t
t/spec/S06-traits/slurpy-is-rw.t
t/spec/S07-iterators/range-iterator.t
t/spec/S07-slip/slip.t
t/spec/S09-autovivification/autoincrement.t
t/spec/S09-autovivification/autovivification.t
t/spec/S09-hashes/objecthash.t
t/spec/S09-multidim/XX-POS-on-dimensioned.t
t/spec/S09-multidim/XX-POS-on-undimensioned.t
t/spec/S09-multidim/assign.t
t/spec/S09-multidim/decl.t
t/spec/S09-multidim/indexing.t
t/spec/S09-multidim/methods.t
t/spec/S09-subscript/multidim-assignment.t
t/spec/S09-subscript/slice.t
t/spec/S09-typed-arrays/arrays.t
......@@ -989,6 +1001,7 @@ t/spec/S12-attributes/instance.t
t/spec/S12-attributes/mutators.t
t/spec/S12-attributes/native.t
t/spec/S12-attributes/recursive.t
t/spec/S12-attributes/smiley.t
t/spec/S12-attributes/trusts.t
t/spec/S12-attributes/undeclared.t
t/spec/S12-class/anonymous.t
......@@ -1110,8 +1123,11 @@ t/spec/S15-literals/numbers.t
t/spec/S15-nfg/case-change.t
t/spec/S15-nfg/cgj.t
t/spec/S15-nfg/concatenation.t
t/spec/S15-nfg/crlf-encoding.t
t/spec/S15-nfg/from-buf.t
t/spec/S15-nfg/from-file.t
t/spec/S15-nfg/grapheme-break-test-gen.p6
t/spec/S15-nfg/grapheme-break.t
t/spec/S15-nfg/long-uni.t
t/spec/S15-nfg/many-combiners.t
t/spec/S15-nfg/many-threads.t
......@@ -1174,6 +1190,7 @@ t/spec/S15-string-types/Str.t
t/spec/S15-string-types/Uni.t
t/spec/S15-unicode-information/unimatch-general.t
t/spec/S15-unicode-information/uniname.t
t/spec/S15-unicode-information/uniprop.t
t/spec/S15-unicode-information/unival.t
t/spec/S16-filehandles/argfiles.t
t/spec/S16-filehandles/chmod.t
......@@ -1188,15 +1205,23 @@ t/spec/S16-filehandles/open.t
t/spec/S16-filehandles/unlink.t
t/spec/S16-io/bare-say.t
t/spec/S16-io/basic-open.t
t/spec/S16-io/bom.t
t/spec/S16-io/comb.t
t/spec/S16-io/cwd.t
t/spec/S16-io/getc.t
t/spec/S16-io/handles-between-threads.t
t/spec/S16-io/lines.t
t/spec/S16-io/newline.t
t/spec/S16-io/note.t
t/spec/S16-io/print.t
t/spec/S16-io/quoting-syntax.t
t/spec/S16-io/say-and-ref.t
t/spec/S16-io/say.t
t/spec/S16-io/split.t
t/spec/S16-io/supply.t
t/spec/S16-io/test-data
t/spec/S16-io/tmpdir.t
t/spec/S16-io/words.t
t/spec/S16-unfiled/getpeername.t
t/spec/S16-unfiled/rebindstdhandles.t
t/spec/S17-channel/basic.t
......@@ -1256,6 +1281,7 @@ t/spec/S17-supply/squish.t
t/spec/S17-supply/stable.t
t/spec/S17-supply/start.t
t/spec/S17-supply/syntax.t
t/spec/S17-supply/throttle.t
t/spec/S17-supply/unique.t
t/spec/S17-supply/wait.t
t/spec/S17-supply/watch-path.t
......@@ -1402,25 +1428,37 @@ t/spec/S32-list/classify.t
t/spec/S32-list/combinations.t
t/spec/S32-list/create.t
t/spec/S32-list/end.t
t/spec/S32-list/first-index.t
t/spec/S32-list/first-end-k.t
t/spec/S32-list/first-end-p.t
t/spec/S32-list/first-end-v.t
t/spec/S32-list/first-end.t
t/spec/S32-list/first-k.t
t/spec/S32-list/first-p.t
t/spec/S32-list/first-v.t
t/spec/S32-list/first.t
t/spec/S32-list/grep-index.t
t/spec/S32-list/grep-k.t
t/spec/S32-list/grep-kv.t
t/spec/S32-list/grep-p.t
t/spec/S32-list/grep-v.t
t/spec/S32-list/grep.t
t/spec/S32-list/head.t
t/spec/S32-list/join.t
t/spec/S32-list/last-index.t
t/spec/S32-list/map.t
t/spec/S32-list/map_function_return_values.t
t/spec/S32-list/minmax.t
t/spec/S32-list/numbers.data
t/spec/S32-list/permutations.t
t/spec/S32-list/pick.t
t/spec/S32-list/produce.t
t/spec/S32-list/reduce.t
t/spec/S32-list/repeated.t
t/spec/S32-list/reverse.t
t/spec/S32-list/roll.t
t/spec/S32-list/rotor.t
t/spec/S32-list/seq.t
t/spec/S32-list/sort.t
t/spec/S32-list/squish.t
t/spec/S32-list/tail.t
t/spec/S32-list/unique.t
t/spec/S32-num/abs.t
t/spec/S32-num/base.t
......@@ -1435,6 +1473,7 @@ t/spec/S32-num/log.t
t/spec/S32-num/narrow.t
t/spec/S32-num/pi.t
t/spec/S32-num/polar.t
t/spec/S32-num/polymod.t
t/spec/S32-num/power.t
t/spec/S32-num/rand.t
t/spec/S32-num/rat.t
......@@ -1458,6 +1497,7 @@ t/spec/S32-str/comb.t
t/spec/S32-str/contains.t
t/spec/S32-str/encode.t
t/spec/S32-str/ends-with.t
t/spec/S32-str/fc.t
t/spec/S32-str/flip.t
t/spec/S32-str/indent.t
t/spec/S32-str/index.t
......@@ -1485,6 +1525,7 @@ t/spec/S32-str/tclc.t
t/spec/S32-str/trim.t
t/spec/S32-str/uc.t
t/spec/S32-str/unpack.t
t/spec/S32-str/utf8-c8.t
t/spec/S32-str/words.t
t/spec/S32-temporal/Date.t
t/spec/S32-temporal/DateTime-Instant-Duration.t
......@@ -1708,11 +1749,13 @@ t/spec/t/fudge.t
t/spec/test_summary
t/spectest.data
tools/autounfudge.pl
tools/available-pm-names.pl6
tools/benchmark.pl
tools/build-localtest.pl
tools/build/Makefile-JVM.in
tools/build/Makefile-Moar.in
tools/build/Makefile-common.in
tools/build/Makefile-common-macros.in
tools/build/Makefile-common-rules.in
tools/build/NQP_REVISION
tools/build/check-versions.pl
tools/build/common_bootstrap_sources
......
New in 2015.11:
+ Features
+ Initial shaped array support
+ \r\n (Carriage Return/LineFeed) is now a single (synthetic) grapheme
+ Unicode support adheres to Unicode Annex #29
+ New IO::Handle.nl-in now allows multiple line-endings to be set
+ New IO::Handle.nl-out allows you to set line-ending used in IO::Handle.say
+ New IO::Handle.split/comb, same feature set as Str.split/comb, but lazy
+ IO::Handle.seek now accepts new SeekType enum values as 2nd parameter
+ New $?NL contains the output new-line character(s) for the current system
+ New 'use newline' pragma allows setting of $?NL
+ New List.head/tail methods for easier getting first/last N elements
+ New List.repeated for only getting repeated values in a list
+ Str.encode now allows :replacement parameter for unencodable sequences
+ Str.split now accepts multiple strings to split on
+ Str.split now accepts :v, :k, :kv, :p, :skip-empty named params
+ Str.comb(Int:D $n) candidate allows for combing string per $n characters
+ New Range.int-bounds returns first/last value for integer ranges
+ EVAL now passes on named params, to allow for customised EVAL subs
+ Auto-generated meta-ops vivified by referring to them, instead of executing
+ Unicode quotes are now also allowed in regular expressions
+ Can now coerce to generic types in parameters
+ Can attach adverbs to variables
+ Illegal assignment of different Numeric values now caught at compile time
+ &nextcallee implemented, which returns the routine that nextsame would invoke
+ Deprecated
+ IO::Handle.nl should either be IO::Handle.nl-in or .nl-out
+ IO::Handle.seek with a numerical value for 2nd parameter
+ Str.split( ... :all) should be written as :v