org.jruby.compiler.ir.instructions
Class CallInstr

java.lang.Object
  extended by org.jruby.compiler.ir.instructions.Instr
      extended by org.jruby.compiler.ir.instructions.MultiOperandInstr
          extended by org.jruby.compiler.ir.instructions.CallInstr
Direct Known Subclasses:
JRubyImplCallInstr, RubyInternalCallInstr

public class CallInstr
extends MultiOperandInstr


Field Summary
 java.util.HashMap<DynamicMethod,java.lang.Integer> _profile
           
 
Fields inherited from class org.jruby.compiler.ir.instructions.Instr
operation, result
 
Constructor Summary
CallInstr(Operation op, Variable result, MethAddr methAddr, Operand receiver, Operand[] args, Operand closure)
           
CallInstr(Variable result, MethAddr methAddr, Operand receiver, Operand[] args, Operand closure)
           
 
Method Summary
 boolean canBeEval()
           
 boolean canCaptureCallersBinding()
           
 boolean canModifyCode()
           
 Operand[] cloneCallArgs(InlinerInfo ii)
           
 Instr cloneForInlining(InlinerInfo ii)
          Clone the instruction for inlining -- this will rename all variables (including local variables and self!) and replace RECV_ARG and RETURN instructions to regular copy instructions,
 Operand[] getCallArgs()
           
 Operand getClosureArg()
           
 MethAddr getMethodAddr()
           
 Operand[] getOperands()
           
 Operand getReceiver()
           
 IRMethod getTargetMethod()
           
 IRMethod getTargetMethodWithReceiver(Operand receiver)
           
 Label interpret_with_inline(InterpreterContext interp, IRubyObject self)
           
 Label interpret(InterpreterContext interp, IRubyObject self)
           
 boolean isLVADataflowBarrier()
           
 boolean isRubyInternalsCall()
           
 boolean isStaticCallTarget()
           
 boolean requiresBinding()
           
 void setMethodAddr(MethAddr mh)
           
 void simplifyOperands(java.util.Map<Operand,Operand> valueMap)
          This method takes as input a map of operands to their values, and outputs If the value map provides a value for any of the instruction's operands this method is expected to replace the original operands with the simplified values.
 java.lang.String toString()
           
 
Methods inherited from class org.jruby.compiler.ir.instructions.MultiOperandInstr
cloneOperandsForInlining, prepareArguments
 
Methods inherited from class org.jruby.compiler.ir.instructions.Instr
canRaiseException, getOperation, getResult, getUsedVariables, hasSideEffects, isDead, markDead, simplifyAndGetResult
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_profile

public java.util.HashMap<DynamicMethod,java.lang.Integer> _profile
Constructor Detail

CallInstr

public CallInstr(Variable result,
                 MethAddr methAddr,
                 Operand receiver,
                 Operand[] args,
                 Operand closure)

CallInstr

public CallInstr(Operation op,
                 Variable result,
                 MethAddr methAddr,
                 Operand receiver,
                 Operand[] args,
                 Operand closure)
Method Detail

getOperands

public Operand[] getOperands()
Specified by:
getOperands in class Instr

setMethodAddr

public void setMethodAddr(MethAddr mh)

getMethodAddr

public MethAddr getMethodAddr()

getClosureArg

public Operand getClosureArg()

getReceiver

public Operand getReceiver()

getCallArgs

public Operand[] getCallArgs()

simplifyOperands

public void simplifyOperands(java.util.Map<Operand,Operand> valueMap)
Description copied from class: Instr
This method takes as input a map of operands to their values, and outputs If the value map provides a value for any of the instruction's operands this method is expected to replace the original operands with the simplified values. It is not required that it do so -- code correctness is not compromised by failure to simplify

Specified by:
simplifyOperands in class Instr

cloneCallArgs

public Operand[] cloneCallArgs(InlinerInfo ii)

isRubyInternalsCall

public boolean isRubyInternalsCall()

isStaticCallTarget

public boolean isStaticCallTarget()

getTargetMethodWithReceiver

public IRMethod getTargetMethodWithReceiver(Operand receiver)

getTargetMethod

public IRMethod getTargetMethod()

canModifyCode

public boolean canModifyCode()

canBeEval

public boolean canBeEval()

requiresBinding

public boolean requiresBinding()

canCaptureCallersBinding

public boolean canCaptureCallersBinding()

isLVADataflowBarrier

public boolean isLVADataflowBarrier()

toString

public java.lang.String toString()
Overrides:
toString in class MultiOperandInstr

cloneForInlining

public Instr cloneForInlining(InlinerInfo ii)
Description copied from class: Instr
Clone the instruction for inlining -- this will rename all variables (including local variables and self!) and replace RECV_ARG and RETURN instructions to regular copy instructions,

Specified by:
cloneForInlining in class Instr

interpret

public Label interpret(InterpreterContext interp,
                       IRubyObject self)
Overrides:
interpret in class Instr

interpret_with_inline

public Label interpret_with_inline(InterpreterContext interp,
                                   IRubyObject self)


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