Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/ObjectType.java @ 18747:6db7923af642
OM: DynamicObject extends TruffleObject, add default implementation
author | Matthias Grimmer <grimmer@ssw.jku.at> |
---|---|
date | Tue, 23 Dec 2014 12:13:14 +0100 |
parents | f439fdb137a3 |
children | d6dba4c723c0 |
comparison
equal
deleted
inserted
replaced
18746:5294b624e2f0 | 18747:6db7923af642 |
---|---|
22 * or visit www.oracle.com if you need additional information or have any | 22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. | 23 * questions. |
24 */ | 24 */ |
25 package com.oracle.truffle.api.object; | 25 package com.oracle.truffle.api.object; |
26 | 26 |
27 import com.oracle.truffle.api.*; | |
27 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; | 28 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; |
29 import com.oracle.truffle.api.interop.*; | |
30 import com.oracle.truffle.api.interop.exception.*; | |
31 import com.oracle.truffle.api.interop.messages.*; | |
28 | 32 |
29 public class ObjectType { | 33 public class ObjectType { |
30 /** | 34 /** |
31 * Delegate method for {@link DynamicObject#equals(Object)}. | 35 * Delegate method for {@link DynamicObject#equals(Object)}. |
32 */ | 36 */ |
65 * @param shapeBefore shape before the property was added | 69 * @param shapeBefore shape before the property was added |
66 * @param shapeAfter shape after the property was added | 70 * @param shapeAfter shape after the property was added |
67 */ | 71 */ |
68 public void onPropertyAdded(Property property, Shape shapeBefore, Shape shapeAfter) { | 72 public void onPropertyAdded(Property property, Shape shapeBefore, Shape shapeAfter) { |
69 } | 73 } |
74 | |
75 public ForeignAccessFactory getForeignAccessFactory() { | |
76 return new ForeignAccessFactory() { | |
77 | |
78 public InteropPredicate getLanguageCheck() { | |
79 throw new AccessException(this.toString() + " cannot be shared"); | |
80 } | |
81 | |
82 public CallTarget getAccess(Message tree) { | |
83 throw new AccessException(this.toString() + " cannot be shared; Message not possible: " + tree.toString()); | |
84 } | |
85 }; | |
86 } | |
70 } | 87 } |