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 InterpreterContextpublic Block getBlock()
getBlock in interface InterpreterContextpublic void setBlock(Block block)
setBlock in interface InterpreterContextpublic void setDynamicScope(DynamicScope s)
setDynamicScope in interface InterpreterContextpublic void allocateSharedBindingScope(IRMethod method)
allocateSharedBindingScope in interface InterpreterContextpublic DynamicScope getSharedBindingScope()
getSharedBindingScope in interface InterpreterContextpublic boolean hasAllocatedDynamicScope()
hasAllocatedDynamicScope in interface InterpreterContextpublic java.lang.Object getReturnValue()
getReturnValue in interface InterpreterContextpublic void setReturnValue(java.lang.Object returnValue)
setReturnValue in interface InterpreterContextpublic java.lang.Object getTemporaryVariable(int offset)
getTemporaryVariable in interface InterpreterContextpublic java.lang.Object setTemporaryVariable(int offset,
java.lang.Object value)
setTemporaryVariable in interface InterpreterContextpublic void updateRenamedVariablesCount(int n)
updateRenamedVariablesCount in interface InterpreterContextpublic void updateLocalVariablesCount(int n)
public java.lang.Object getRenamedVariable(int offset)
getRenamedVariable in interface InterpreterContextpublic java.lang.Object setRenamedVariable(int offset,
java.lang.Object value)
setRenamedVariable in interface InterpreterContextpublic java.lang.Object getSharedBindingVariable(int bindingSlot)
getSharedBindingVariable in interface InterpreterContextpublic void setSharedBindingVariable(int bindingSlot,
java.lang.Object value)
setSharedBindingVariable in interface InterpreterContextpublic java.lang.Object getLocalVariable(int offset)
InterpreterContextgetLocalVariable in interface InterpreterContextpublic java.lang.Object setLocalVariable(int offset,
java.lang.Object value)
setLocalVariable in interface InterpreterContextpublic ThreadContext getContext()
getContext in interface InterpreterContextpublic java.lang.Object getParameter(int offset)
getParameter in interface InterpreterContextpublic int getParameterCount()
getParameterCount in interface InterpreterContextpublic java.lang.Object getSelf()
getSelf in interface InterpreterContextpublic Frame getFrame()
getFrame in interface InterpreterContextpublic void setFrame(Frame frame)
setFrame in interface InterpreterContextpublic IRubyObject[] getParametersFrom(int argIndex)
getParametersFrom in interface InterpreterContextpublic void setMethodExitLabel(Label l)
setMethodExitLabel in interface InterpreterContextpublic Label getMethodExitLabel()
getMethodExitLabel in interface InterpreterContextpublic void setException(RubyException e)
setException in interface InterpreterContextpublic RubyException getException()
getException in interface InterpreterContextCopyright © 2002-2009 JRuby Team. All Rights Reserved.