private SoySauce doCompileSoySauce(
      ServerCompilationPrimitives primitives, Map<String, Supplier<Object>> pluginInstances) {
    Optional<CompiledTemplates> templates =
        BytecodeCompiler.compile(
            primitives.registry,
            primitives.soyTree,
            // if there is an AST cache, assume we are in 'dev mode' and trigger lazy compilation.
            cache != null,
            errorReporter,
            soyFileSuppliers,
            typeRegistry);

    throwIfErrorsPresent();

    return new SoySauceImpl(
        templates.get(),
        scopedData.enterable(),
        soyFunctionMap,
        printDirectives,
        ImmutableMap.copyOf(pluginInstances));
  }
private SoySauce doCompileSoySauce ( ServerCompilationPrimitives primitives , Map < String , Supplier < Object > > pluginInstances ) { Optional < CompiledTemplates > templates = BytecodeCompiler . compile ( primitives . registry , primitives . soyTree , cache != null , errorReporter , soyFileSuppliers , typeRegistry ) ; throwIfErrorsPresent ( ) ; return new SoySauceImpl ( templates . get ( ) , scopedData . enterable ( ) , soyFunctionMap , printDirectives , ImmutableMap . copyOf ( pluginInstances ) ) ; }
Helper method to compile SoySauce from {@link ServerCompilationPrimitives}