org.jruby.interpreter
Class NaiveInterpreterContext
java.lang.Object
org.jruby.interpreter.NaiveInterpreterContext
- All Implemented Interfaces:
- InterpreterContext
public class NaiveInterpreterContext
- extends java.lang.Object
- implements InterpreterContext
- Author:
- enebo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
returnValue
protected java.lang.Object returnValue
self
protected java.lang.Object self
parameters
protected IRubyObject[] parameters
temporaryVariables
protected java.lang.Object[] temporaryVariables
renamedVariables
protected java.lang.Object[] renamedVariables
localVariables
protected java.lang.Object[] localVariables
frame
protected Frame frame
block
protected Block block
currDynScope
protected DynamicScope currDynScope
allocatedDynScope
protected boolean allocatedDynScope
currException
protected RubyException currException
NaiveInterpreterContext
public NaiveInterpreterContext(ThreadContext context,
IRubyObject self,
int localVariablesSize,
int temporaryVariablesSize,
int renamedVariablesSize,
IRubyObject[] parameters,
Block block)
getRuntime
public Ruby getRuntime()
- Specified by:
getRuntime
in interface InterpreterContext
getBlock
public Block getBlock()
- Specified by:
getBlock
in interface InterpreterContext
setBlock
public void setBlock(Block block)
- Specified by:
setBlock
in interface InterpreterContext
setDynamicScope
public void setDynamicScope(DynamicScope s)
- Specified by:
setDynamicScope
in interface InterpreterContext
allocateSharedBindingScope
public void allocateSharedBindingScope(IRMethod method)
- Specified by:
allocateSharedBindingScope
in interface InterpreterContext
getSharedBindingScope
public DynamicScope getSharedBindingScope()
- Specified by:
getSharedBindingScope
in interface InterpreterContext
hasAllocatedDynamicScope
public boolean hasAllocatedDynamicScope()
- Specified by:
hasAllocatedDynamicScope
in interface InterpreterContext
getReturnValue
public java.lang.Object getReturnValue()
- Specified by:
getReturnValue
in interface InterpreterContext
setReturnValue
public void setReturnValue(java.lang.Object returnValue)
- Specified by:
setReturnValue
in interface InterpreterContext
getTemporaryVariable
public java.lang.Object getTemporaryVariable(int offset)
- Specified by:
getTemporaryVariable
in interface InterpreterContext
setTemporaryVariable
public java.lang.Object setTemporaryVariable(int offset,
java.lang.Object value)
- Specified by:
setTemporaryVariable
in interface InterpreterContext
updateRenamedVariablesCount
public void updateRenamedVariablesCount(int n)
- Specified by:
updateRenamedVariablesCount
in interface InterpreterContext
updateLocalVariablesCount
public void updateLocalVariablesCount(int n)
getRenamedVariable
public java.lang.Object getRenamedVariable(int offset)
- Specified by:
getRenamedVariable
in interface InterpreterContext
setRenamedVariable
public java.lang.Object setRenamedVariable(int offset,
java.lang.Object value)
- Specified by:
setRenamedVariable
in interface InterpreterContext
getSharedBindingVariable
public java.lang.Object getSharedBindingVariable(int bindingSlot)
- Specified by:
getSharedBindingVariable
in interface InterpreterContext
setSharedBindingVariable
public void setSharedBindingVariable(int bindingSlot,
java.lang.Object value)
- Specified by:
setSharedBindingVariable
in interface InterpreterContext
getLocalVariable
public java.lang.Object getLocalVariable(int offset)
- Description copied from interface:
InterpreterContext
- public Object getLocalVariable(String name);
public Object setLocalVariable(String name, Object value);
- Specified by:
getLocalVariable
in interface InterpreterContext
setLocalVariable
public java.lang.Object setLocalVariable(int offset,
java.lang.Object value)
- Specified by:
setLocalVariable
in interface InterpreterContext
getContext
public ThreadContext getContext()
- Specified by:
getContext
in interface InterpreterContext
getParameter
public java.lang.Object getParameter(int offset)
- Specified by:
getParameter
in interface InterpreterContext
getParameterCount
public int getParameterCount()
- Specified by:
getParameterCount
in interface InterpreterContext
getSelf
public java.lang.Object getSelf()
- Specified by:
getSelf
in interface InterpreterContext
getFrame
public Frame getFrame()
- Specified by:
getFrame
in interface InterpreterContext
setFrame
public void setFrame(Frame frame)
- Specified by:
setFrame
in interface InterpreterContext
getParametersFrom
public IRubyObject[] getParametersFrom(int argIndex)
- Specified by:
getParametersFrom
in interface InterpreterContext
setMethodExitLabel
public void setMethodExitLabel(Label l)
- Specified by:
setMethodExitLabel
in interface InterpreterContext
getMethodExitLabel
public Label getMethodExitLabel()
- Specified by:
getMethodExitLabel
in interface InterpreterContext
setException
public void setException(RubyException e)
- Specified by:
setException
in interface InterpreterContext
getException
public RubyException getException()
- Specified by:
getException
in interface InterpreterContext
Copyright © 2002-2009 JRuby Team. All Rights Reserved.