Skip to content

Commit

Permalink
Enable support for --stagestats in Rakudo
Browse files Browse the repository at this point in the history
This consists of a bugfix analogous to 9d4c8a9 in NQP-rx, and changes the
Makefile system to pass --stagestats to Rakudo when compiling the setting
and Test.pm in --makefile-timing builds.

Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
  • Loading branch information
sorear authored and moritz committed May 11, 2010
1 parent 3d3893a commit 53fda34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Configure.pl
Expand Up @@ -163,6 +163,7 @@ sub create_makefile {

my $maketext = slurp( 'build/Makefile.in' );

$config{'stagestats'} = $makefile_timing ? '--stagestats' : '';
$config{'win32_libparrot_copy'} = $^O eq 'MSWin32' ? 'copy $(PARROT_BIN_DIR)\libparrot.dll .' : '';
$maketext =~ s/@(\w+)@/$config{$1}/g;
if ($^O eq 'MSWin32') {
Expand Down
6 changes: 4 additions & 2 deletions build/Makefile.in
Expand Up @@ -289,6 +289,8 @@ CLEANUPS = \
HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code --icu=$(HAS_ICU)
HARNESS_WITH_FUDGE_JOBS = $(HARNESS_WITH_FUDGE) --jobs

STAGESTATS = @stagestats@

# the default target
all: $(PERL6_EXE) Test.pir

Expand All @@ -313,7 +315,7 @@ $(PERL6_EXE): $(PERL6_PBC)

# the complete compiler, including core/setting
$(PERL6_PBC): $(S1_PERL6_PBC) src/gen/core.pm
$(PARROT) $(PARROT_ARGS) $(S1_PERL6_PBC) --target=pir \
$(PARROT) $(PARROT_ARGS) $(S1_PERL6_PBC) --target=pir $(STAGESTATS) \
src/gen/core.pm > $(CORE_PIR)
$(PARROT) $(PARROT_ARGS) -o $(PERL6_PBC) src/Perl6/Compiler.pir

Expand Down Expand Up @@ -410,7 +412,7 @@ $(PMC_DIR)/objectref.pmc : $(PMC_DIR)/objectref_pmc.template build/gen_objectref

## testing targets
Test.pir: Test.pm perl6.pbc
$(PARROT) $(PARROT_ARGS) perl6.pbc --target=pir --output=Test.pir Test.pm
$(PARROT) $(PARROT_ARGS) perl6.pbc $(STAGESTATS) --target=pir --output=Test.pir Test.pm

test : coretest

Expand Down
6 changes: 3 additions & 3 deletions src/Perl6/Compiler.pir
Expand Up @@ -117,9 +117,9 @@ Perl6::Compiler - Perl6 compiler
nqpproto.'parsegrammar'($P0)
$P0 = get_hll_global ['Perl6'], 'Actions'
nqpproto.'parseactions'($P0)
$P0 = split ' ', 'e=s help|h target=s dumper=s trace|t=s encoding=s output|o=s combine version|v parsetrace'
setattribute nqpproto, '@cmdoptions', $P0
$P0 = getattribute nqpproto, '@cmdoptions'
push $P0, 'parsetrace'

# Set up @*INC from $PERL6LIB, languages/perl6/lib and ~/.perl6/lib
.local pmc env, interp, config
# Convert PERL6LIB first
Expand Down

0 comments on commit 53fda34

Please sign in to comment.