org.mozilla.javascript.optimizer

Class Codegen


public class Codegen
extends Interpreter

This class generates code for a given IR tree.
Authors:
Norris Boyd
Roger Lawrence

Method Summary

Object
compile(CompilerEnvirons compilerEnv, ScriptOrFnNode tree, String encodedSource, boolean returnFunction)
Function
createFunctionObject(Context cx, Scriptable scope, Object bytecode, Object staticSecurityDomain)
Script
createScriptObject(Object bytecode, Object staticSecurityDomain)

Methods inherited from class org.mozilla.javascript.Interpreter

compile, createFunctionObject, createScriptObject, restartContinuation

Method Details

compile

public Object compile(CompilerEnvirons compilerEnv,
                      ScriptOrFnNode tree,
                      String encodedSource,
                      boolean returnFunction)
Overrides:
compile in interface Interpreter

createFunctionObject

public Function createFunctionObject(Context cx,
                                     Scriptable scope,
                                     Object bytecode,
                                     Object staticSecurityDomain)
Overrides:
createFunctionObject in interface Interpreter

createScriptObject

public Script createScriptObject(Object bytecode,
                                 Object staticSecurityDomain)
Overrides:
createScriptObject in interface Interpreter