/** * Compiles the given expression tree to a sequence of bytecode in the current method visitor. * * <p>If successful, the generated bytecode will resolve to a {@link SoyValueProvider} if it can * be done without introducing unnecessary boxing operations. This is intended for situations * (like print operations) where calling {@link SoyValueProvider#renderAndResolve} would be better * than calling {@link #toString()} and passing directly to the output. */ Optional<Expression> compileAvoidingBoxing(ExprNode node, Label reattachPoint) { checkNotNull(node); return new CompilerVisitor( reporter, variables, null, exprCompiler.asBasicCompiler(reattachPoint)) .exec(node); }