org.mozilla.javascript.optimizer
Class Codegen

java.lang.Object
  extended byorg.mozilla.javascript.Interpreter
      extended byorg.mozilla.javascript.optimizer.Codegen

public class Codegen
extends Interpreter

This class generates code for a given IR tree.

Author:
Norris Boyd, Roger Lawrence

Constructor Summary
Codegen()
           
 
Method Summary
 java.lang.Object compile(CompilerEnvirons compilerEnv, ScriptOrFnNode tree, java.lang.String encodedSource, boolean returnFunction)
           
 Function createFunctionObject(Context cx, Scriptable scope, java.lang.Object bytecode, java.lang.Object staticSecurityDomain)
           
 Script createScriptObject(java.lang.Object bytecode, java.lang.Object staticSecurityDomain)
           
 
Methods inherited from class org.mozilla.javascript.Interpreter
restartContinuation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Codegen

public Codegen()
Method Detail

compile

public java.lang.Object compile(CompilerEnvirons compilerEnv,
                                ScriptOrFnNode tree,
                                java.lang.String encodedSource,
                                boolean returnFunction)
Overrides:
compile in class Interpreter

createScriptObject

public Script createScriptObject(java.lang.Object bytecode,
                                 java.lang.Object staticSecurityDomain)
Overrides:
createScriptObject in class Interpreter

createFunctionObject

public Function createFunctionObject(Context cx,
                                     Scriptable scope,
                                     java.lang.Object bytecode,
                                     java.lang.Object staticSecurityDomain)
Overrides:
createFunctionObject in class Interpreter