org.jruby.compiler.impl
Class StandardInvocationCompiler

java.lang.Object
  extended by org.jruby.compiler.impl.StandardInvocationCompiler
All Implemented Interfaces:
InvocationCompiler
Direct Known Subclasses:
InvokeDynamicInvocationCompiler

public class StandardInvocationCompiler
extends java.lang.Object
implements InvocationCompiler

Author:
headius

Field Summary
protected  SkinnyMethodAdapter method
           
protected  BaseBodyCompiler methodCompiler
           
 
Constructor Summary
StandardInvocationCompiler(BaseBodyCompiler methodCompiler, SkinnyMethodAdapter method)
           
 
Method Summary
 SkinnyMethodAdapter getMethodAdapter()
           
 void invokeAttrAssign(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeAttrAssignMasgn(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
          The masgn version has the value to be assigned already on the stack, and so uses a different path to perform the assignment.
 void invokeBinaryFixnumRHS(java.lang.String name, CompilerCallback receiverCallback, long fixnum)
           
 void invokeDynamic(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback, CallType callType, CompilerCallback closureArg, boolean iterator)
          Invoke the named method as a "function", i.e.
 void invokeDynamicNoBlockSpecificArity(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeDynamicNoBlockZero(java.lang.String name, CompilerCallback receiverCallback)
           
 void invokeDynamicSelfNoBlockSpecificArity(java.lang.String name, ArgumentsCallback argsCallback)
           
 void invokeDynamicSelfNoBlockZero(java.lang.String name)
           
 void invokeEqq(ArgumentsCallback receivers, CompilerCallback argument)
          Used for when nodes with a case; assumes stack is ..., case_value, when_cond_array
 void invokeOpAsgnWithAnd(java.lang.String attrName, java.lang.String attrAsgnName, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeOpAsgnWithMethod(java.lang.String operatorName, java.lang.String attrName, java.lang.String attrAsgnName, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeOpAsgnWithOr(java.lang.String attrName, java.lang.String attrAsgnName, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeOpElementAsgnWithMethod(java.lang.String operatorName, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void opElementAsgnWithAnd(CompilerCallback receiver, ArgumentsCallback args, CompilerCallback valueCallback)
           
 void opElementAsgnWithMethod(CompilerCallback receiver, ArgumentsCallback args, CompilerCallback valueCallback, java.lang.String operator)
           
 void opElementAsgnWithOr(CompilerCallback receiver, ArgumentsCallback args, CompilerCallback valueCallback)
           
 void setMethodAdapter(SkinnyMethodAdapter sma)
           
 void yield(CompilerCallback argsCallback, boolean unwrap)
          Invoke the block passed into this method, or throw an error if no block is present.
 void yieldSpecific(ArgumentsCallback argsCallback)
          Invoke the block passed into this method, or throw an error if no block is present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodCompiler

protected BaseBodyCompiler methodCompiler

method

protected SkinnyMethodAdapter method
Constructor Detail

StandardInvocationCompiler

public StandardInvocationCompiler(BaseBodyCompiler methodCompiler,
                                  SkinnyMethodAdapter method)
Method Detail

getMethodAdapter

public SkinnyMethodAdapter getMethodAdapter()
Specified by:
getMethodAdapter in interface InvocationCompiler

setMethodAdapter

public void setMethodAdapter(SkinnyMethodAdapter sma)
Specified by:
setMethodAdapter in interface InvocationCompiler

invokeAttrAssignMasgn

public void invokeAttrAssignMasgn(java.lang.String name,
                                  CompilerCallback receiverCallback,
                                  ArgumentsCallback argsCallback)
Description copied from interface: InvocationCompiler
The masgn version has the value to be assigned already on the stack, and so uses a different path to perform the assignment.

Specified by:
invokeAttrAssignMasgn in interface InvocationCompiler

invokeAttrAssign

public void invokeAttrAssign(java.lang.String name,
                             CompilerCallback receiverCallback,
                             ArgumentsCallback argsCallback)
Specified by:
invokeAttrAssign in interface InvocationCompiler

opElementAsgnWithOr

public void opElementAsgnWithOr(CompilerCallback receiver,
                                ArgumentsCallback args,
                                CompilerCallback valueCallback)
Specified by:
opElementAsgnWithOr in interface InvocationCompiler

opElementAsgnWithAnd

public void opElementAsgnWithAnd(CompilerCallback receiver,
                                 ArgumentsCallback args,
                                 CompilerCallback valueCallback)
Specified by:
opElementAsgnWithAnd in interface InvocationCompiler

opElementAsgnWithMethod

public void opElementAsgnWithMethod(CompilerCallback receiver,
                                    ArgumentsCallback args,
                                    CompilerCallback valueCallback,
                                    java.lang.String operator)
Specified by:
opElementAsgnWithMethod in interface InvocationCompiler

invokeBinaryFixnumRHS

public void invokeBinaryFixnumRHS(java.lang.String name,
                                  CompilerCallback receiverCallback,
                                  long fixnum)
Specified by:
invokeBinaryFixnumRHS in interface InvocationCompiler

invokeDynamic

public void invokeDynamic(java.lang.String name,
                          CompilerCallback receiverCallback,
                          ArgumentsCallback argsCallback,
                          CallType callType,
                          CompilerCallback closureArg,
                          boolean iterator)
Description copied from interface: InvocationCompiler
Invoke the named method as a "function", i.e. as a method on the current "self" object, using the specified argument count. It is expected that previous calls to the compiler has prepared the exact number of argument values necessary for this call. Those values will be consumed, and the result of the call will be generated.

Specified by:
invokeDynamic in interface InvocationCompiler

invokeDynamicSelfNoBlockZero

public void invokeDynamicSelfNoBlockZero(java.lang.String name)

invokeDynamicSelfNoBlockSpecificArity

public void invokeDynamicSelfNoBlockSpecificArity(java.lang.String name,
                                                  ArgumentsCallback argsCallback)

invokeDynamicNoBlockZero

public void invokeDynamicNoBlockZero(java.lang.String name,
                                     CompilerCallback receiverCallback)

invokeDynamicNoBlockSpecificArity

public void invokeDynamicNoBlockSpecificArity(java.lang.String name,
                                              CompilerCallback receiverCallback,
                                              ArgumentsCallback argsCallback)

invokeOpAsgnWithOr

public void invokeOpAsgnWithOr(java.lang.String attrName,
                               java.lang.String attrAsgnName,
                               CompilerCallback receiverCallback,
                               ArgumentsCallback argsCallback)
Specified by:
invokeOpAsgnWithOr in interface InvocationCompiler

invokeOpAsgnWithAnd

public void invokeOpAsgnWithAnd(java.lang.String attrName,
                                java.lang.String attrAsgnName,
                                CompilerCallback receiverCallback,
                                ArgumentsCallback argsCallback)
Specified by:
invokeOpAsgnWithAnd in interface InvocationCompiler

invokeOpAsgnWithMethod

public void invokeOpAsgnWithMethod(java.lang.String operatorName,
                                   java.lang.String attrName,
                                   java.lang.String attrAsgnName,
                                   CompilerCallback receiverCallback,
                                   ArgumentsCallback argsCallback)
Specified by:
invokeOpAsgnWithMethod in interface InvocationCompiler

invokeOpElementAsgnWithMethod

public void invokeOpElementAsgnWithMethod(java.lang.String operatorName,
                                          CompilerCallback receiverCallback,
                                          ArgumentsCallback argsCallback)

yield

public void yield(CompilerCallback argsCallback,
                  boolean unwrap)
Description copied from interface: InvocationCompiler
Invoke the block passed into this method, or throw an error if no block is present. If arguments have been prepared for the block, specify true. Otherwise the default empty args will be used.

Specified by:
yield in interface InvocationCompiler

yieldSpecific

public void yieldSpecific(ArgumentsCallback argsCallback)
Description copied from interface: InvocationCompiler
Invoke the block passed into this method, or throw an error if no block is present. If arguments have been prepared for the block, specify true. Otherwise the default empty args will be used. Use specific-arity call paths if possible.

Specified by:
yieldSpecific in interface InvocationCompiler

invokeEqq

public void invokeEqq(ArgumentsCallback receivers,
                      CompilerCallback argument)
Description copied from interface: InvocationCompiler
Used for when nodes with a case; assumes stack is ..., case_value, when_cond_array

Specified by:
invokeEqq in interface InvocationCompiler


Copyright © 2002-2007 JRuby Team. All Rights Reserved.