private void compile(final Reader reader, final Writer writer,
final Map<String, Object> options) throws IOException {
Compiler.setLoggingLevel(Level.SEVERE);
final Compiler compiler = new Compiler(new PrintStream(
LOGGER_OUTPUT_STREAM, false, "UTF-8"));
final CompilerOptions compilerOptions = new CompilerOptions();
CompilationLevel.SIMPLE_OPTIMIZATIONS
.setOptionsForCompilationLevel(compilerOptions);
compilerOptions.setCodingConvention(new ClosureCodingConvention());
if (isSourceMappingEnabled(options)) {
compilerOptions.setSourceMapFormat(Format.V3);
compilerOptions.setSourceMapDetailLevel(DetailLevel.ALL);
}
setupOptions(compilerOptions, options);
compiler.initOptions(compilerOptions);
final Result result = compiler.compile(SourceFile.fromCode("externs", ""),