changeset 18621:b3b241bbbbdb

OM: rename transitions
author Andreas Woess <andreas.woess@jku.at>
date Thu, 04 Dec 2014 13:35:36 +0100
parents 23de014b38ab
children a306a94111a6
files graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java graal/com.oracle.truffle.object/src/com/oracle/truffle/object/Transition.java
diffstat 2 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java	Thu Dec 04 19:50:39 2014 +0100
+++ b/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/ShapeImpl.java	Thu Dec 04 13:35:36 2014 +0100
@@ -35,10 +35,10 @@
 import com.oracle.truffle.object.Locations.DeclaredLocation;
 import com.oracle.truffle.object.Locations.DualLocation;
 import com.oracle.truffle.object.Locations.ValueLocation;
-import com.oracle.truffle.object.Transition.AddTransition;
-import com.oracle.truffle.object.Transition.OperationsTransition;
+import com.oracle.truffle.object.Transition.AddPropertyTransition;
+import com.oracle.truffle.object.Transition.ObjectTypeTransition;
 import com.oracle.truffle.object.Transition.PropertyTransition;
-import com.oracle.truffle.object.Transition.RemoveTransition;
+import com.oracle.truffle.object.Transition.RemovePropertyTransition;
 
 /**
  * Shape objects create a mapping of Property objects to indexes. The mapping of those indexes to an
@@ -340,7 +340,7 @@
         assert !getPropertyListInternal(false).contains(prop);
         // invalidatePropertyAssumption(prop.getName());
 
-        Transition.AddTransition key = new Transition.AddTransition(prop);
+        Transition.AddPropertyTransition key = new Transition.AddPropertyTransition(prop);
         Map<Transition, ShapeImpl> transitionMapForRead = this.getTransitionMapForRead();
         ShapeImpl cachedShape = transitionMapForRead.get(key);
         if (cachedShape != null) { // Shape already exists?
@@ -388,7 +388,7 @@
     /**
      * Create a new shape that adds a property to the parent shape.
      */
-    private static ShapeImpl makeShapeWithAddedProperty(ShapeImpl parent, AddTransition addTransition) {
+    private static ShapeImpl makeShapeWithAddedProperty(ShapeImpl parent, AddPropertyTransition addTransition) {
         Property addend = addTransition.getProperty();
         BaseAllocator allocator = parent.allocator().addLocation(addend.getLocation());
 
@@ -527,7 +527,7 @@
     }
 
     public final void setTypeTransition(ShapeImpl successorShape, Property before, Property after) {
-        getTransitionMapForWrite().put(new Transition.TypeTransition(before, after), successorShape);
+        getTransitionMapForWrite().put(new Transition.PropertyTypeTransition(before, after), successorShape);
     }
 
     private static Assumption createValidAssumption() {
@@ -611,7 +611,7 @@
     @TruffleBoundary
     @Override
     public final ShapeImpl removeProperty(Property prop) {
-        RemoveTransition transition = new RemoveTransition(prop);
+        RemovePropertyTransition transition = new RemovePropertyTransition(prop);
         ShapeImpl cachedShape = getTransitionMapForRead().get(transition);
         if (cachedShape != null) {
             return (ShapeImpl) layout.getStrategy().returnCached(cachedShape);
@@ -809,12 +809,12 @@
     @Override
     @TruffleBoundary
     public final ShapeImpl changeType(ObjectType newOps) {
-        OperationsTransition transition = new OperationsTransition(newOps);
+        ObjectTypeTransition transition = new ObjectTypeTransition(newOps);
         ShapeImpl cachedShape = getTransitionMapForRead().get(transition);
         if (cachedShape != null) {
             return cachedShape;
         } else {
-            ShapeImpl newShape = createShape(layout, extraData, this, newOps, propertyMap, allocator(), id);
+            ShapeImpl newShape = createShape(layout, sharedData, this, newOps, propertyMap, allocator(), id);
             addTransition(transition, newShape);
             return newShape;
         }
--- a/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/Transition.java	Thu Dec 04 19:50:39 2014 +0100
+++ b/graal/com.oracle.truffle.object/src/com/oracle/truffle/object/Transition.java	Thu Dec 04 13:35:36 2014 +0100
@@ -79,47 +79,47 @@
         }
     }
 
-    public static final class AddTransition extends PropertyTransition {
-        public AddTransition(Property property) {
+    public static final class AddPropertyTransition extends PropertyTransition {
+        public AddPropertyTransition(Property property) {
             super(property);
         }
     }
 
-    public static final class RemoveTransition extends PropertyTransition {
-        public RemoveTransition(Property property) {
+    public static final class RemovePropertyTransition extends PropertyTransition {
+        public RemovePropertyTransition(Property property) {
             super(property);
         }
     }
 
-    public static final class OperationsTransition extends Transition {
-        private final ObjectType operations;
+    public static final class ObjectTypeTransition extends Transition {
+        private final ObjectType objectType;
 
-        public OperationsTransition(ObjectType operations) {
-            this.operations = operations;
+        public ObjectTypeTransition(ObjectType objectType) {
+            this.objectType = objectType;
         }
 
-        public ObjectType getOperations() {
-            return operations;
+        public ObjectType getObjectType() {
+            return objectType;
         }
 
         @Override
         public boolean equals(Object other) {
-            return super.equals(other) && Objects.equals(operations, ((OperationsTransition) other).operations);
+            return super.equals(other) && Objects.equals(objectType, ((ObjectTypeTransition) other).objectType);
         }
 
         @Override
         public int hashCode() {
             final int prime = 31;
             int result = super.hashCode();
-            result = prime * result + ((operations == null) ? 0 : operations.hashCode());
+            result = prime * result + ((objectType == null) ? 0 : objectType.hashCode());
             return result;
         }
     }
 
-    public static final class TypeTransition extends PropertyTransition {
+    public static final class PropertyTypeTransition extends PropertyTransition {
         private final Property after;
 
-        public TypeTransition(Property before, Property after) {
+        public PropertyTypeTransition(Property before, Property after) {
             super(before);
             this.after = after;
         }