1.1 --- a/src/jdk/nashorn/internal/codegen/Compiler.java Thu Oct 02 16:30:49 2014 +0200 1.2 +++ b/src/jdk/nashorn/internal/codegen/Compiler.java Mon Oct 06 10:43:57 2014 +0200 1.3 @@ -458,12 +458,14 @@ 1.4 1.5 @Override 1.6 public DebugLogger initLogger(final Context ctxt) { 1.7 + final boolean optimisticTypes = ctxt.getEnv()._optimistic_types; 1.8 return ctxt.getLogger(this.getClass(), new Consumer<DebugLogger>() { 1.9 @Override 1.10 public void accept(final DebugLogger newLogger) { 1.11 if (!Compiler.this.getScriptEnvironment()._lazy_compilation) { 1.12 newLogger.warning("WARNING: Running with lazy compilation switched off. This is not a default setting."); 1.13 } 1.14 + newLogger.warning("Optimistic types are ", optimisticTypes ? "ENABLED." : "DISABLED."); 1.15 } 1.16 }); 1.17 } 1.18 @@ -541,9 +543,10 @@ 1.19 * @throws CompilationException if error occurs during compilation 1.20 */ 1.21 public FunctionNode compile(final FunctionNode functionNode, final CompilationPhases phases) throws CompilationException { 1.22 - 1.23 - log.finest("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc())); 1.24 - log.indent(); 1.25 + if (log.isEnabled()) { 1.26 + log.info("Starting compile job for ", DebugLogger.quote(functionNode.getName()), " phases=", quote(phases.getDesc())); 1.27 + log.indent(); 1.28 + } 1.29 1.30 final String name = DebugLogger.quote(functionNode.getName()); 1.31 1.32 @@ -560,7 +563,7 @@ 1.33 long time = 0L; 1.34 1.35 for (final CompilationPhase phase : phases) { 1.36 - log.fine(phase, " starting for ", quote(name)); 1.37 + log.fine(phase, " starting for ", name); 1.38 1.39 try { 1.40 newFunctionNode = phase.apply(this, phases, newFunctionNode); 1.41 @@ -588,8 +591,11 @@ 1.42 log.unindent(); 1.43 1.44 if (info) { 1.45 - final StringBuilder sb = new StringBuilder(); 1.46 - sb.append("Compile job for ").append(newFunctionNode.getSource()).append(':').append(quote(newFunctionNode.getName())).append(" finished"); 1.47 + final StringBuilder sb = new StringBuilder("Finished compile job for "); 1.48 + sb.append(newFunctionNode.getSource()). 1.49 + append(':'). 1.50 + append(quote(newFunctionNode.getName())); 1.51 + 1.52 if (time > 0L && timeLogger != null) { 1.53 assert env.isTimingEnabled(); 1.54 sb.append(" in ").append(time).append(" ms");