| org.mozilla.javascript.Evaluator
All known Subclasses: org.mozilla.javascript.optimizer.Codegen, org.mozilla.javascript.Interpreter,
Evaluator | public interface Evaluator (Code) | | Abstraction of evaluation, which can be implemented either by an
interpreter or compiler.
|
captureStackInfo | public void captureStackInfo(RhinoException ex)(Code) | | Capture stack information from the given exception.
Parameters: ex - an exception thrown during execution |
compile | public Object compile(CompilerEnvirons compilerEnv, ScriptOrFnNode tree, String encodedSource, boolean returnFunction)(Code) | | Compile the script or function from intermediate representation
tree into an executable form.
Parameters: compilerEnv - Compiler environment Parameters: tree - intermediate representation Parameters: encodedSource - encoding of the source code for decompilation Parameters: returnFunction - if true, compiling a function an opaque object that can be passed to eithercreateFunctionObject or createScriptObject, depending on thevalue of returnFunction |
createFunctionObject | public Function createFunctionObject(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain)(Code) | | Create a function object.
Parameters: cx - Current context Parameters: scope - scope of the function Parameters: bytecode - opaque object returned by compile Parameters: staticSecurityDomain - security domain Function object that can be called |
createScriptObject | public Script createScriptObject(Object bytecode, Object staticSecurityDomain)(Code) | | Create a script object.
Parameters: bytecode - opaque object returned by compile Parameters: staticSecurityDomain - security domain Script object that can be evaluated |
getPatchedStack | public String getPatchedStack(RhinoException ex, String nativeStackTrace)(Code) | | Given a native stack trace, patch it with script-specific source
and line information
Parameters: ex - exception Parameters: nativeStackTrace - the native stack trace patched stack trace |
getScriptStack | public List getScriptStack(RhinoException ex)(Code) | | Get the script stack for the given exception
Parameters: ex - exception from execution list of strings for the stack trace |
getSourcePositionFromStack | public String getSourcePositionFromStack(Context cx, int[] linep)(Code) | | Get the source position information by examining the stack.
Parameters: cx - Context Parameters: linep - Array object of length >= 1; getSourcePositionFromStackwill assign the line number to linep[0]. the name of the file or other source container |
setEvalScriptFlag | public void setEvalScriptFlag(Script script)(Code) | | Mark the given script to indicate it was created by a call to
eval() or to a Function constructor.
Parameters: script - script to mark as from eval |
|
|