Skip to content

Commit 9309f12

Browse files
committed
Avoid dispatched libraries in ArrayStoreLibrary exports
1 parent 9ecc996 commit 9309f12

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/truffleruby/core/array/library/DelegatedArrayStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ protected Object[] boxedCopyOfRange(int start, int length,
113113
return stores.boxedCopyOfRange(storage, offset + start, length);
114114
}
115115

116-
@ExportMessage
116+
@ExportMessage(limit = "storageStrategyLimit()")
117117
protected void copyContents(int srcStart, Object destStore, int destStart, int length,
118118
@CachedLibrary("this") ArrayStoreLibrary node,
119119
@Cached LoopConditionProfile loopProfile,
120120
@CachedLibrary("this.storage") ArrayStoreLibrary srcStores,
121-
@CachedLibrary(limit = "storageStrategyLimit()") ArrayStoreLibrary destStores) {
121+
@CachedLibrary("destStore") ArrayStoreLibrary destStores) {
122122
int i = 0;
123123
try {
124124
for (; loopProfile.inject(i < length); i++) {

src/main/java/org/truffleruby/core/array/library/NativeArrayStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ protected static void shareElements(NativeArrayStorage store, int start, int end
171171
}
172172
}
173173

174-
@ExportMessage
174+
@ExportMessage(limit = "storageStrategyLimit()")
175175
protected void copyContents(int srcStart, Object destStore, int destStart, int length,
176176
@CachedLibrary("this") ArrayStoreLibrary srcStores,
177177
@Cached @Exclusive LoopConditionProfile loopProfile,
178-
@CachedLibrary(limit = "storageStrategyLimit()") ArrayStoreLibrary destStores) {
178+
@CachedLibrary("destStore") ArrayStoreLibrary destStores) {
179179
int i = 0;
180180
try {
181181
for (; loopProfile.inject(i < length); i++) {

0 commit comments

Comments
 (0)