org.jruby.compiler.impl
Class StandardInvocationCompiler

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

public class StandardInvocationCompiler
extends java.lang.Object
implements InvocationCompiler

Author:
headius

Constructor Summary
StandardInvocationCompiler(StandardASMCompiler.AbstractMethodCompiler methodCompiler, SkinnyMethodAdapter method)
           
 
Method Summary
 SkinnyMethodAdapter getMethodAdapter()
           
 void invokeAttrAssign(java.lang.String name)
          Attr assign calls have slightly different semantics that normal calls, so this method handles those additional semantics.
 void invokeAttrAssign(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback)
           
 void invokeDynamic(java.lang.String name, CompilerCallback receiverCallback, ArgumentsCallback argsCallback, CallType callType, CompilerCallback closureArg)
          Invoke the named method as a "function", i.e.
 void invokeEqq()
          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 invokeSuper(CompilerCallback argsCallback, CompilerCallback closureArg)
           
 void opElementAsgn(CompilerCallback valueCallback, java.lang.String operator)
           
 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(boolean hasArgs, boolean unwrap)
          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
 

Constructor Detail

StandardInvocationCompiler

public StandardInvocationCompiler(StandardASMCompiler.AbstractMethodCompiler 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

invokeAttrAssign

public void invokeAttrAssign(java.lang.String name)
Description copied from interface: InvocationCompiler
Attr assign calls have slightly different semantics that normal calls, so this method handles those additional semantics.

Specified by:
invokeAttrAssign in interface InvocationCompiler

invokeAttrAssign

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

opElementAsgn

public void opElementAsgn(CompilerCallback valueCallback,
                          java.lang.String operator)
Specified by:
opElementAsgn 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

invokeSuper

public void invokeSuper(CompilerCallback argsCallback,
                        CompilerCallback closureArg)
Specified by:
invokeSuper in interface InvocationCompiler

invokeDynamic

public void invokeDynamic(java.lang.String name,
                          CompilerCallback receiverCallback,
                          ArgumentsCallback argsCallback,
                          CallType callType,
                          CompilerCallback closureArg)
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

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(boolean hasArgs,
                  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

invokeEqq

public void invokeEqq()
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.