From 4fd34367097ed85d610e91bd215cc9b67a7b71a2 Mon Sep 17 00:00:00 2001 From: Attila Szegedi Date: Wed, 14 May 2014 17:05:08 +0200 Subject: [PATCH] 8043133: Fix corner cases of JDK-8041995 Reviewed-by: hannesw, lagergren --- .../internal/codegen/CodeGenerator.java | 13 +++++- nashorn/test/script/basic/JDK-8043133.js | 41 +++++++++++++++++++ .../test/script/basic/JDK-8043133.js.EXPECTED | 1 + 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 nashorn/test/script/basic/JDK-8043133.js create mode 100644 nashorn/test/script/basic/JDK-8043133.js.EXPECTED diff --git a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java index 85a9c9cbe0c..282aca8be00 100644 --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java @@ -2212,6 +2212,11 @@ final class CodeGenerator extends NodeOperatorVisitor(new LexicalContext()) { + @Override + public boolean enterFunctionNode(FunctionNode functionNode) { + return false; + } + @Override public boolean enterDefault(final Node node) { if (contains) { @@ -2257,7 +2262,6 @@ final class CodeGenerator extends NodeOperatorVisitor