edu.rice.cs.dynamicjava.interpreter
Class RuntimeBindings
java.lang.Object
edu.rice.cs.dynamicjava.interpreter.RuntimeBindings
public class RuntimeBindings
- extends Object
An environment used for evaluation. All keys in the environment are global -- there are no
shadowing concerns. Thus, instances can be used very flexibly during evaluation, given that
a program is statically safe. For example, the environment used to call a function can extend
the calling context. Without this flexibility, it would have to be determined at what point
(if any) in the calling context's chain of environments the function declaration and the calling
context share a common lexical scope.
|
Constructor Summary |
RuntimeBindings(RuntimeBindings parent,
DJClass thisClass,
Object thisObj)
|
RuntimeBindings(RuntimeBindings parent,
Iterable<LocalVariable> vars,
Iterable<Object> vals)
|
RuntimeBindings(RuntimeBindings parent,
LocalVariable var,
Object val)
|
RuntimeBindings(RuntimeBindings parent,
Map<LocalVariable,Object> vars,
Map<VariableType,Type> tvars,
Map<DJClass,Object> thisVals)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY
public static final RuntimeBindings EMPTY
RuntimeBindings
public RuntimeBindings(RuntimeBindings parent,
Map<LocalVariable,Object> vars,
Map<VariableType,Type> tvars,
Map<DJClass,Object> thisVals)
RuntimeBindings
public RuntimeBindings(RuntimeBindings parent,
LocalVariable var,
Object val)
RuntimeBindings
public RuntimeBindings(RuntimeBindings parent,
Iterable<LocalVariable> vars,
Iterable<Object> vals)
RuntimeBindings
public RuntimeBindings(RuntimeBindings parent,
DJClass thisClass,
Object thisObj)
get
public Object get(LocalVariable v)
set
public void set(LocalVariable v,
Object val)
get
public Type get(VariableType v)
getThis
public Object getThis(DJClass c)