Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 18 commits
  • 21 files changed
  • 0 commit comments
  • 3 contributors
Commits on Dec 28, 2012
@moritz moritz catch p5 regex adverbs after s/// a11bad6
@moritz moritz [ROADMAP] add two missing language features 69bbd1a
@moritz moritz work around missing sink context from traits
fixes "is assoc"
9303692
Commits on Dec 29, 2012
@moritz moritz run tests for "is assoc" trait c7479c3
@jnthn jnthn Mark %structural as non-assoc. 7d3e01f
Commits on Dec 30, 2012
@moritz moritz throw typed exception for non-associative operators 13e8052
Commits on Jan 02, 2013
@jnthn jnthn Teach compile time bind analysis about (|) sig.
It now recognizes such a signature as accepting anything, and thus
certain to be a successful match.
0f0bb50
@jnthn jnthn Check proto as well as candidates in optimizer.
This fixes issues where we could end up inlining calls to candidates
that would never be reachable due to restrictions in the proto. Also,
we catch some such issues at compile time now.
f63c42d
@jnthn jnthn Fix incorrect exp proto. 799d759
@jnthn jnthn Improve error reporting when proto is to blame. bd41d2f
@moritz moritz remove "SAFE" setting f5037ef
Commits on Jan 03, 2013
@FROGGS FROGGS fixed typos of X::Import::Redeclaration's message
The list of symbols at the end only makes sense to print if they were not mentioned before.
cdb0fa6
Commits on Jan 04, 2013
@moritz moritz delete old perl6doc files 70262f8
@moritz moritz fix DateTime.Date (RT #114758)' 6d4b902
Commits on Jan 05, 2013
@moritz moritz RT #109586: .pick on a large range has too little entropy
fixed by using nqp::rand_I instead of Num.rand
a930588
Commits on Jan 06, 2013
@moritz moritz crude implementation of "require ::($modulename) <importlist>
only works for a single chunk, e.g. "require Test::($name) <&symbols>" does not work
60c572c
@moritz moritz document environment variables
patch by flussence++
e67fa90
Commits on Jan 07, 2013
@moritz moritz sink FIRST and ENTER phasers d30d7bc
View
1 docs/ChangeLog
@@ -2,6 +2,7 @@ New in 2013.01
+ sink context; for-loops are now lazy by default
+ first mentioning a variable from outer scope and then redeclaring it
in the same scope (my $a; { $a; my $a }) is now an error.
++ the long-deprecated "SAFE" setting has been removed
New in 2012.12
+ ~/.perl6/lib is gone from the default include path
View
4 docs/ROADMAP
@@ -1,7 +1,7 @@
Rakudo Roadmap
--------------
-Last updated: 2012-12-18
+Last updated: 2012-12-28
This document serves as a guide to the major goals for Rakudo
development, as things stood in December 2011. They have been
@@ -75,6 +75,8 @@ Language Features
2 ** MAIN and USAGE (japhb)
2 ** Failure changes (japhb)
2 *** coercion types
+2 * tr///
+2 ** 'no strict;'
3 *** domain specific languages -- slang and grammar tweaks
3 **** more advanced Perl 5 interop (lexical embedding, etc.)
3 ? Parse and execute simple Perl 5 code
View
21 docs/running.pod
@@ -42,6 +42,27 @@ where
post = an intermediate format representing the parrot opcode syntax tree
pir = the parrot intermediate representation
+=head1 List of env vars used in Rakudo
+
+=over
+
+=item C<RAKUDOLIB>, C<PERL6LIB> (src/core/terms.pm)
+
+Appends a delimited list of paths to C<@INC>. C<RAKUDOLIB> is evaluated first.
+
+=item C<RAKUDO_MODULE_DEBUG> (src/Perl6/ModuleLoader.pm)
+
+If set to a non-false value, causes the module loader to print debugging information to standard
+error.
+
+=item C<RAKUDO_ERROR_COLOR> (src/core/Exception.pm)
+
+Controls whether to emit ANSI codes for error highlighting. Defaults to true if unset, except on
+Win32.
+
+=back
+
+
=head1 PARROT OPTIONS
To specify options to the underlying parrot VM, you must explicitly run
View
38 src/Perl6/Actions.pm
@@ -44,38 +44,6 @@ class Perl6::Actions is HLL::Actions does STDActions {
$STATEMENT_PRINT := 0;
}
- sub sink($past) {
- my $name := $past.unique('sink');
- QAST::Want.new(
- $past,
- 'v',
- QAST::Stmts.new(
- QAST::Op.new(:op<bind>,
- QAST::Var.new(:$name, :scope<local>, :decl<var>),
- $past,
- ),
- QAST::Op.new(:op<if>,
- QAST::Op.new(:op<if>,
- QAST::Op.new(:op<isconcrete>,
- QAST::Var.new(:$name, :scope<local>),
- ),
- QAST::Op.new(:op<if>,
- QAST::Op.new(:op<can>,
- QAST::Var.new(:$name, :scope<local>),
- QAST::SVal.new(:value('sink')),
- ),
- QAST::Op.new(:op<defined>,
- QAST::Var.new(:$name, :scope<local>),
- )
- )
- ),
- QAST::Op.new(:op<callmethod>, :name<sink>,
- QAST::Var.new(:$name, :scope<local>),
- ),
- ),
- ),
- );
- }
my %sinkable := nqp::hash(
'call', 1,
'callmethod', 1,
@@ -89,7 +57,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
);
sub autosink($past) {
nqp::istype($past, QAST::Op) && %sinkable{$past.op} && !$past<nosink>
- ?? sink($past)
+ ?? $*W.sink($past)
!! $past;
}
@@ -960,7 +928,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
method statement_control:sym<require>($/) {
my $past := QAST::Stmts.new(:node($/));
my $name_past := $<module_name>
- ?? QAST::SVal.new(:value($<module_name><longname><name>.Str))
+ ?? $*W.disect_longname($<module_name><longname>).name_past()
!! $<EXPR>[0].ast;
$past.push(QAST::Op.new(
@@ -5279,7 +5247,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
if $handler<past_block><handlers> && nqp::existskey($handler<past_block><handlers>, 'SUCCEED') {
my $suc := $handler<past_block><handlers><SUCCEED>;
$suc[0] := QAST::Stmts.new(
- sink(QAST::Op.new(
+ $*W.sink(QAST::Op.new(
:op('getpayload'),
QAST::Op.new( :op('exception') )
)),
View
7 src/Perl6/Grammar.pm
@@ -239,6 +239,10 @@ role STD {
self.typed_panic('X::Comp::NYI', :$feature)
}
+ method EXPR_nonassoc($cur, $left, $right) {
+ self.typed_panic('X::Syntax::NonAssociative', :left(~$left), :right(~$right));
+ }
+
# "when" arg assumes more things will become obsolete after Perl 6 comes out...
method obs($old, $new, $when = 'in Perl 6') {
$*W.throw(self.MATCH(), ['X', 'Obsolete'],
@@ -2732,6 +2736,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
}
<rx_adverbs>
<sibble(%*RX<P5> ?? %*LANG<P5Regex> !! %*LANG<Regex>, %*LANG<Q>, ['qq'])>
+ <.old_rx_mods>?
}
token old_rx_mods {
@@ -2790,7 +2795,7 @@ grammar Perl6::Grammar is HLL::Grammar does STD {
Perl6::Grammar.O(':prec<q=>, :assoc<list>', '%junctive_and');
Perl6::Grammar.O(':prec<p=>, :assoc<list>', '%junctive_or');
Perl6::Grammar.O(':prec<o=>, :assoc<unary>', '%named_unary');
- Perl6::Grammar.O(':prec<n=>, :assoc<left>', '%structural');
+ Perl6::Grammar.O(':prec<n=>, :assoc<non>', '%structural');
Perl6::Grammar.O(':prec<m=>, :assoc<left>, :iffy<1>, :pasttype<chain>', '%chaining');
Perl6::Grammar.O(':prec<l=>, :assoc<left>', '%tight_and');
Perl6::Grammar.O(':prec<k=>, :assoc<list>', '%tight_or');
View
30 src/Perl6/Optimizer.pm
@@ -163,34 +163,37 @@ class Perl6::Optimizer {
# the proto.
my $dispatcher;
try { if $obj.is_dispatcher { $dispatcher := 1 } }
- if $dispatcher {
- # Try to do compile-time multi-dispatch.
+ if $dispatcher && $obj.onlystar {
+ # Try to do compile-time multi-dispatch. Need to consider
+ # both the proto and the multi candidates.
my @ct_arg_info := self.analyze_args_for_ct_call($op);
if +@ct_arg_info {
my @types := @ct_arg_info[0];
my @flags := @ct_arg_info[1];
- my @ct_result := pir::perl6_multi_dispatch_ct__PPPP($obj, @types, @flags);
- if @ct_result[0] == 1 {
- my $chosen := @ct_result[1];
+ my $ct_result_proto := pir::perl6_trial_bind_ct__IPPP($obj.signature, @types, @flags);
+ my @ct_result_multi := pir::perl6_multi_dispatch_ct__PPPP($obj, @types, @flags);
+ if $ct_result_proto == 1 && @ct_result_multi[0] == 1 {
+ my $chosen := @ct_result_multi[1];
if $op.op eq 'chain' { $!chain_depth := $!chain_depth - 1 }
- if $*LEVEL >= 2 && $obj.onlystar {
+ if $*LEVEL >= 2 {
return nqp::can($chosen, 'inline_info') && nqp::istype($chosen.inline_info, QAST::Node)
?? self.inline_call($op, $chosen)
!! self.call_ct_chosen_multi($op, $obj, $chosen);
}
}
- elsif @ct_result[0] == -1 {
- self.report_innevitable_dispatch_failure($op, @types, @flags, $obj);
+ elsif $ct_result_proto == -1 || @ct_result_multi[0] == -1 {
+ self.report_innevitable_dispatch_failure($op, @types, @flags, $obj,
+ :protoguilt($ct_result_proto == -1));
}
}
# Otherwise, inline the proto.
if $op.op eq 'chain' { $!chain_depth := $!chain_depth - 1 }
- if $*LEVEL >= 2 && $obj.onlystar {
+ if $*LEVEL >= 2 {
return self.inline_proto($op, $obj);
}
}
- elsif nqp::can($obj, 'signature') {
+ elsif !$dispatcher && nqp::can($obj, 'signature') {
# If we know enough about the arguments, do a "trial bind".
my @ct_arg_info := self.analyze_args_for_ct_call($op);
if +@ct_arg_info {
@@ -329,7 +332,7 @@ class Perl6::Optimizer {
[@types, @flags]
}
- method report_innevitable_dispatch_failure($op, @types, @flags, $obj) {
+ method report_innevitable_dispatch_failure($op, @types, @flags, $obj, :$protoguilt) {
my @arg_names;
my $i := 0;
while $i < +@types {
@@ -341,11 +344,12 @@ class Perl6::Optimizer {
$i := $i + 1;
}
self.add_deadly($op,
- "Calling '" ~ $obj.name ~ "' will never work with " ~
+ ($protoguilt ?? "Calling proto of '" !! "Calling '") ~
+ $obj.name ~ "' will never work with " ~
(+@arg_names == 0 ??
"no arguments" !!
"argument types (" ~ nqp::join(', ', @arg_names) ~ ")"),
- $obj.is_dispatcher ??
+ $obj.is_dispatcher && !$protoguilt ??
multi_sig_list($obj) !!
[" Expected: " ~ $obj.signature.perl]);
}
View
81 src/Perl6/World.pm
@@ -857,9 +857,57 @@ class Perl6::World is HLL::World {
);
self.add_fixup_task(:fixup_past($fixups), :deserialize_past($fixups));
}
+
+ # put an expression in sink context
+ method past_sink($past) {
+ my $name := $past.unique('sink');
+ QAST::Stmts.new(
+ QAST::Op.new(:op<bind>,
+ QAST::Var.new(:$name, :scope<local>, :decl<var>),
+ $past,
+ ),
+ QAST::Op.new(:op<if>,
+ QAST::Op.new(:op<if>,
+ QAST::Op.new(:op<isconcrete>,
+ QAST::Var.new(:$name, :scope<local>),
+ ),
+ QAST::Op.new(:op<if>,
+ QAST::Op.new(:op<can>,
+ QAST::Var.new(:$name, :scope<local>),
+ QAST::SVal.new(:value('sink')),
+ ),
+ QAST::Op.new(:op<defined>,
+ QAST::Var.new(:$name, :scope<local>),
+ )
+ )
+ ),
+ QAST::Op.new(:op<callmethod>, :name<sink>,
+ QAST::Var.new(:$name, :scope<local>),
+ ),
+ ),
+ );
+ }
+
+ # put an expression into potential sink context
+ method sink($past) {
+ my $name := $past.unique('sink');
+ QAST::Want.new(
+ $past,
+ 'v',
+ self.past_sink($past)
+ );
+ }
+
# Generates code for running phasers.
- method run_phasers_code($code, $block_type, $type) {
+ method run_phasers_code($code, $block_type, $type, :$sink) {
+ my $call := QAST::Op.new(
+ :op('call'),
+ QAST::Var.new( :scope('lexical'), :name('$_'), :decl('param') )
+ );
+ if $sink {
+ $call := self.past_sink($call);
+ }
QAST::Op.new(
:op('for'),
QAST::Op.new(
@@ -872,11 +920,10 @@ class Perl6::World is HLL::World {
QAST::SVal.new( :value($type) )
),
QAST::Block.new(
- :blocktype('immediate'),
- QAST::Op.new(
- :op('call'),
- QAST::Var.new( :scope('lexical'), :name('$_'), :decl('param') )
- )))
+ :blocktype('immediate'),
+ $call
+ )
+ )
}
# Adds any extra code needing for handling phasers.
@@ -893,10 +940,10 @@ class Perl6::World is HLL::World {
$code_past[0].push(QAST::Op.new(
:op('if'),
QAST::Op.new( :op('p6takefirstflag') ),
- self.run_phasers_code($code, $block_type, 'FIRST')));
+ self.run_phasers_code($code, $block_type, 'FIRST', :sink)));
}
if nqp::existskey(%phasers, 'ENTER') {
- $code_past[0].push(self.run_phasers_code($code, $block_type, 'ENTER'));
+ $code_past[0].push(self.run_phasers_code($code, $block_type, 'ENTER', :sink));
}
if nqp::existskey(%phasers, '!LEAVE-ORDER') || nqp::existskey(%phasers, 'POST') {
$code_past[+@($code_past) - 1] := QAST::Op.new(
@@ -1544,6 +1591,24 @@ class Perl6::World is HLL::World {
nqp::join('::', @parts)
~ ($with_adverbs ?? nqp::join('', @!colonpairs) !! '');
}
+
+ # returns a QAST tree that represents the name
+ # currently needed for 'require ::($modulename) <importlist>'
+ # ignore adverbs for now
+ method name_past() {
+ if self.contains_indirect_lookup() {
+ if @!components == 1 {
+ return @!components[0];
+ }
+ else {
+ nqp::die("Not yet implemented :(");
+ }
+ }
+ else {
+ my $value := nqp::join('::', @!components);
+ QAST::SVal.new(:$value);
+ }
+ }
# Gets the individual components, which may be PAST nodes for
# unknown pieces.
View
20 src/SAFE.setting
@@ -1,20 +0,0 @@
-# SAFE.setting is deprecated, use RESTRICTED.setting instead.
-
-sub restricted($what) {
- die "$what is disallowed in safe mode"
-}
-
-sub open(|) { restricted('open') }
-sub unlink(|) { restricted('unlink') }
-sub shell(|) { restricted('shell') }
-sub run(|) { restricted('run') }
-sub QX(|) { restricted('qx, qqx') }
-sub mkdir(|) { restricted('mkdir') }
-sub rmdir(|) { restricted('rmdir') }
-sub rename(|) { restricted('rename') }
-sub copy(|) { restricted('copy') }
-
-my class IO { }
-IO.^add_fallback(
- -> $, $ { True },
- -> $, $ { restricted('IO') });
View
9 src/binder/bind.c
@@ -1053,6 +1053,15 @@ INTVAL Rakudo_binding_trial_bind(PARROT_INTERP, PMC *sig_pmc, PMC *capture) {
if (!smo_id)
setup_binder_statics(interp);
+ /* If there's a single capture parameter, then we're OK. (Worth
+ * handling especially as it's the common case for protos). */
+ if (num_params == 1) {
+ Rakudo_Parameter *param = (Rakudo_Parameter *)PMC_data(
+ VTABLE_get_pmc_keyed_int(interp, params, 0));
+ if (param->flags & SIG_ELEM_IS_CAPTURE)
+ return TRIAL_BIND_OK;
+ }
+
/* Walk through the signature and consider the parameters. */
num_pos_args = VTABLE_elements(interp, capture);
for (i = 0; i < num_params; i++) {
View
10 src/core/Exception.pm
@@ -536,7 +536,7 @@ my class X::Import::Redeclaration does X::Comp {
method message() {
@.symbols == 1
?? "Cannot import symbol @.symbols[0] from $.source-package-name, because it already exists in this lexical scope"
- !! "Cannot import the following symbols from $.source-package-name, becase they aready exist in this lexical scope: ", @.symbols.join(', ');
+ !! ("Cannot import the following symbols from $.source-package-name, because they already exist in this lexical scope: ", @.symbols.join(', '));
}
}
@@ -765,6 +765,14 @@ my class X::Syntax::Number::RadixOutOfRange does X::Syntax {
method message() { "Radix $.radix out of range (allowed: 2..36)" }
}
+my class X::Syntax::NonAssociative does X::Syntax {
+ has $.left;
+ has $.right;
+ method message() {
+ "Operators '$.left' and '$.right' are non-associtiave and require parenthesis";
+ }
+}
+
my class X::Syntax::Regex::Adverb does X::Syntax {
has $.adverb;
has $.construct;
View
4 src/core/List.pm
@@ -142,15 +142,15 @@ my class List does Positional {
## of the list, resulting in an O(n) algorithm.
my $elems = self.elems;
return unless $elems;
- fail ".pick from infinite list NYI" if $!nextiter.defined;
+ fail "Cannot .pick from infinite list" if $!nextiter.defined;
$n = +$Inf if nqp::istype($n, Whatever);
$n = $elems if $n > $elems;
return self.at_pos($elems.rand.floor) if $n == 1;
my Mu $rpa := nqp::clone($!items);
my $i;
my Mu $v;
gather while $n > 0 {
- $i = $elems.rand.floor.Int;
+ $i = nqp::rand_I(nqp::p6decont($elems), Int);
$elems--; $n--;
$v := nqp::atpos($rpa, nqp::unbox_i($i));
# replace selected element with last unpicked one
View
2 src/core/Numeric.pm
@@ -54,7 +54,7 @@ proto sub log10($, $?) {*}
multi sub log10(Numeric $x) { $x.log(10e0) }
multi sub log10(Cool $x) { $x.Numeric.log(10e0) }
-proto sub exp($) {*}
+proto sub exp($, $?) {*}
multi sub exp(Numeric $x) { $x.exp }
multi sub exp(Numeric $x, Numeric $base) { $x.exp($base) }
View
4 src/core/Range.pm
@@ -156,7 +156,7 @@ class Range is Iterable is Cool does Positional {
return self.list.roll unless nqp::istype($!min, Int) && nqp::istype($!max, Int);
my Int:D $least = $!excludes_min ?? $!min + 1 !! $!min;
my Int:D $elems = 1 + ($!excludes_max ?? $!max - 1 !! $!max) - $least;
- $elems ?? ($least + $elems.rand.floor) !! Any;
+ $elems ?? ($least + nqp::rand_I(nqp::p6decont($elems), Int)) !! Any;
}
multi method roll(Cool $num as Int) {
return self.list.roll($num) unless nqp::istype($!min, Int) && nqp::istype($!max, Int);
@@ -179,7 +179,7 @@ class Range is Iterable is Cool does Positional {
my %seen;
my int $i_n = nqp::unbox_i($n);
gather while $i_n > 0 {
- my Int $x = $least + $elems.rand.floor;
+ my Int $x = $least + nqp::rand_I(nqp::p6decont($elems), Int);
unless %seen{$x} {
%seen{$x} = 1;
$i_n = $i_n - 1;
View
2 src/core/Temporal.pm
@@ -399,7 +399,7 @@ my class DateTime does Dateish {
}
method Date() {
- Date.new(self)
+ Date.new(:$.year, :$.month, :$.day);
}
method Str() {
View
1 src/core/traits.pm
@@ -80,6 +80,7 @@ multi trait_mod:<is>(Routine:D $r, :prec(%spec)!) {
$r.HOW.mixin($r, Precedence);
nqp::bindattr(nqp::p6decont($r), $r.WHAT, '%!prec', %spec);
}
+ 0;
}
multi trait_mod:<is>(Routine $r, :&equiv) {
nqp::can(&equiv, 'prec')
View
133 src/utils/perl6doc.pir
@@ -1,133 +0,0 @@
-=head1 TITLE
-
-perl6doc.pir - The Rakudo Perl 6 document reader.
-
-=head2 Description
-
-This is the base file for the Rakudo Perl 6 document reader, C<perl6doc>.
-
-This file includes the parsing and grammar rules from
-the perl6doc/ directory, loads the relevant PGE libraries,
-and registers the compiler under the name 'Perl6doc'.
-
-=head2 Functions
-
-=over 4
-
-=item onload()
-
-Creates the Perl 6 document reader by subclassing a C<PCT::HLLCompiler> object.
-
-=cut
-
-
-.namespace [ 'Perl6doc' ]
-
-.sub 'onload' :load :init :anon
- load_bytecode 'PCT.pbc'
- load_bytecode 'Protoobject.pbc'
-
- $P0 = get_hll_global 'Protomaker'
- $P1 = get_class ['PCT';'HLLCompiler']
- $P0.'new_subclass'($P1, 'Perl6doc')
-.end
-
-
-.sub 'init' :vtable :method
- load_bytecode 'config.pbc'
-
- self.'language'('Perl6doc')
- self.'parsegrammar'('Perl6doc::Grammar')
- self.'parseactions'('Perl6doc::Grammar::Actions')
-
- ## set the compilation stages in the @stages attribute
- $P0 = split ' ', 'parse past post pir evalpmc'
- setattribute self, '@stages', $P0
-
- ## set the command line options
- $P0 = split ' ', 'help|h target=s trace|t=s version|V'
- setattribute self, '@cmdoptions', $P0
-
- ## set the $usage attribute
- $P0 = new 'String'
- $P0 = <<'USAGE'
-Usage: perl6doc [switches] [--] [podfile]
- -h, --help display this help text
- -V, --version display version information
-USAGE
- setattribute self, '$usage', $P0
-
- ## set the $version attribute
- .local pmc cfg
- $P0 = new 'String'
- $P0 = 'This is Rakudo perl6doc'
- push_eh _handler
- cfg = _config() # currently works in the build tree, but not in the install tree
- $P0 .= ', revision '
- $S0 = cfg['revision']
- $P0 .= $S0
- $P0 .= ' built on parrot '
- $S0 = cfg['VERSION']
- $P0 .= $S0
- $S0 = cfg['DEVEL']
- $P0 .= $S0
- $P0 .= "\n"
- $P0 .= 'for '
- $S0 = cfg['archname']
- $P0 .= $S0
- _handler:
- $P0 .= ".\n\nCopyright 2006-2008, The Perl Foundation.\n"
- setattribute self, '$version', $P0
-.end
-
-
-.namespace ['Perl6doc';'Compiler']
-
-=item main(args :slurpy) :main
-
-Start compilation by passing any command line C<args>
-to the Perl 6 compiler.
-
-=cut
-
-.sub 'main' :main
- .param pmc args_str
-
- ## create @ARGS global. We could possibly use the args pmc
- ## coming directly from Parrot, but currently Parrot provides
- ## it as a ResizableStringArray and we need Undefs for
- ## non-existent elements (RSA gives empty strings).
- .local pmc args, it
- args = new 'ResizableStringArray'
- it = iter args_str
- args_loop:
- unless it goto args_end
- $P0 = shift it
- push args, $P0
- goto args_loop
- args_end:
- set_hll_global '@ARGS', args
-
- $P0 = compreg 'Perl6doc'
- $P1 = $P0.'command_line'(args)
-.end
-
-
-.include 'perl6doc/gen_grammar.pir'
-.include 'perl6doc/gen_actions.pir'
-
-
-=back
-
-=head2 See Also
-
-L<http://perlcabal.org/syn/S26.html>,
-L<http://search.cpan.org/~dconway/Perl6-Perldoc-v0.0.5/>
-
-=cut
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
View
48 src/utils/perl6doc/actions.pm
@@ -1,48 +0,0 @@
-# Copyright (C) 2008, The Perl Foundation.
-# $Id$
-
-class Perl6doc::Grammar::Actions;
-
-method TOP($/) {
- my $stmts := PAST::Stmts.new();
- if $<pod_comment> {
- for $<pod_comment> {
- $stmts.push(
- PAST::Op.new(
- $( $_ ),
- :pirop('say')
- )
- );
- }
- }
- else {
- $stmts.push(
- PAST::Op.new(
- PAST::Val.new( :value('No POD found.') ),
- :pirop('say')
- )
- );
- }
- make PAST::Block.new(
- $stmts,
- :blocktype('declaration')
- );
-}
-
-
-method pod_comment($/) {
- my $past := PAST::Val.new(
- :value( ~$<block> ~ "\n" ),
- :node( $/ )
- );
-
- make $past;
-}
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
View
67 src/utils/perl6doc/grammar.pg
@@ -1,67 +0,0 @@
-# Copyright (C) 2008, The Perl Foundation.
-# $Id$
-
-=begin Introduction
-
-This is the rules portion of the grammar for the Rakudo document reader.
-This grammar is based on the STD.pm grammar available from
-L<http://svn.pugscode.org/pugs/src/perl6/STD.pm>.
-
-=end Introduction
-
-grammar Perl6doc::Grammar is PCT::Grammar;
-
-token TOP { [ .*? <pod_comment> ]* {*} }
-
-
-token unsp {
- \\ <.before [\s|'#']>
- [ \v | \h+ ]*
-}
-
-#### pod ####
-
-## The <pod_comment> token is used to match perl 6 pod comments.
-## It's currently incomplete, but so is the spec.
-
-token pod_comment {
- $<block>=[
- | <pod_delimited_block>
- | <pod_paragraph_block>
- | <pod_abbreviated_block>
- ] \n {*}
-}
-
-token pod_delimited_block {
- ^^ '=' <.unsp>? 'begin' <.ws> <block_type> <pod_numbered>? <pod_option>* \n
- $<body>=(.*?):!
- ^^ '=' <.unsp>? 'end' <.ws> $<block_type> \N*
- {*}
-}
-
-token pod_numbered { <.ws> '#' <.ws> }
-
-token pod_option {
- [ \n '=' ]? <.ws>
- $<option>=[ ':' [
- | [ nested | numbered | term | formatted | like | allow ] >>
- | <ident>
- ]
- ]
-}
-
-token pod_paragraph_block {
- ^^ '=for' <.ws> <block_type> <pod_option>* \n
- $<body>=(.*?):!
- <.before \n ^^ [ '=' | \h* $$ ]>
- {*}
-}
-
-token pod_abbreviated_block {
- ^^ '=' <block_type> <.ws>
- $<body>=(.*?):!
- <.before \n ^^ [ '=' | \h* $$ ]>
-}
-
-token block_type { <ident> }
-
View
1 t/spectest.data
@@ -400,6 +400,7 @@ S06-signature/types.t
S06-signature/unpack-array.t
S06-signature/unpack-object.t
S06-signature/unspecified.t
+S06-traits/is-assoc.t
S06-traits/is-copy.t
S06-traits/is-readonly.t
S06-traits/is-rw.t
View
14 tools/build/Makefile.in
@@ -85,9 +85,6 @@ SETTING_PBC = CORE.setting.pbc
R_SETTING_SRC = src/RESTRICTED.setting
R_SETTING_PIR = src/gen/RESTRICTED.setting.pir
R_SETTING_PBC = RESTRICTED.setting.pbc
-S_SETTING_SRC = src/SAFE.setting
-S_SETTING_PIR = src/gen/SAFE.setting.pir
-S_SETTING_PBC = SAFE.setting.pbc
GROUP = perl6_group
OPS = perl6_ops
DYNEXT_DYNPMC = $(DYNEXT_DIR)/$(GROUP)$(LOAD_EXT)
@@ -251,7 +248,6 @@ CLEANUPS = \
$(PERL6_EXE) \
$(SETTING_PBC) \
$(R_SETTING_PBC) \
- $(S_SETTING_PBC) \
$(PARROT_DLL_COPY) \
perl6.c \
perl6$(O) \
@@ -288,7 +284,7 @@ HARNESS_WITH_FUDGE = $(PERL) t/harness --fudge --keep-exit-code --icu=$(HAS_ICU)
STAGESTATS = @stagestats@
# the default target, TODO: make libraries in 'lib' a variable.
-all: check-versions $(PERL6_EXE) $(SETTING_PBC) $(R_SETTING_PBC) $(S_SETTING_PBC) lib/lib.pir lib/Test.pir lib/Pod/To/Text.pir
+all: check-versions $(PERL6_EXE) $(SETTING_PBC) $(R_SETTING_PBC) lib/lib.pir lib/Test.pir lib/Pod/To/Text.pir
# the install target
install: all
@@ -308,7 +304,6 @@ install: all
$(CP) $(PERL6_PBC) $(DESTDIR)$(PERL6_LANG_DIR)
$(CP) $(SETTING_PBC) $(DESTDIR)$(PERL6_LANG_DIR)/lib
$(CP) $(R_SETTING_PBC) $(DESTDIR)$(PERL6_LANG_DIR)/lib
- $(CP) $(S_SETTING_PBC) $(DESTDIR)$(PERL6_LANG_DIR)/lib
$(CP) lib/Test.pm $(DESTDIR)$(PERL6_LANG_DIR)/lib
$(CP) lib/Test.pir $(DESTDIR)$(PERL6_LANG_DIR)/lib
$(CP) lib/lib.pm6 $(DESTDIR)$(PERL6_LANG_DIR)/lib
@@ -329,7 +324,7 @@ install: all
-$(POD2MAN) docs/running.pod --name=perl6 > $(DESTDIR)$(MANDIR)/man1/perl6.1
-$(POD2MAN) docs/running.pod --name=rakudo > $(DESTDIR)$(MANDIR)/man1/rakudo.1
-xmas: $(PERL6_EXE) $(SETTING_PBC) $(R_SETTING_PBC) $(S_SETTING_PBC)
+xmas: $(PERL6_EXE) $(SETTING_PBC) $(R_SETTING_PBC)
## targets for building a standalone perl6 executable.
$(PERL6_EXE): $(PERL6_PBC) $(PARROT_DLL_COPY)
@@ -410,11 +405,6 @@ $(SETTING_PBC): $(PERL6_B_PBC) $(PERL6_EXE) $(CORE_SOURCES)
$(R_SETTING_PBC): $(PERL6_B_PBC) $(PERL6_EXE) $(SETTING_PBC) $(R_SETTING_SRC)
./$(PERL6_EXE) --target=pir $(STAGESTATS) --output=$(R_SETTING_PIR) $(R_SETTING_SRC)
$(PARROT) $(PARROT_ARGS) -o $(R_SETTING_PBC) $(R_SETTING_PIR)
-
-$(S_SETTING_PBC): $(PERL6_B_PBC) $(PERL6_EXE) $(SETTING_PBC) $(S_SETTING_SRC)
- ./$(PERL6_EXE) --target=pir $(STAGESTATS) --output=$(S_SETTING_PIR) $(S_SETTING_SRC)
- $(PARROT) $(PARROT_ARGS) -o $(S_SETTING_PBC) $(S_SETTING_PIR)
-
## testing targets
lib/Test.pir: lib/Test.pm $(PERL6_EXE) $(SETTING_PBC)
View
2 tools/build/NQP_REVISION
@@ -1 +1 @@
-2012.12
+2012.12-9-gb2e3f27

No commit comments for this range

Something went wrong with that request. Please try again.