Permalink
Browse files

Add initial version of @*ARGS.

  • Loading branch information...
1 parent 0cbd875 commit fedd5b3f76e1eb6afa0932ae4a3b0e58db298033 @pmichaud pmichaud committed Jul 24, 2011
Showing with 17 additions and 3 deletions.
  1. +6 −0 src/Perl6/Compiler.nqp
  2. +9 −0 src/core/terms.pm
  3. +1 −2 src/main.nqp
  4. +1 −1 tools/build/NQP_REVISION
View
@@ -2,6 +2,12 @@ use NQPP6Regex;
use QRegex;
class Perl6::Compiler is HLL::Compiler {
+ method command_eval(*@args, *%options) {
+ my $hll_ns := pir::get_root_global__Ps('perl6');
+ $hll_ns<@!ARGS> := @args;
+ my $super := pir::find_method__PPs(HLL::Compiler, 'command_eval');
+ $super(self, |@args, |%options);
+ }
}
View
@@ -1,2 +1,11 @@
sub term:<time>() { nqp::p6box_i(pir::time__I()) }
+{
+ my @ARGS;
+ my Mu $argiter := nqp::iterator(pir::get_hll_global__Ps('@!ARGS'));
+ $argiter := nqp::iterator(pir::get_hll_global__Ps('@!ARGS'));
+ nqp::shift($argiter) if $argiter;
+ @ARGS.push(nqp::p6box_s(nqp::shift($argiter))) while $argiter;
+ nqp::bindkey(pir::get_who__PP(PROCESS), '@ARGS', @ARGS);
+}
+
View
@@ -2,7 +2,6 @@ use Perl6::Grammar;
use Perl6::Actions;
use Perl6::Compiler;
-
sub MAIN(@ARGS) {
# Initialize dynops.
pir::rakudo_dynop_setup__v();
@@ -21,7 +20,7 @@ sub MAIN(@ARGS) {
# Set up END block list, which we'll run at exit.
my @*END_PHASERS := [];
-
+
# Enter the compiler.
$comp.command_line(@ARGS, :encoding('utf8'), :transcode('ascii iso-8859-1'));
View
@@ -1 +1 @@
-2011.06-126-g5134a59
+2011.06-128-g9573361

0 comments on commit fedd5b3

Please sign in to comment.