changeset 16268:20dbf77c161d

8009146: Eliminate some dead code in preparation for immutable AST Reviewed-by: hannesw, lagergren
author attila
date Wed, 27 Feb 2013 15:49:05 +0100
parents cd471d62bb6a
children d74c36a06911
files nashorn/src/jdk/nashorn/internal/codegen/CodeGenerator.java nashorn/src/jdk/nashorn/internal/ir/Assignment.java nashorn/src/jdk/nashorn/internal/ir/UnaryNode.java nashorn/src/jdk/nashorn/internal/ir/VarNode.java nashorn/src/jdk/nashorn/internal/runtime/linker/NashornCallSiteDescriptor.java
diffstat 5 files changed, 0 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- 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())) {
--- 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);
 }
--- 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;
--- 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
--- 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. */