org.mozilla.javascript

## Class IRFactory

- java.lang.Object
- - org.mozilla.javascript.Parser
  - - org.mozilla.javascript.IRFactory

-     public final class IRFactory
      extends Parser

  This class rewrites the parse tree into an IR suitable for codegen.
  Author:
    Mike McCabe, Norris Boyd
  See Also:
    `Node`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.mozilla.javascript.Parser

      `Parser.PerFunctionVariables`

  - ### Field Summary

    - ### Fields inherited from class org.mozilla.javascript.Parser

      `ARGC_LIMIT, inUseStrictDirective, nestingOfFunction`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IRFactory()`
    `IRFactory(CompilerEnvirons env)`
    `IRFactory(CompilerEnvirons env, ErrorReporter errorReporter)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Node` | `transform(AstNode node)`
    `ScriptNode` | `transformTree(AstRoot root)` Transforms the tree into a lower-level IR suitable for codegen.

    - ### Methods inherited from class org.mozilla.javascript.Parser

      `checkActivationName, checkMutableReference, createName, createName, createNumber, createScopeNode, eof, parse, parse, removeParens, setIsGenerator, setRequiresActivation, simpleAssignment`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IRFactory

          public IRFactory()

    - #### IRFactory

          public IRFactory(CompilerEnvirons env)

    - #### IRFactory

          public IRFactory(CompilerEnvirons env,
                   ErrorReporter errorReporter)

  - ### Method Detail

    - #### transformTree

          public ScriptNode transformTree(AstRoot root)

      Transforms the tree into a lower-level IR suitable for codegen. Optionally generates the encoded source.

    - #### transform

          public Node transform(AstNode node)