public class NaiveInterpreterContext extends java.lang.Object implements InterpreterContext
Modifier and Type | Field and Description |
---|---|
protected boolean |
allocatedDynScope |
protected Block |
block |
protected DynamicScope |
currDynScope |
protected RubyException |
currException |
protected Frame |
frame |
protected java.lang.Object[] |
localVariables |
protected IRubyObject[] |
parameters |
protected java.lang.Object[] |
renamedVariables |
protected java.lang.Object |
returnValue |
protected java.lang.Object |
self |
protected java.lang.Object[] |
temporaryVariables |
Constructor and Description |
---|
NaiveInterpreterContext(ThreadContext context,
IRubyObject self,
int localVariablesSize,
int temporaryVariablesSize,
int renamedVariablesSize,
IRubyObject[] parameters,
Block block) |
Modifier and Type | Method and Description |
---|---|
void |
allocateSharedBindingScope(IRMethod method) |
Block |
getBlock() |
ThreadContext |
getContext() |
RubyException |
getException() |
Frame |
getFrame() |
java.lang.Object |
getLocalVariable(int offset)
public Object getLocalVariable(String name);
public Object setLocalVariable(String name, Object value);
|
Label |
getMethodExitLabel() |
java.lang.Object |
getParameter(int offset) |
int |
getParameterCount() |
IRubyObject[] |
getParametersFrom(int argIndex) |
java.lang.Object |
getRenamedVariable(int offset) |
java.lang.Object |
getReturnValue() |
Ruby |
getRuntime() |
java.lang.Object |
getSelf() |
DynamicScope |
getSharedBindingScope() |
java.lang.Object |
getSharedBindingVariable(int bindingSlot) |
java.lang.Object |
getTemporaryVariable(int offset) |
boolean |
hasAllocatedDynamicScope() |
void |
setBlock(Block block) |
void |
setDynamicScope(DynamicScope s) |
void |
setException(RubyException e) |
void |
setFrame(Frame frame) |
java.lang.Object |
setLocalVariable(int offset,
java.lang.Object value) |
void |
setMethodExitLabel(Label l) |
java.lang.Object |
setRenamedVariable(int offset,
java.lang.Object value) |
void |
setReturnValue(java.lang.Object returnValue) |
void |
setSharedBindingVariable(int bindingSlot,
java.lang.Object value) |
java.lang.Object |
setTemporaryVariable(int offset,
java.lang.Object value) |
void |
updateLocalVariablesCount(int n) |
void |
updateRenamedVariablesCount(int n) |
protected java.lang.Object returnValue
protected java.lang.Object self
protected IRubyObject[] parameters
protected java.lang.Object[] temporaryVariables
protected java.lang.Object[] renamedVariables
protected java.lang.Object[] localVariables
protected Frame frame
protected Block block
protected DynamicScope currDynScope
protected boolean allocatedDynScope
protected RubyException currException
public NaiveInterpreterContext(ThreadContext context, IRubyObject self, int localVariablesSize, int temporaryVariablesSize, int renamedVariablesSize, IRubyObject[] parameters, Block block)
public Ruby getRuntime()
getRuntime
in interface InterpreterContext
public Block getBlock()
getBlock
in interface InterpreterContext
public void setBlock(Block block)
setBlock
in interface InterpreterContext
public void setDynamicScope(DynamicScope s)
setDynamicScope
in interface InterpreterContext
public void allocateSharedBindingScope(IRMethod method)
allocateSharedBindingScope
in interface InterpreterContext
public DynamicScope getSharedBindingScope()
getSharedBindingScope
in interface InterpreterContext
public boolean hasAllocatedDynamicScope()
hasAllocatedDynamicScope
in interface InterpreterContext
public java.lang.Object getReturnValue()
getReturnValue
in interface InterpreterContext
public void setReturnValue(java.lang.Object returnValue)
setReturnValue
in interface InterpreterContext
public java.lang.Object getTemporaryVariable(int offset)
getTemporaryVariable
in interface InterpreterContext
public java.lang.Object setTemporaryVariable(int offset, java.lang.Object value)
setTemporaryVariable
in interface InterpreterContext
public void updateRenamedVariablesCount(int n)
updateRenamedVariablesCount
in interface InterpreterContext
public void updateLocalVariablesCount(int n)
public java.lang.Object getRenamedVariable(int offset)
getRenamedVariable
in interface InterpreterContext
public java.lang.Object setRenamedVariable(int offset, java.lang.Object value)
setRenamedVariable
in interface InterpreterContext
public java.lang.Object getSharedBindingVariable(int bindingSlot)
getSharedBindingVariable
in interface InterpreterContext
public void setSharedBindingVariable(int bindingSlot, java.lang.Object value)
setSharedBindingVariable
in interface InterpreterContext
public java.lang.Object getLocalVariable(int offset)
InterpreterContext
getLocalVariable
in interface InterpreterContext
public java.lang.Object setLocalVariable(int offset, java.lang.Object value)
setLocalVariable
in interface InterpreterContext
public ThreadContext getContext()
getContext
in interface InterpreterContext
public java.lang.Object getParameter(int offset)
getParameter
in interface InterpreterContext
public int getParameterCount()
getParameterCount
in interface InterpreterContext
public java.lang.Object getSelf()
getSelf
in interface InterpreterContext
public Frame getFrame()
getFrame
in interface InterpreterContext
public void setFrame(Frame frame)
setFrame
in interface InterpreterContext
public IRubyObject[] getParametersFrom(int argIndex)
getParametersFrom
in interface InterpreterContext
public void setMethodExitLabel(Label l)
setMethodExitLabel
in interface InterpreterContext
public Label getMethodExitLabel()
getMethodExitLabel
in interface InterpreterContext
public void setException(RubyException e)
setException
in interface InterpreterContext
public RubyException getException()
getException
in interface InterpreterContext
Copyright © 2002-2009 JRuby Team. All Rights Reserved.