# HG changeset patch # User Doug Simon # Date 1411639370 -7200 # Node ID f4b939d433a4f75926b2b9d42f278be6c6ee7e4c # Parent ef64e2682bb6da92526297c80e2d3aba98a0e88f removed unused support for rescanning offsets in FieldIntrospection objects diff -r ef64e2682bb6 -r f4b939d433a4 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/FieldIntrospection.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/FieldIntrospection.java Thu Sep 25 10:27:17 2014 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/FieldIntrospection.java Thu Sep 25 12:02:50 2014 +0200 @@ -29,8 +29,7 @@ public abstract class FieldIntrospection extends UnsafeAccess { /** - * Interface used by {@link #rescanAllFieldOffsets(CalcOffset)} to determine the offset (in - * bytes) of a field. + * Interface used to determine the offset (in bytes) of a field. */ public interface CalcOffset { @@ -60,14 +59,6 @@ return clazz; } - public static void rescanAllFieldOffsets(CalcOffset calc) { - for (FieldIntrospection nodeClass : allClasses.values()) { - nodeClass.rescanFieldOffsets(calc); - } - } - - protected abstract void rescanFieldOffsets(CalcOffset calc); - public abstract static class BaseFieldScanner { private final CalcOffset calc; diff -r ef64e2682bb6 -r f4b939d433a4 graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java --- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Thu Sep 25 10:27:17 2014 +0200 +++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java Thu Sep 25 12:02:50 2014 +0200 @@ -281,11 +281,6 @@ return false; } - @Override - protected void rescanFieldOffsets(CalcOffset calc) { - throw new UnsupportedOperationException(); - } - /** * Determines if a given {@link Node} class is described by this {@link NodeClass} object. This * is useful for doing an exact type test (as opposed to an instanceof test) on a node. For @@ -293,7 +288,7 @@ * *
      *     if (node.getNodeClass().is(BeginNode.class)) { ... }
-     *
+     * 
      *     // Due to generated Node classes, the test below
      *     // is *not* the same as the test above:
      *     if (node.getClass() == BeginNode.class) { ... }
diff -r ef64e2682bb6 -r f4b939d433a4 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/CompositeValueClass.java
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/CompositeValueClass.java	Thu Sep 25 10:27:17 2014 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/CompositeValueClass.java	Thu Sep 25 12:02:50 2014 +0200
@@ -83,22 +83,6 @@
         fieldTypes = scanner.fieldTypes;
     }
 
-    @Override
-    protected void rescanFieldOffsets(CalcOffset calc) {
-        ValueFieldScanner scanner = new ValueFieldScanner(calc);
-        scanner.scan(getClazz());
-
-        OperandModeAnnotation mode = scanner.valueAnnotations.get(CompositeValue.Component.class);
-        copyInto(componentOffsets, sortedLongCopy(mode.scalarOffsets, mode.arrayOffsets));
-
-        copyInto(dataOffsets, sortedLongCopy(scanner.dataOffsets));
-
-        fieldNames.clear();
-        fieldNames.putAll(scanner.fieldNames);
-        fieldTypes.clear();
-        fieldTypes.putAll(scanner.fieldTypes);
-    }
-
     private static class ValueFieldScanner extends FieldScanner {
 
         public ValueFieldScanner(CalcOffset calc) {
diff -r ef64e2682bb6 -r f4b939d433a4 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstructionClass.java
--- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstructionClass.java	Thu Sep 25 10:27:17 2014 +0200
+++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstructionClass.java	Thu Sep 25 12:02:50 2014 +0200
@@ -113,32 +113,6 @@
         opcodeOffset = scanner.opcodeOffset;
     }
 
-    @Override
-    protected void rescanFieldOffsets(CalcOffset calc) {
-        InstructionFieldScanner scanner = new InstructionFieldScanner(calc);
-        scanner.scan(getClazz());
-
-        OperandModeAnnotation mode = scanner.valueAnnotations.get(LIRInstruction.Use.class);
-        copyInto(useOffsets, sortedLongCopy(mode.scalarOffsets, mode.arrayOffsets));
-        mode = scanner.valueAnnotations.get(LIRInstruction.Alive.class);
-        copyInto(aliveOffsets, sortedLongCopy(mode.scalarOffsets, mode.arrayOffsets));
-        mode = scanner.valueAnnotations.get(LIRInstruction.Temp.class);
-        copyInto(tempOffsets, sortedLongCopy(mode.scalarOffsets, mode.arrayOffsets));
-        mode = scanner.valueAnnotations.get(LIRInstruction.Def.class);
-        copyInto(defOffsets, sortedLongCopy(mode.scalarOffsets, mode.arrayOffsets));
-
-        copyInto(stateOffsets, sortedLongCopy(scanner.stateOffsets));
-        copyInto(dataOffsets, sortedLongCopy(scanner.dataOffsets));
-
-        fieldNames.clear();
-        fieldNames.putAll(scanner.fieldNames);
-        fieldTypes.clear();
-        fieldTypes.putAll(scanner.fieldTypes);
-
-        opcodeConstant = scanner.opcodeConstant;
-        opcodeOffset = scanner.opcodeOffset;
-    }
-
     private static class InstructionFieldScanner extends FieldScanner {
 
         private String opcodeConstant;