Permalink
Browse files

Remove now-unused code.

  • Loading branch information...
1 parent a84eedf commit 86c9a7f5c8bf137f46676b8c48f7355aea665bf9 @jnthn jnthn committed Apr 27, 2013
Showing with 0 additions and 69 deletions.
  1. +0 −69 src/vm/jvm/QAST/Compiler.nqp
@@ -1042,75 +1042,6 @@ QAST::OperationsJAST.add_core_op('for', -> $qastcomp, $op {
});
# Calling
-sub process_args($qastcomp, @children, $il, $first, :$inv_temp) {
- # Make sure we do positionals before nameds.
- my @pos;
- my @named;
- for @children {
- nqp::push(($_.named ?? @named !! @pos), $_);
- }
- my @order := @pos;
- for @named { nqp::push(@order, $_) }
-
- # Get an argument array.
- my $arg_array := &*GET_ARG_ARRAY(+@order - $first);
-
- # Process the arguments, computing each of them and placing them into
- # the arguments array.
- my @arg_results;
- my @callsite;
- my @argnames;
- my int $i := $first;
- my int $arg_num := 0;
- while $i < +@order {
- my $arg_res := $qastcomp.as_jast(@order[$i]);
- $il.append($arg_res.jast);
- nqp::push(@arg_results, $arg_res);
- my int $type := $arg_res.type;
- if $i == $first && $inv_temp {
- if $type == $RT_OBJ {
- $il.append(JAST::Instruction.new( :op('dup') ));
- $il.append(JAST::Instruction.new( :op('astore'), $inv_temp ));
- }
- else {
- nqp::die("Invocant must be an object");
- }
- }
- my int $flags := 0;
- if @order[$i].flat {
- $flags := @order[$i].named ?? 24 !! 16;
- }
- elsif @order[$i].named -> $name {
- $flags := 8;
- nqp::push(@argnames, $name);
- }
- nqp::push(@callsite, arg_type($type) + $flags);
-
- $*STACK.obtain($il, $arg_res);
- if $type == $RT_INT {
- $il.append(JAST::Instruction.new( :op('invokestatic'),
- $TYPE_LONG, 'valueOf', $TYPE_LONG, 'Long' ));
- }
- elsif $type == $RT_NUM {
- $il.append(JAST::Instruction.new( :op('invokestatic'),
- $TYPE_DOUBLE, 'valueOf', $TYPE_DOUBLE, 'Double' ));
- }
- $il.append(JAST::Instruction.new( :op('aload'), $arg_array ));
- $il.append(JAST::Instruction.new( :op('swap') ));
- $il.append(JAST::PushIndex.new( :value($arg_num) ));
- $il.append(JAST::Instruction.new( :op('swap') ));
- $il.append(JAST::Instruction.new( :op('aastore') ));
-
- $arg_num++;
- $i++;
- }
-
- # Mark us done with the arg array (call will consume it right away).
- &*FREE_ARG_ARRAY($arg_array);
-
- # Return callsite index (which may create it if needed).
- return [$*CODEREFS.get_callsite_idx(@callsite, @argnames), $arg_array];
-}
sub process_args_onto_stack($qastcomp, @children, $il, :$obj_first, :$inv_first, :$name_first, :$obj_second) {
# Make sure we do positionals before nameds.
my @pos;

0 comments on commit 86c9a7f

Please sign in to comment.