Mercurial > hg > graal-compiler
changeset 17211:f4b939d433a4
removed unused support for rescanning offsets in FieldIntrospection objects
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 25 Sep 2014 12:02:50 +0200 |
parents | ef64e2682bb6 |
children | a552dd335bde |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/FieldIntrospection.java graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/CompositeValueClass.java graal/com.oracle.graal.lir/src/com/oracle/graal/lir/LIRInstructionClass.java |
diffstat | 4 files changed, 2 insertions(+), 58 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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 @@ * * <pre> * 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) { ... }
--- 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) {
--- 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;