public abstract static class ScopeProvider.AbstractScope extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractScope() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ScopeProvider.AbstractScope |
findParent()
Find a parent scope.
|
protected abstract Object |
getArguments(Frame frame)
Provide arguments of this scope.
|
protected abstract String |
getName()
Human readable name of this scope.
|
protected abstract Node |
getNode()
Get a node representing this scope.
|
protected abstract Object |
getVariables(Frame frame)
Provide variables declared in this scope and valid at the
Node passed to
ScopeProvider.findScope(java.lang.Object, com.oracle.truffle.api.nodes.Node, com.oracle.truffle.api.frame.Frame)
. |
protected abstract String getName()
protected abstract Node getNode()
RootNode.null when no node is associated.protected abstract Object getVariables(Frame frame)
Node passed to
ScopeProvider.findScope(java.lang.Object, com.oracle.truffle.api.nodes.Node, com.oracle.truffle.api.frame.Frame)
. In general, there can be different variables returned when different Frame
instances are provided.frame - The current frame, or null for lexical access when the program
is not running, or is not suspended at the scope's location. The variables
might not be readable/writable with the null frame.TruffleObject containing the variables
as its properties. Should not be null, provide an empty
TruffleObject when no variables are available.protected abstract Object getArguments(Frame frame)
Frame instances are provided.frame - The current frame, or null for lexical access when the program
is not running, or is not suspended at the scope's location. The arguments
might not be readable/writable with the null frame.TruffleObject containing the arguments
as its properties for named arguments, or as its array for unnamed arguments.
Return null when this scope does not have a concept of arguments.
Return an empty TruffleObject when it has a sense to have arguments (e.g.
function scope), but there are none.protected abstract ScopeProvider.AbstractScope findParent()
null when there is none.