Commit f4a695bd authored by Alessandro Ghedini's avatar Alessandro Ghedini

Imported Upstream version 0.1~2011.07

parent 121a582a
......@@ -2,6 +2,8 @@
src/gen/*
nqp-rx/
Makefile
config.status
RPBENCH
.*.swp
*.patch
*.pdb
......
......@@ -11,8 +11,10 @@ use Parrot::CompareRevisions qw(compare_revs parse_revision_file read_config ver
MAIN: {
my %options;
my $rakudo_configure_options = join(' ', map { "\"$_\"" } @ARGV);
GetOptions(\%options, 'help!', 'parrot-config=s', 'makefile-timing!',
'gen-parrot!', 'gen-parrot-prefix=s', 'gen-parrot-option=s@');
'gen-parrot!', 'gen-parrot-prefix=s', 'gen-parrot-option=s@',
'ignore-parrot-rev');
# Print help if it's requested
if ($options{'help'}) {
......@@ -27,7 +29,7 @@ MAIN: {
# parrot's Configure.pl mishandles win32 backslashes in --prefix
$prefix =~ s{\\}{/}g;
my @command = ($^X, "build/gen_parrot.pl", "--prefix=$prefix",
'--gc=gms', ($^O !~ /win32/i ? "--optimize" : ()), @opts);
($^O !~ /win32/i ? "--optimize" : ()), @opts);
print "Generating Parrot ...\n";
print "@command\n\n";
......@@ -65,7 +67,7 @@ MAIN: {
if ($config{git_describe}) {
# a parrot built from git
if (compare_revs($git_describe, $config{'git_describe'}) > 0) {
$parrot_errors .= "Parrot revision $git_describe required (currently $config{'git_describe'})\n";
$parrot_errors .= "Parrot revision $git_describe required (currently $config{'git_describe'})\n" unless $options{'ignore-parrot-rev'};
}
}
else {
......@@ -95,6 +97,13 @@ END
create_makefile($options{'makefile-timing'}, %config);
my $make = $config{'make'};
print "Creating config.status ...\n";
if (open(my $CONFIG_STATUS, '>', 'config.status')) {
print $CONFIG_STATUS
"$^X Configure.pl $rakudo_configure_options \$*\n";
close($CONFIG_STATUS);
}
{
no warnings;
print "Cleaning up ...\n";
......@@ -112,6 +121,14 @@ or '$make spectest' to check out (via git) a copy of the Perl 6
official test suite and run its tests.
END
if ($options{'ignore-parrot-rev'}) {
print <<"END";
You are using the --ignore-parrot-rev option, which disables sanity checks.
Please don't report build or test failures from this rakudo build to rakudobug.
END
}
exit 0;
}
......@@ -170,7 +187,17 @@ sub create_makefile {
}
if ($makefile_timing) {
$maketext =~ s{(?<!\\\n)^\t(?!\s*-?cd)(?=[^\n]*\S)}{\ttime }mg;
$maketext =~
s{
(?<!\\\n) # neg lookbehind: not after a line ending in '\'
^ # beginning of line
(\t(?>@?)) # capture tab and optional @
(?!\s*-) # neg lookahead: do not want - (ignore error) lines
(?!\s*cd) # neg lookahead: do not want cd lines
(?!\s*echo) # neg lookahead: do not want echo lines
(?=[^\n]*\S) # pos lookahead: want nonblank lines
}
{$1time\ }mgx;
}
my $outfile = 'Makefile';
......@@ -213,6 +240,8 @@ General Options:
Use config information from parrot_config executable
Experimental developer's options:
--makefile-timing Insert 'time' command all over in the Makefile
--ignore-parrot-rev Ignore minimum required parrot revison.
Please only use this option for development purposes.
END
return;
......
......@@ -92,7 +92,7 @@ multi sub isnt(Mu $got, Mu $expected, $desc) is export {
multi sub isnt(Mu $got, Mu $expected) is export { isnt($got, $expected, ''); }
multi sub is_approx(Mu $got, Mu $expected, $desc) is export {
my $test = $got !~~ NaN && ($got - $expected).abs <= 1/100000;
my $test = ($got - $expected).abs <= 1/100000;
proclaim(?$test, $desc);
unless $test {
diag("got: $got");
......
......@@ -284,7 +284,6 @@ CLEANUPS = \
# NOTE: eventually, we should remove --keep-exit-code and --fudge
# as the goal is that all tests must pass without fudge
HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code --icu=$(HAS_ICU)
HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs
STAGESTATS = @stagestats@
......@@ -421,27 +420,27 @@ coretest: Test.pir $(PERL6_EXE)
# Run the spectests that we know work.
spectest_regression: spectest
spectest: testable t/spectest.data
$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data
$(HARNESS_WITH_FUDGE) --tests-from-file=t/spectest.data
spectest_full: testable
$(HARNESS_WITH_FUDGE_JOBS) t/spec
$(HARNESS_WITH_FUDGE) t/spec
quicktest: testable t/spectest.data
$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data --long=0
$(HARNESS_WITH_FUDGE) --tests-from-file=t/spectest.data --long=0
stresstest: testable t/spectest.data
$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data --stress=1
$(HARNESS_WITH_FUDGE) --tests-from-file=t/spectest.data --stress=1
spectest_checkout : t/spec
t/spec :
git clone git://github.com/perl6/roast.git t/spec
spectest_update :
-cd t/spec && git pull
- cd t/spec && git fetch && git checkout rakudo-master && git merge origin/rakudo-master
rakudo_test_run.tar.gz: testable t/spectest.data
- $(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/spectest.data --archive rakudo_test_run.tar.gz --parrot_revision @revision@
- $(HARNESS_WITH_FUDGE) --tests-from-file=t/spectest.data --archive rakudo_test_run.tar.gz --parrot_revision @revision@
spectest_smolder: rakudo_test_run.tar.gz
./perl6 -e "run qqx[git log -1 --pretty=format:%H].fmt(qq[curl -F architecture=@cpuarch@ -F platform=@osname@ -F revision=%s -F report_file=@rakudo_test_run.tar.gz -F username=parrot-autobot -F password=qa_rocks http://smolder.parrot.org/app/projects/process_add_report/5])"
......@@ -453,7 +452,7 @@ t/localtest.data:
# Run the tests in t/localtest.data
localtest: all Test.pir spectest_checkout t/localtest.data
@$(HARNESS_WITH_FUDGE_JOBS) --tests-from-file=t/localtest.data
@$(HARNESS_WITH_FUDGE) --tests-from-file=t/localtest.data
# Run the tests in t/localtest.data with a higher verbosity
localtest_loud: all Test.pir spectest_checkout t/localtest.data
......@@ -462,7 +461,7 @@ localtest_loud: all Test.pir spectest_checkout t/localtest.data
# Run many tests of your choice.
# make sometests TESTFILES=t/foo/bar
sometests: all
@$(HARNESS_WITH_FUDGE_JOBS) $(TESTFILES)
@$(HARNESS_WITH_FUDGE) $(TESTFILES)
# Run a single test
t/*.t t/*/*.t t/*/*/*.t: all Test.pir spectest_checkout
......
New in 2011.07
+ fractional powers of negative numbers now result in Complex numbers
+ obtain spectests from a specific branch of the `roast' repo
+ fix bug that prevented build on systems with little RAM
New in 2011.06
+ added take-rw built-in
+ numerous build system improvements
+ assignment now evaluates arguments right-to-left
New in 2011.05 release
+ added a call counter for builtins in Perl 6-level subroutines
+ gcd (greatest common divisor) and lcm (largest common multiple) operators
+ build system improvements
+ added --ignore-parrot-rev option to Configure.pl
+ Configure.pl now creates "config.status" file
+ fixed relational operators when used with NaN
+ implemented Int.base
+ speedup smart-matching against numbers and Str.comb with default arguments
+ added RAKUDO_SUBLOG environment var for tracking subroutine calls
+ overall performance speedups
New in 2011.04 release
+ implemented Str.indent
+ A new, much simpler API and implemention of IO::Socket::INET
......
Announce: Rakudo Perl 6 compiler development release #41 ("Dahut")
On behalf of the Rakudo development team, I'm happy to announce the
May 2011 release of Rakudo Perl #41 "Dahut". Rakudo is an
implementation of Perl 6 on the Parrot Virtual Machine (see
<http://www.parrot.org>). The tarball for the May 2011 release
is available from <http://github.com/rakudo/rakudo/downloads>.
Please note: This announcement is not for the Rakudo Star distribution --
it's announcing a new release of the compiler only. For the latest
Rakudo Star release, see <http://github.com/rakudo/star/downloads>.
The Rakudo Perl compiler follows a monthly release cycle, with each release
named after a Perl Mongers group. The May 2011 release is code named
"Dahut".
Some of the specific changes and improvements occurring with this
release include:
* added a call counter for builtins in Perl 6-level subroutines
* gcd (greatest common divisor) and lcm (largest common multiple) operators
* implemented Int.base
For a more detailed list of changes, see "docs/ChangeLog".
The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible, as well as those people who worked on
Parrot, the Perl 6 test suite and the specification.
The following people contributed to this release:
Patrick R. Michaud, Moritz Lenz, Jonathan Scott Duff, Tadeusz Sośnierz,
Carl Masak, Solomon Foster, bacek
If you would like to contribute, see <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 (#42) is scheduled for June 23, 2011.
A list of the other planned release dates and code names for 2011 is
available in the "docs/release_guide.pod" file. In general, Rakudo
development releases are scheduled to occur two days after each
Parrot monthly release. Parrot releases the third Tuesday of each month.
Have fun!
Announce: Rakudo Perl 6 compiler development release #42 ("Bruxelles")
On behalf of the Rakudo development team, I'm happy to announce the
June 2011 release of Rakudo Perl #42 "Bruxelles". Rakudo is an
implementation of Perl 6 on the Parrot Virtual Machine (see
<http://www.parrot.org>). The tarball for the June 2011 release
is available from <http://github.com/rakudo/rakudo/downloads>.
Please note: This announcement is not for the Rakudo Star distribution --
it's announcing a new release of the compiler only. For the latest
Rakudo Star release, see <http://github.com/rakudo/star/downloads>.
The Rakudo Perl compiler follows a monthly release cycle, with each release
named after a Perl Mongers group. The June 2011 release is code named
"Bruxelles".
DON'T PANIC: Browsing the change log below, it might appear
as though not much Rakudo development is taking place. Nearly
all of the development activity is now occurring in the "nom"
branch of the Rakudo repository (over 500 commits since the 2011.05
release). This new branch will shortly become the mainline branch
from which monthly releases are made, and already contains many
important bugfixes and performance improvements.
Some of the specific changes and improvements occurring in the
master branch with this release include:
* Fixed a bug with &infix:<=> when used in multiple assignments to
aggregate elements.
* Improved parrot register handling for more efficient code.
* Added take-rw and return-rw functions.
For a more detailed list of changes, see "docs/ChangeLog".
The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible, as well as those people who worked on
Parrot, the Perl 6 test suite and the specification.
The following people contributed to this release:
Patrick R. Michaud, Moritz Lenz, Martin Berends, Tadeusz Sośnierz,
JD Horelick, and others.
If you would like to contribute, see <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 (#43) is scheduled for July 21, 2011.
A list of the other planned release dates and code names for 2011 is
available in the "docs/release_guide.pod" file. In general, Rakudo
development releases are scheduled to occur two days after each
Parrot monthly release. Parrot releases the third Tuesday of each month.
Have fun and don't forget your towel!
Announce: Rakudo Perl 6 compiler development release #43 ("Beijing")
On behalf of the Rakudo development team, I'm happy to announce the
July 2011 release of Rakudo Perl #43 "Beijing". Rakudo is an
implementation of Perl 6 on the Parrot Virtual Machine (see
<http://www.parrot.org>). The tarball for the July 2011 release
is available from <http://github.com/rakudo/rakudo/downloads>.
Please note: This announcement is not for the Rakudo Star distribution --
it's announcing a new release of the compiler only. For the latest
Rakudo Star release, see <http://github.com/rakudo/star/downloads>.
The Rakudo Perl compiler follows a monthly release cycle, with each release
named after a Perl Mongers group. The July 2011 release is code named
"Beijing" after the host of the Beijing Perl Workshop 2011, which featured
several Perl 6 related talks.
This will be the last compiler release made from the current "master"
branch of Rakudo. For the past several months, Rakudo compiler
development has primarily occurred in the "nom" branch of the
Rakudo repository (over 1200 commits since the 2011.05 release).
Shortly after this release, the "nom" branch will become the new
"master" branch and will be the source for future releases,
including the 2011.08 release. We expect there will be several
releases in the near future -- watch http://rakudo.org/ for
details.
Some of the specific changes and improvements occurring in the
master branch with this release include:
* Fix bug in exponentation of negative numbers
* Fix build on systems with little RAM
For a more detailed list of changes, see "docs/ChangeLog".
The development team thanks all of our contributors and sponsors for
making Rakudo Perl possible, as well as those people who worked on
Parrot, the Perl 6 test suite and the specification.
The following people contributed to this release:
Moritz Lenz, Patrick R. Michaud, atrodo, Solomon Foster, bacek and others.
If you would like to contribute, see <http://rakudo.org/how-to-help>, ask on
the perl6-compiler@perl.org mailing list, or ask on IRC #perl6 on freenode.
Rakudo has traditionally released two days after each Parrot
monthly release. Because the new version of the compiler has
additional dependencies beyond Parrot, starting in August 2011
we will make releases sometime in the week following each monthly
Parrot release. (Parrot releases occur on the third Tuesday of
each month.) Thus the next regular release of Rakudo will occur
sometime before August 23, 2011. We also expect to have additional
"pre-release" versions of Rakudo and Rakudo Star prior to that date.
A list of the other planned release dates and code names for 2011
is available in the "docs/release_guide.pod" file.
......@@ -38,24 +38,29 @@ part of monthly Parrot releases.
2011-01-20 Rakudo #37 "BristolBath" (tadzik)
2011-02-17 Rakudo #38 "Toulouse" (arnsholt)
2011-03-17 Rakudo #39 "Orlando" (jdhore)
2011-04-21 Rakudo #40 "ZA" (duff)
2011-05-19 Rakudo #41 "Dahut" (jdhore)
2011-06-23 Rakudo #42 "Bruxelles" (jdhore)
2011-07-21 Rakudo #43 "Beijing" (mberends,moritz)
=head2 Planned 2011 releases
Dates are based on Parrot's expected release schedule.
2011-04-21 Rakudo #40 (duff)
2011-05-19 Rakudo #41 (jdhore)
2011-06-23 Rakudo #42 -vacant-
2011-07-21 Rakudo #43 -vacant-
2011-08-18 Rakudo #44 -vacant-
2011-09-22 Rakudo #45 -vacant-
2011-10-20 Rakudo #46 -vacant-
2011-10-20 Rakudo #46 (duff)
2011-11-17 Rakudo #47 -vacant-
2011-12-22 Rakudo #48 -vacant-
=head2 Suggested .pm group names for future releases
(none yet)
MadMongers (YAPC::NA 2012)
Columbus (YAPC::NA 2011, p6 track and hackathon)
Riga (YAPC::EU 2011, p6 track and hackathon)
Houston (YAPC::NA 2007, p6 hackathon)
Brazos Valley (YAPC::NA 2007, p6 hackathon)
Toronto (YAPC::NA 2005, p6 hackathon)
More names can be gotten from L<http://www.pm.org> if you
can't think of one with any particular significance to Perl
......@@ -125,7 +130,7 @@ The short period following the Parrot release until the
Rakudo release is generally intended for fixing bugs,
updating documentation, and so on.
=item 3.
=item 4.
Update Rakudo's leap-second tables:
......@@ -139,7 +144,7 @@ commit the new version:
But probably there won't be any new leap seconds, in which case the file
will be unchanged.
=item 4.
=item 5.
As the actual release date nears, review the git log history
to see if any additional items need to be added to the ChangeLog.
......@@ -147,7 +152,7 @@ This can be conveniently done with "git log --since=yyyy-mm-dd --reverse".
$ git commit docs/ChangeLog
=item 5.
=item 6.
When it's time to cut the release, create a new release announcement
in docs/announce/YYYY.MM. It's often a good idea to use the
......@@ -162,12 +167,14 @@ You can get an automatically generated list by running
$ perl tools/contributors.pl
B<Note>: this program requires the perl module L<Date::Simple> be installed.
Please check the result manually for duplicates and other errors.
$ git add docs/announce/YYYY.MM
$ git commit docs
=item 6.
=item 7.
Update the release dates and names at the top of this file
(F<docs/release_guide.pod>). Also improve these instructions if
......@@ -175,7 +182,7 @@ you find any steps that are missing.
$ git commit docs/release_guide.pod
=item 7.
=item 8.
Make sure everything compiles and runs from a known clean state:
......@@ -199,66 +206,61 @@ Often this means fixing a bug, fudging a test, or (temporarily?)
commenting out a test file in t/spectest.data . Use your best
judgment or ask others if uncertain what to do here.
=item 7.5
=item 9.
Enter the new version into the F<VERSION> file, and commit the changes:
$ echo 2010.09 > VERSION
$ git commit -m '[release] bump VERSION' VERSION
=item 8.
=item 10.
Make sure any locally modified files have been pushed back to github.
$ git status
$ git push
=item 9.
=item 11.
Create a tarball by entering C<make release VERSION=YYYY.MM>,
where YYYY.MM is the month for which the release is being made.
This will create a tarball file named <rakudo-YYYY.MM.tgz>.
This will create a tarball file named <rakudo-YYYY.MM.tar.gz>.
B<Caution>: this steps removes any untracked files in F<t/spec>.
B<Caution>: this step removes any untracked files in F<t/spec>.
So please make a backup if you have any important data in there.
=item 10.
=item 12.
Unpack the tar file into another area, and test that it
builds and runs properly. If there are any problems,
fix them and go back to step 7.
builds and runs properly using the same process in step 7.
If there are any problems, fix them and go back to step 7.
=item 11.
=item 13.
Tag the release by its release month ("MMMM.YY") and its code name.
Tag the release by its release month ("YYYY.MM") and its code name.
$ git tag -a -m"tag release #nn" MMMM.YY # e.g., 2010.02
$ git tag -a -m"tag release #nn" YYYY.MM # e.g., 2010.02
$ git tag -a -m"tag release #nn" CODENAME # e.g., "Bratislava"
$ git push --tags
=item 12.
=item 14.
Upload the release tarball to github's download area at
L<http://github.com/rakudo/rakudo/downloads>.
=item 13.
=item 15.
To avoid public confusion with Rakudo Star releases that will
follow a few days after each compiler release, we now publish
To avoid public confusion with Rakudo Star releases, we now publish
compiler release announcements ONLY to perl6-compiler@perl.org.
(We may restart widespread announcements of compiler releases
once they are known, or we may begin publishing a single
announcement for both.)
=item 14.
=item 16.
Update the Wikipedia entry at L<http://en.wikipedia.org/wiki/Rakudo>.
=item 15.
Promote the release anywhere else you think appropriate.
=item 16.
=item 17.
You're done! Celebrate with the appropriate amount of fun.
......
......@@ -244,6 +244,7 @@ method statementlist($/) {
elsif $ast.isa(PAST::Block) && !$ast.blocktype {
$ast := block_immediate($ast);
}
$ast := PAST::Stmt.new($ast) if $ast ~~ PAST::Node;
$past.push( $ast );
}
}
......@@ -2286,7 +2287,7 @@ method circumfix:sym<{ }>($/) {
$is_hash := 1;
}
elsif $stmts == 1 {
my $elem := $past[1][0];
my $elem := $past[1][0][0];
if $elem ~~ PAST::Op && $elem.name eq '&infix:<,>' {
# block contains a list, so test the first element
$elem := $elem[0];
......@@ -2358,6 +2359,9 @@ method EXPR($/, $key?) {
$past := PAST::Op.new( :node($/) );
if $<OPER><O><pasttype> { $past.pasttype( ~$<OPER><O><pasttype> ); }
elsif $<OPER><O><pirop> { $past.pirop( ~$<OPER><O><pirop> ); }
if $<OPER><O><childorder> {
$past.childorder( ~$<OPER><O><childorder> );
}
unless $past.name {
if $key eq 'LIST' { $key := 'infix'; }
my $name := Q:PIR {
......@@ -3153,6 +3157,7 @@ sub add_signature($block, $sig_obj) {
:pirop('bind_llsig vP'),
PAST::Var.new( :name('call_sig'), :scope('lexical') )
));
$block[0].push(PAST::Op.new( :pirop('x_enter_sublog v') ) );
# make signature setup block
my $lazysig := PAST::Block.new(:blocktype<declaration>, $sig_obj.ast(1));
......
......@@ -42,10 +42,20 @@ Perl6::Compiler - Perl6 compiler
say " run 'make install' and use the installed perl6 binary"
exit 1
startup_ok:
load_bytecode 'P6Regex.pbc'
# set up sublog tracing if desirec
.local pmc env, sublog_pmc
.local string sublog_file
env = root_new ['parrot';'Env']
sublog_file = env['RAKUDO_SUBLOG']
unless sublog_file goto sublog_done
sublog_pmc = root_new['parrot';'FileHandle']
sublog_pmc."open"(sublog_file, "w")
set_hll_global '$!SUBLOG', sublog_pmc
sublog_done:
# Init Rakudo dynops.
rakudo_dynop_setup
......@@ -231,6 +241,13 @@ Perl6::Compiler - Perl6 compiler
$P0 = compreg 'perl6'
$P1 = $P0.'command_line'(args_str, 'encoding'=>'utf8', 'transcode'=>'ascii iso-8859-1')
'!fire_phasers'('END')
# close any sublog
.local pmc sublog_pmc
sublog_pmc = get_hll_global '$!SUBLOG'
if null sublog_pmc goto sublog_done
sublog_pmc."close"()
sublog_done:
exit 0
.end
......
......@@ -6,7 +6,7 @@ has %!dummy;
method methods() {
if $*SCOPE eq '' || $*SCOPE eq 'has' {
pir::printerr("Useless declaration of has-scoped " ~ $*METHODTYPE ~
" in a module; add our or my to install it in the lexpad or namespace\n");
" in a module; add my or our to install it in the lexpad or namespace\n");
}
%!dummy
}
......
......@@ -183,7 +183,7 @@ token def_module_name {
token end_keyword {
<!before <[ \( \\ ' \- ]> || \h* '=>'> »
}
token spacey { <?before <[ \s \# ]> > }
token spacey { <?before [\s | '#']> }
token ENDSTMT {
[
......@@ -1821,6 +1821,8 @@ token prefix:sym<|> { <sym> <O('%symbolic_unary')> }
token infix:sym<*> { <sym> <O('%multiplicative')> }
token infix:sym</> { <sym> <O('%multiplicative')> }
token infix:sym<div> { <sym> >> <O('%multiplicative')> }
token infix:sym<gcd> { <sym> >> <O('%multiplicative')> }
token infix:sym<lcm> { <sym> >> <O('%multiplicative')> }
token infix:sym<%> { <sym> <O('%multiplicative')> }
token infix:sym<mod> { <sym> >> <O('%multiplicative')> }
token infix:sym<%%> { <sym> <O('%multiplicative, :iffy<1>')> }
......@@ -1974,7 +1976,7 @@ token infix:sym<=> {
<sym>
[
|| <?{ $*LEFTSIGIL eq '$' }> <O('%item_assignment, :reducecheck<assign_check>')>
|| <O('%list_assignment, :reducecheck<assign_check>')>
|| <O('%list_assignment, :reducecheck<assign_check>, :childorder<right>')>
]
}
......
......@@ -30,6 +30,7 @@ This file implements the Any class.
.namespace ['Any']
.sub 'can' :method
.param pmc x
x_enter_sublog
$P0 = self.'HOW'()
.tailcall $P0.'can'(self, x)
.end
......@@ -40,6 +41,7 @@ This file implements the Any class.
.sub 'isa' :method
.param pmc x
x_enter_sublog
$P0 = self.'HOW'()
.tailcall $P0.'isa'(self, x)
.end
......@@ -50,6 +52,7 @@ This file implements the Any class.
.sub 'does' :method
.param pmc x
x_enter_sublog
$P0 = self.'HOW'()
.tailcall $P0.'does'(self, x)
.end
......@@ -59,6 +62,7 @@ This file implements the Any class.
=cut
.sub 'list' :method
x_enter_sublog
$P0 = new ['List']
$P1 = root_new ['parrot';'ResizablePMCArray']
push $P1, self
......
......@@ -26,6 +26,7 @@ Arrays are the mutable form of Lists.
.sub 'new' :method
.param pmc values :slurpy
x_enter_sublog
.local pmc p6meta, parrotclass, list, true
p6meta = get_hll_global ['Mu'], '$!P6META'
parrotclass = p6meta.'get_parrotclass'(self)
......@@ -52,6 +53,7 @@ Arrays are the mutable form of Lists.
.namespace []
.sub '&circumfix:<[ ]>'
.param pmc values :slurpy
x_enter_sublog
$P0 = get_hll_global 'Array'
$P1 = $P0.'new'(values)
.return ($P1)
......@@ -68,6 +70,7 @@ Arrays are the mutable form of Lists.
.namespace ['Array']
.sub '!STORE' :method
.param pmc source
x_enter_sublog
.local pmc list, flat, items, rest
$P0 = get_hll_global 'Seq'
list = $P0.'new'(source)
......@@ -96,6 +99,7 @@ Create an element for the Array (has the 'rw' property set).
.namespace ['Array']
.sub '!elem' :method
.param pmc item
x_enter_sublog
.local pmc elem, true
true = get_hll_global ['Bool'], 'True'
item = descalarref item
......
......@@ -28,6 +28,7 @@ cases looping back to here to get the one value.
.param pmc invocant
.param pmc args :optional
.param int has_args :opt_flag
x_enter_sublog
$I0 = can invocant, 'postcircumfix:<{ }>'
if $I0 goto object_method
......
......@@ -35,17 +35,19 @@ symbols for C<Bool::True> and C<Bool::False>.
.sub 'succ' :method
x_enter_sublog
$P0 = get_global 'True'
.return ($P0)
.end
.sub 'pred' :method
x_enter_sublog
$P0 = get_global 'False'
.return ($P0)
.end
.sub '' :method :vtable('get_string')
.sub '' :method :vtable('get_string') :subid('Bool.vtable_get_string')
if self goto true
.return ('Bool::False')
true:
......
......@@ -33,6 +33,7 @@ them.
.sub 'new' :method
.param pmc pos_args :slurpy
.param pmc named_args :slurpy :named
x_enter_sublog
# Create capture.
$P0 = self.'CREATE'('P6opaque')
......@@ -48,6 +49,7 @@ them.
.sub 'postcircumfix:<[ ]>' :method :vtable('get_pmc_keyed_int')
.param int i
x_enter_sublog
$P0 = getattribute self, '$!pos'
$P0 = $P0[i]
.return ($P0)
......@@ -60,6 +62,7 @@ them.
.sub 'postcircumfix:<{ }>' :method :vtable('get_pmc_keyed_str')
.param pmc key
x_enter_sublog