org.mozilla.javascript.optimizer

Class Codegen

public class Codegen extends Interpreter

This class generates code for a given IR tree.

Author: Norris Boyd Roger Lawrence

Method Summary
Objectcompile(CompilerEnvirons compilerEnv, ScriptOrFnNode tree, String encodedSource, boolean returnFunction)
FunctioncreateFunctionObject(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain)
ScriptcreateScriptObject(Object bytecode, Object staticSecurityDomain)

Method Detail

compile

public Object compile(CompilerEnvirons compilerEnv, ScriptOrFnNode tree, String encodedSource, boolean returnFunction)

createFunctionObject

public Function createFunctionObject(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain)

createScriptObject

public Script createScriptObject(Object bytecode, Object staticSecurityDomain)