annotate graal/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/Property.java @ 20108:36fdc4af85d5

LinearScan: add more detailed timers.
author Josef Eisl <josef.eisl@jku.at>
date Wed, 01 Apr 2015 11:48:18 +0200
parents f439fdb137a3
children de8880bbf2e1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18407
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
1 /*
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
2 * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
4 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
10 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
11 * This code is distributed in the hope that it will be useful, but WITHOUT
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
14 * version 2 for more details (a copy is included in the LICENSE file that
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
15 * accompanied this code).
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
16 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License version
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
18 * 2 along with this work; if not, write to the Free Software Foundation,
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
20 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
22 * or visit www.oracle.com if you need additional information or have any
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
23 * questions.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
24 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
25 package com.oracle.truffle.api.object;
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
26
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
27 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
28 * Property objects represent the mapping between low-level stores and high-level data. The simplest
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
29 * Property could be nothing more than a map of one index to one property's value, but abstracting
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
30 * the interface allows for getter/setter methods, type-checked properties, and other such
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
31 * specialized and language-specific behavior. ECMAScript[8.6.1]
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
32 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
33 public abstract class Property {
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
34 protected Property() {
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
35 }
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
36
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
37 public static Property create(Object key, Location location, int flags) {
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
38 return Layout.getFactory().createProperty(key, location, flags);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
39 }
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
40
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
41 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
42 * Get property identifier.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
43 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
44 public abstract Object getKey();
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
45
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
46 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
47 * Get property flags.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
48 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
49 public abstract int getFlags();
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
50
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
51 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
52 * Change the property's location.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
53 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
54 * @return a Property with the new location (or {@code this} if the location is unchanged).
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
55 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
56 public abstract Property relocate(Location newLocation);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
57
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
58 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
59 * Gets the value of this property of the object.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
60 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
61 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
62 * @param shape the current shape of the object, which must contain this location
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
63 * @see DynamicObject#get(Object, Object)
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
64 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
65 public abstract Object get(DynamicObject store, Shape shape);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
66
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
67 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
68 * Gets the value of this property of the object.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
69 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
70 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
71 * @param condition the result of a shape check or {@code false}
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
72 * @see DynamicObject#get(Object, Object)
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
73 * @see #get(DynamicObject, Shape)
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
74 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
75 public abstract Object get(DynamicObject store, boolean condition);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
76
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
77 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
78 * Assigns value to this property of the object.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
79 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
80 * Throws an exception if the value cannot be assigned to the property's current location.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
81 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
82 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
83 * @param value the value to assign
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
84 * @param shape the current shape of the object or {@code null}
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
85 * @throws IncompatibleLocationException if the value is incompatible with the property location
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
86 * @throws FinalLocationException if the location is final and values differ
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
87 * @see DynamicObject#set(Object, Object)
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
88 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
89 public abstract void set(DynamicObject store, Object value, Shape shape) throws IncompatibleLocationException, FinalLocationException;
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
90
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
91 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
92 * Assigns value to this property of the object.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
93 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
94 * Automatically relocates the property if the value cannot be assigned to its current location.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
95 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
96 * @param shape the current shape of the object or {@code null}
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
97 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
98 public abstract void setGeneric(DynamicObject store, Object value, Shape shape);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
99
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
100 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
101 * Like {@link #set(DynamicObject, Object, Shape)}, but throws an {@link IllegalStateException}
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
102 * instead.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
103 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
104 public abstract void setSafe(DynamicObject store, Object value, Shape shape);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
105
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
106 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
107 * Like {@link #setSafe}, but ignores the finalness of the property. For internal use only.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
108 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
109 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
110 * @param value the value to assign
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
111 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
112 public abstract void setInternal(DynamicObject store, Object value);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
113
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
114 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
115 * Assigns value to this property of the object, changing the object's shape.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
116 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
117 * Combines {@link DynamicObject#setShapeAndGrow(Shape, Shape)} and
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
118 * {@link #set(DynamicObject, Object, Shape)} to an atomic operation.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
119 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
120 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
121 * @param value the value to assign
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
122 * @param oldShape the shape before the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
123 * @param newShape the shape after the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
124 * @throws IncompatibleLocationException if the value is incompatible with the property location
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
125 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
126 public abstract void set(DynamicObject store, Object value, Shape oldShape, Shape newShape) throws IncompatibleLocationException;
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
127
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
128 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
129 * Assigns value to this property of the object, changing the object's shape.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
130 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
131 * Combines {@link DynamicObject#setShapeAndGrow(Shape, Shape)} and
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
132 * {@link #setGeneric(DynamicObject, Object, Shape)} to an atomic operation.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
133 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
134 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
135 * @param value the value to assign
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
136 * @param oldShape the shape before the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
137 * @param newShape the shape after the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
138 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
139 public abstract void setGeneric(DynamicObject store, Object value, Shape oldShape, Shape newShape);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
140
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
141 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
142 * Assigns value to this property of the object, changing the object's shape.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
143 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
144 * Combines {@link DynamicObject#setShapeAndGrow(Shape, Shape)} and
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
145 * {@link #setSafe(DynamicObject, Object, Shape)} to an atomic operation.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
146 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
147 * @param store the store that this property resides in
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
148 * @param value the value to assign
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
149 * @param oldShape the shape before the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
150 * @param newShape the shape after the transition
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
151 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
152 public abstract void setSafe(DynamicObject store, Object value, Shape oldShape, Shape newShape);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
153
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
154 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
155 * Returns {@code true} if this property and some other property have the same key and flags.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
156 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
157 public abstract boolean isSame(Property other);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
158
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
159 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
160 * Get the property location.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
161 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
162 public abstract Location getLocation();
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
163
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
164 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
165 * Is this property hidden from iteration.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
166 *
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
167 * @see HiddenKey
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
168 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
169 public abstract boolean isHidden();
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
170
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
171 public abstract boolean isShadow();
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
172
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
173 /**
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
174 * Create a copy of the property with the given flags.
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
175 */
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
176 public abstract Property copyWithFlags(int newFlags);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
177
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
178 public abstract Property copyWithRelocatable(boolean newRelocatable);
f439fdb137a3 Truffle: initial commit of object API
Andreas Woess <andreas.woess@jku.at>
parents:
diff changeset
179 }