|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoscript.NodeEvaluator
oscript.compiler.CompiledInnerNodeEvaluator
In an effort to generate fewer classes, and improve startup performance,
functions within the file/function node that is passed to the compiler
generate additional evalNodeX methods within the same class that
is generated for the parent. But since we still need individual
NodeEvaluator
s for each function, this class acts as a lightweight
wrapper object which forwards the evalNode(oscript.util.StackFrame, oscript.data.Scope)
method to the appropriate
CompiledNodeEvaluator.evalInnerNode(int, oscript.util.StackFrame, oscript.data.Scope)
Field Summary |
Fields inherited from class oscript.NodeEvaluator |
ALL, PRIVATE, PUBPROT, SMIT_PERMS |
Constructor Summary | |
CompiledInnerNodeEvaluator(int id,
int idx,
CompiledNodeEvaluator cne)
Class Constructor. |
Method Summary | |
java.lang.Object |
evalNode(StackFrame sf,
Scope scope)
Evaluate, in the specified scope. |
AbstractFile |
getFile()
Get the file that this node was parsed from. |
int |
getId()
Get the function symbol (name), if this node evaluator is a function, otherwise return -1 . |
SymbolTable |
getSharedMemberIndexTable(int perm)
Get the SMIT for the scope(s) created when invoking this node evaluator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CompiledInnerNodeEvaluator(int id, int idx, CompiledNodeEvaluator cne)
id
- the function name symbol ididx
- the index to pass back to CompiledNodeEvaluator.evalInnerNode(int, oscript.util.StackFrame, oscript.data.Scope)
cne
- the compiled node which contains the compiled codeMethod Detail |
public AbstractFile getFile()
getFile
in class NodeEvaluator
public int getId()
-1
.
getId
in class NodeEvaluator
-1
public java.lang.Object evalNode(StackFrame sf, Scope scope) throws PackagedScriptObjectException
scope
that the
function is evaluated in.
evalNode
in class NodeEvaluator
sf
- the stack frame to evaluate the node inscope
- the scope to evaluate the function in
PackagedScriptObjectException
public SymbolTable getSharedMemberIndexTable(int perm)
getSharedMemberIndexTable
in class NodeEvaluator
perm
- PRIVATE
, PUBPROT
,
ALL
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |