comparison truffle/com.oracle.truffle.object.basic/src/com/oracle/truffle/object/basic/ShapeBasic.java @ 22366:78306843f20c

minor Shape refactoring
author Andreas Woess <andreas.woess@oracle.com>
date Fri, 13 Nov 2015 15:36:25 +0100
parents dc83cc1f94f2
children
comparison
equal deleted inserted replaced
22365:c9ba649b0dc1 22366:78306843f20c
22 */ 22 */
23 package com.oracle.truffle.object.basic; 23 package com.oracle.truffle.object.basic;
24 24
25 import com.oracle.truffle.api.object.Layout; 25 import com.oracle.truffle.api.object.Layout;
26 import com.oracle.truffle.api.object.ObjectType; 26 import com.oracle.truffle.api.object.ObjectType;
27 import com.oracle.truffle.api.object.Property;
28 import com.oracle.truffle.object.PropertyMap; 27 import com.oracle.truffle.object.PropertyMap;
29 import com.oracle.truffle.object.ShapeImpl; 28 import com.oracle.truffle.object.ShapeImpl;
30 import com.oracle.truffle.object.Transition; 29 import com.oracle.truffle.object.Transition;
31 30
32 public final class ShapeBasic extends ShapeImpl { 31 public final class ShapeBasic extends ShapeImpl {
41 @SuppressWarnings("hiding") 40 @SuppressWarnings("hiding")
42 @Override 41 @Override
43 protected ShapeImpl createShape(Layout layout, Object sharedData, ShapeImpl parent, ObjectType objectType, PropertyMap propertyMap, Transition transition, Allocator allocator, int id) { 42 protected ShapeImpl createShape(Layout layout, Object sharedData, ShapeImpl parent, ObjectType objectType, PropertyMap propertyMap, Transition transition, Allocator allocator, int id) {
44 return new ShapeBasic(layout, sharedData, parent, objectType, propertyMap, transition, allocator, id); 43 return new ShapeBasic(layout, sharedData, parent, objectType, propertyMap, transition, allocator, id);
45 } 44 }
46
47 @Override
48 public ShapeImpl replaceProperty(Property oldProperty, Property newProperty) {
49 return directReplaceProperty(oldProperty, newProperty);
50 }
51 } 45 }