Class StackSpiller.ChildRewriter

  • Enclosing class:
    StackSpiller

    private final class StackSpiller.ChildRewriter
    extends java.lang.Object
    Rewrites child expressions, spilling them into temps if needed. The stack starts in the initial state, and after the first sub-expression is added, it is change to non-empty. This behavior can be overridden by setting the stack manually between adds. When all children have been added, the caller should rewrite the node if didRewrite() is true. Then, it should call finish() with either the original expression or the rewritten expression. finish() will call Expression.comma() if necessary and return a new Result.