nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/CompilationPhase.java
equal
deleted
inserted
replaced
276 final FunctionNode newFunctionNode = transformFunction(fn, new LocalVariableTypesCalculator(compiler)); |
276 final FunctionNode newFunctionNode = transformFunction(fn, new LocalVariableTypesCalculator(compiler)); |
277 final ScriptEnvironment senv = compiler.getScriptEnvironment(); |
277 final ScriptEnvironment senv = compiler.getScriptEnvironment(); |
278 final PrintWriter err = senv.getErr(); |
278 final PrintWriter err = senv.getErr(); |
279 |
279 |
280 //TODO separate phase for the debug printouts for abstraction and clarity |
280 //TODO separate phase for the debug printouts for abstraction and clarity |
281 if (senv._print_lower_ast || fn.getFlag(FunctionNode.IS_PRINT_LOWER_AST)) { |
281 if (senv._print_lower_ast || fn.getDebugFlag(FunctionNode.DEBUG_PRINT_LOWER_AST)) { |
282 err.println("Lower AST for: " + quote(newFunctionNode.getName())); |
282 err.println("Lower AST for: " + quote(newFunctionNode.getName())); |
283 err.println(new ASTWriter(newFunctionNode)); |
283 err.println(new ASTWriter(newFunctionNode)); |
284 } |
284 } |
285 |
285 |
286 if (senv._print_lower_parse || fn.getFlag(FunctionNode.IS_PRINT_LOWER_PARSE)) { |
286 if (senv._print_lower_parse || fn.getDebugFlag(FunctionNode.DEBUG_PRINT_LOWER_PARSE)) { |
287 err.println("Lower AST for: " + quote(newFunctionNode.getName())); |
287 err.println("Lower AST for: " + quote(newFunctionNode.getName())); |
288 err.println(new PrintVisitor(newFunctionNode)); |
288 err.println(new PrintVisitor(newFunctionNode)); |
289 } |
289 } |
290 |
290 |
291 return newFunctionNode; |
291 return newFunctionNode; |