# HG changeset patch # User attila # Date 1361976545 -3600 # Node ID 20dbf77c161dd1e02dbcfb57b36a5fa7a74640ea # Parent cd471d62bb6ab60046dd49755f956eb86830e5d5 8009146: Eliminate some dead code in preparation for immutable AST Reviewed-by: hannesw, lagergren diff -r cd471d62bb6a -r 20dbf77c161d nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java --- a/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Wed Feb 27 15:20:26 2013 +0100 +++ b/nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java Wed Feb 27 15:49:05 2013 +0100 @@ -46,7 +46,6 @@ import static jdk.nashorn.internal.ir.Symbol.IS_INTERNAL; import static jdk.nashorn.internal.ir.Symbol.IS_TEMP; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_FAST_SCOPE; -import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_FUNCTION_DECLARATION; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_SCOPE; import static jdk.nashorn.internal.runtime.linker.NashornCallSiteDescriptor.CALLSITE_STRICT; @@ -2052,9 +2051,6 @@ if (needsScope) { int flags = CALLSITE_SCOPE | getCallSiteFlags(); - if (varNode.isFunctionVarNode()) { - flags |= CALLSITE_FUNCTION_DECLARATION; - } final IdentNode identNode = varNode.getName(); final Type type = identNode.getType(); if (varSymbol.isFastScope(getCurrentFunctionNode())) { diff -r cd471d62bb6a -r 20dbf77c161d nashorn/src/jdk/nashorn/internal/ir/Assignment.java --- a/nashorn/src/jdk/nashorn/internal/ir/Assignment.java Wed Feb 27 15:20:26 2013 +0100 +++ b/nashorn/src/jdk/nashorn/internal/ir/Assignment.java Wed Feb 27 15:49:05 2013 +0100 @@ -46,18 +46,4 @@ * @return get the assignment source node */ public Node getAssignmentSource(); - - /** - * Reset the assignment source - * - * @param newSource new source node - */ - public void setAssignmentSource(final Node newSource); - - /** - * Reset the assignment destination - * - * @param newDest new destination node - */ - public void setAssignmentDest(final D newDest); } diff -r cd471d62bb6a -r 20dbf77c161d nashorn/src/jdk/nashorn/internal/ir/UnaryNode.java --- a/nashorn/src/jdk/nashorn/internal/ir/UnaryNode.java Wed Feb 27 15:20:26 2013 +0100 +++ b/nashorn/src/jdk/nashorn/internal/ir/UnaryNode.java Wed Feb 27 15:49:05 2013 +0100 @@ -109,16 +109,6 @@ } @Override - public void setAssignmentSource(final Node source) { - setAssignmentDest(source); - } - - @Override - public void setAssignmentDest(final Node source) { - setRHS(source); - } - - @Override public boolean equals(final Object other) { if (!super.equals(other)) { return false; diff -r cd471d62bb6a -r 20dbf77c161d nashorn/src/jdk/nashorn/internal/ir/VarNode.java --- a/nashorn/src/jdk/nashorn/internal/ir/VarNode.java Wed Feb 27 15:20:26 2013 +0100 +++ b/nashorn/src/jdk/nashorn/internal/ir/VarNode.java Wed Feb 27 15:49:05 2013 +0100 @@ -83,20 +83,10 @@ } @Override - public void setAssignmentDest(final IdentNode node) { - setName(name); - } - - @Override public Node getAssignmentSource() { return isAssignment() ? getInit() : null; } - @Override - public void setAssignmentSource(final Node source) { - setInit(source); - } - /** * Does this variable declaration have an init value * @return true if an init exists, false otherwise diff -r cd471d62bb6a -r 20dbf77c161d nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java --- a/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Wed Feb 27 15:20:26 2013 +0100 +++ b/nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java Wed Feb 27 15:49:05 2013 +0100 @@ -43,8 +43,6 @@ public static final int CALLSITE_SCOPE = 0x01; /** Flags that the call site is in code that uses ECMAScript strict mode. */ public static final int CALLSITE_STRICT = 0x02; - /** Flags that a property setter call site is part of a function declaration that assigns the function object to a name. */ - public static final int CALLSITE_FUNCTION_DECLARATION = 0x04; /** Flags that a property getter or setter call site references a scope variable that is not in the global scope * (it is in a function lexical scope), and the function's scope object class is fixed and known in advance. Such * getters and setters can often be linked more optimally using these assumptions. */