comparison graal/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/ObjectType.java @ 21900:cb051c368c80

Truffle: move property notification hook to shared data, and call it on remove as well
author Andreas Woess <andreas.woess@oracle.com>
date Wed, 10 Jun 2015 20:05:52 +0200
parents c76742cc2c6f
children
comparison
equal deleted inserted replaced
21899:4663ad4f9fbf 21900:cb051c368c80
59 */ 59 */
60 public Object createShapeData(Shape shape) { 60 public Object createShapeData(Shape shape) {
61 return null; 61 return null;
62 } 62 }
63 63
64 /**
65 * Called when a new property is added to a shape.
66 *
67 * @param property the added property
68 * @param shapeBefore shape before the property was added
69 * @param shapeAfter shape after the property was added
70 */
71 public void onPropertyAdded(Property property, Shape shapeBefore, Shape shapeAfter) {
72 }
73
74 public ForeignAccess getForeignAccessFactory() { 64 public ForeignAccess getForeignAccessFactory() {
75 return ForeignAccess.create(new com.oracle.truffle.api.interop.ForeignAccess.Factory() { 65 return ForeignAccess.create(new com.oracle.truffle.api.interop.ForeignAccess.Factory() {
76 66
77 public boolean canHandle(TruffleObject obj) { 67 public boolean canHandle(TruffleObject obj) {
78 throw new IllegalArgumentException(this.toString() + " cannot be shared"); 68 throw new IllegalArgumentException(this.toString() + " cannot be shared");