org.jruby.compiler.ir.instructions
Class GetArrayInstr

java.lang.Object
  extended by org.jruby.compiler.ir.instructions.Instr
      extended by org.jruby.compiler.ir.instructions.OneOperandInstr
          extended by org.jruby.compiler.ir.instructions.GetArrayInstr

public class GetArrayInstr
extends OneOperandInstr


Field Summary
 boolean all
           
 int index
           
 
Fields inherited from class org.jruby.compiler.ir.instructions.Instr
operation, result
 
Constructor Summary
GetArrayInstr(Variable dest, Operand array, int index, boolean getRestOfArray)
           
 
Method Summary
 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,
 Label interpret(InterpreterContext interp, IRubyObject self)
           
 Operand simplifyAndGetResult(java.util.Map<Operand,Operand> valueMap)
          This method takes as input a map of operands to their values, and outputs the result of this instruction.
 java.lang.String toString()
           
 
Methods inherited from class org.jruby.compiler.ir.instructions.OneOperandInstr
getArg, getOperands, simplifyOperands
 
Methods inherited from class org.jruby.compiler.ir.instructions.Instr
canRaiseException, getOperation, getResult, getUsedVariables, hasSideEffects, isDead, markDead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

public final int index

all

public final boolean all
Constructor Detail

GetArrayInstr

public GetArrayInstr(Variable dest,
                     Operand array,
                     int index,
                     boolean getRestOfArray)
Method Detail

toString

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

simplifyAndGetResult

public Operand simplifyAndGetResult(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 the result of this instruction. If the value map provides a value for any of the instruction's operands the expectation is that the operand will be replaced with the simplified value. It is not required that it do so -- code correctness is not compromised by failure to simplify.

Overrides:
simplifyAndGetResult in class Instr
Parameters:
valueMap - Mapping from operands to their simplified values

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


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