Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add initial version of @*ARGS.
  • Loading branch information
pmichaud committed Jul 24, 2011
1 parent 0cbd875 commit fedd5b3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
6 changes: 6 additions & 0 deletions src/Perl6/Compiler.nqp
Expand Up @@ -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);
}
}


9 changes: 9 additions & 0 deletions src/core/terms.pm
@@ -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);
}

3 changes: 1 addition & 2 deletions src/main.nqp
Expand Up @@ -2,7 +2,6 @@ use Perl6::Grammar;
use Perl6::Actions;
use Perl6::Compiler;


sub MAIN(@ARGS) {
# Initialize dynops.
pir::rakudo_dynop_setup__v();
Expand All @@ -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'));

Expand Down
2 changes: 1 addition & 1 deletion tools/build/NQP_REVISION
@@ -1 +1 @@
2011.06-126-g5134a59
2011.06-128-g9573361

0 comments on commit fedd5b3

Please sign in to comment.