@@ -68,59 +68,59 @@ public boolean allElementsShared(int size) {
68
68
69
69
@ ExportMessage
70
70
protected static boolean accepts (SharedArrayStorage store ,
71
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
72
- return stores . accepts ( store . storage ) ;
71
+ @ CachedLibrary ("store.storage " ) ArrayStoreLibrary stores ) {
72
+ return true ;
73
73
}
74
74
75
75
@ ExportMessage
76
76
protected Object read (int index ,
77
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
77
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
78
78
return stores .read (storage , index );
79
79
}
80
80
81
81
@ ExportMessage
82
82
protected void write (int index , Object value ,
83
83
@ Shared @ Cached WriteBarrierNode writeBarrierNode ,
84
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
84
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
85
85
writeBarrierNode .executeWriteBarrier (value );
86
86
stores .write (storage , index , value );
87
87
}
88
88
89
89
@ ExportMessage
90
90
protected void fill (int start , int length , Object value ,
91
91
@ Shared @ Cached WriteBarrierNode writeBarrierNode ,
92
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
92
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
93
93
writeBarrierNode .executeWriteBarrier (value );
94
94
stores .fill (storage , start , length , value );
95
95
}
96
96
97
97
@ ExportMessage
98
98
protected boolean acceptsValue (Object value ,
99
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
99
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
100
100
return stores .acceptsValue (storage , value );
101
101
}
102
102
103
103
@ ExportMessage
104
104
protected boolean acceptsAllValues (Object otherStore ,
105
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
105
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
106
106
return stores .acceptsAllValues (storage , otherStore );
107
107
}
108
108
109
109
@ ExportMessage
110
110
protected boolean isMutable (
111
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
111
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
112
112
return stores .isMutable (storage );
113
113
}
114
114
115
115
@ ExportMessage
116
116
protected boolean isNative (
117
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
117
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
118
118
return stores .isNative (storage );
119
119
}
120
120
121
121
@ ExportMessage
122
122
protected boolean isPrimitive (
123
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
123
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
124
124
return stores .isPrimitive (storage );
125
125
}
126
126
@@ -136,7 +136,7 @@ public Object initialStore() {
136
136
137
137
@ ExportMessage
138
138
public Object backingStore (
139
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
139
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
140
140
return stores .backingStore (storage );
141
141
}
142
142
@@ -148,37 +148,37 @@ public Object makeShared(int size) {
148
148
@ ExportMessage
149
149
@ TruffleBoundary
150
150
protected String toString (
151
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
151
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
152
152
return String .format ("Shared storage of (%s)" , stores .toString (storage ));
153
153
}
154
154
155
155
@ ExportMessage
156
156
protected int capacity (
157
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
157
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
158
158
return stores .capacity (storage );
159
159
}
160
160
161
161
@ ExportMessage
162
162
protected Object expand (int capacity ,
163
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
163
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
164
164
return new SharedArrayStorage (stores .expand (storage , capacity ));
165
165
}
166
166
167
167
@ ExportMessage
168
168
protected Object extractRange (int start , int end ,
169
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
169
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
170
170
return new SharedArrayStorage (stores .extractRange (storage , start , end ));
171
171
}
172
172
173
173
@ ExportMessage
174
174
protected Object extractRangeAndUnshare (int start , int end ,
175
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
175
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
176
176
return stores .extractRange (storage , start , end );
177
177
}
178
178
179
179
@ ExportMessage
180
180
protected Object [] boxedCopyOfRange (int start , int length ,
181
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
181
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
182
182
return stores .boxedCopyOfRange (storage , start , length );
183
183
}
184
184
@@ -196,7 +196,7 @@ protected static void copyContents(
196
196
protected static void copyContents (
197
197
SharedArrayStorage srcStore , int srcStart , Object destStore , int destStart , int length ,
198
198
@ Cached @ Exclusive LoopConditionProfile loopProfile ,
199
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary srcStores ,
199
+ @ CachedLibrary ("srcStore.storage " ) ArrayStoreLibrary srcStores ,
200
200
@ CachedLibrary ("destStore" ) ArrayStoreLibrary destStores ) {
201
201
int i = 0 ;
202
202
try {
@@ -216,79 +216,79 @@ protected static boolean differentStores(SharedArrayStorage srcStore, Object des
216
216
217
217
@ ExportMessage
218
218
protected void clear (int start , int length ,
219
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
219
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
220
220
stores .clear (storage , start , length );
221
221
}
222
222
223
223
@ ExportMessage
224
224
protected Object toJavaArrayCopy (int length ,
225
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
225
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
226
226
return stores .toJavaArrayCopy (storage , length );
227
227
}
228
228
229
229
@ ExportMessage
230
230
protected void sort (int size ,
231
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
231
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
232
232
stores .sort (storage , size );
233
233
}
234
234
235
235
@ ExportMessage
236
236
protected Iterable <Object > getIterable (int from , int length ,
237
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
237
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
238
238
return stores .getIterable (storage , from , length );
239
239
}
240
240
241
241
@ ExportMessage
242
242
protected ArrayAllocator generalizeForValue (Object newValue ,
243
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
243
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
244
244
return stores .generalizeForValue (storage , newValue );
245
245
}
246
246
247
247
@ ExportMessage
248
248
protected ArrayAllocator generalizeForStore (Object newStore ,
249
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
250
- return stores .generalizeForStore (newStore , storage );
249
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
250
+ return stores .generalizeForStore (storage , newStore );
251
251
}
252
252
253
253
@ ExportMessage
254
254
public ArrayAllocator generalizeForSharing (
255
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
255
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
256
256
return stores .generalizeForSharing (storage );
257
257
}
258
258
259
259
@ ExportMessage
260
260
protected Object allocateForNewValue (Object newValue , int length ,
261
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
261
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
262
262
return new SharedArrayStorage (stores .allocateForNewValue (storage , newValue , length ));
263
263
}
264
264
265
265
@ ExportMessage
266
266
protected Object allocateForNewStore (Object newStore , int length ,
267
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
267
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
268
268
return new SharedArrayStorage (stores .allocateForNewStore (storage , newStore , length ));
269
269
}
270
270
271
271
@ ExportMessage
272
272
protected Object unsharedAllocateForNewStore (Object newStore , int length ,
273
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
273
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
274
274
return stores .allocateForNewStore (storage , newStore , length );
275
275
}
276
276
277
277
@ ExportMessage
278
278
protected boolean isDefaultValue (Object value ,
279
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
279
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
280
280
return stores .isDefaultValue (storage , value );
281
281
}
282
282
283
283
@ ExportMessage
284
284
protected ArrayAllocator allocator (
285
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
285
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
286
286
return new SharedArrayAllocator (stores .unsharedAllocator (storage ));
287
287
}
288
288
289
289
@ ExportMessage
290
290
protected ArrayAllocator unsharedAllocator (
291
- @ CachedLibrary (limit = "1 " ) ArrayStoreLibrary stores ) {
291
+ @ CachedLibrary ("this.storage " ) ArrayStoreLibrary stores ) {
292
292
return stores .unsharedAllocator (storage );
293
293
}
294
294
0 commit comments