1.1 --- a/src/jdk/nashorn/internal/codegen/CodeGenerator.java Fri Sep 25 17:53:06 2015 +0200 1.2 +++ b/src/jdk/nashorn/internal/codegen/CodeGenerator.java Mon Sep 28 08:40:39 2015 +0200 1.3 @@ -129,7 +129,7 @@ 1.4 import jdk.nashorn.internal.ir.WhileNode; 1.5 import jdk.nashorn.internal.ir.WithNode; 1.6 import jdk.nashorn.internal.ir.visitor.NodeOperatorVisitor; 1.7 -import jdk.nashorn.internal.ir.visitor.NodeVisitor; 1.8 +import jdk.nashorn.internal.ir.visitor.SimpleNodeVisitor; 1.9 import jdk.nashorn.internal.objects.Global; 1.10 import jdk.nashorn.internal.parser.Lexer.RegexToken; 1.11 import jdk.nashorn.internal.parser.TokenType; 1.12 @@ -1433,8 +1433,7 @@ 1.13 final Block currentBlock = lc.getCurrentBlock(); 1.14 final CodeGeneratorLexicalContext codegenLexicalContext = lc; 1.15 1.16 - function.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) { 1.17 - 1.18 + function.accept(new SimpleNodeVisitor() { 1.19 private MethodEmitter sharedScopeCall(final IdentNode identNode, final int flags) { 1.20 final Symbol symbol = identNode.getSymbol(); 1.21 final boolean isFastScope = isFastScope(symbol); 1.22 @@ -2461,7 +2460,7 @@ 1.23 1.24 @Override 1.25 public Boolean get() { 1.26 - value.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) { 1.27 + value.accept(new SimpleNodeVisitor() { 1.28 @Override 1.29 public boolean enterFunctionNode(final FunctionNode functionNode) { 1.30 return false; 1.31 @@ -2799,7 +2798,7 @@ 1.32 boolean contains; 1.33 @Override 1.34 public Boolean get() { 1.35 - rootExpr.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) { 1.36 + rootExpr.accept(new SimpleNodeVisitor() { 1.37 @Override 1.38 public boolean enterFunctionNode(final FunctionNode functionNode) { 1.39 return false; 1.40 @@ -4347,7 +4346,7 @@ 1.41 * on the stack throughout the store and used at the end to execute it 1.42 */ 1.43 1.44 - target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) { 1.45 + target.accept(new SimpleNodeVisitor() { 1.46 @Override 1.47 public boolean enterIdentNode(final IdentNode node) { 1.48 if (node.getSymbol().isScope()) { 1.49 @@ -4446,7 +4445,7 @@ 1.50 * need to do a conversion on non-equivalent types exists, but is 1.51 * very rare. See for example test/script/basic/access-specializer.js 1.52 */ 1.53 - target.accept(new NodeVisitor<LexicalContext>(new LexicalContext()) { 1.54 + target.accept(new SimpleNodeVisitor() { 1.55 @Override 1.56 protected boolean enterDefault(final Node node) { 1.57 throw new AssertionError("Unexpected node " + node + " in store epilogue");