Skip to content

Commit 4b44a45

Browse files
committed
Use System.arraycopy().
1 parent 78df2fe commit 4b44a45

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/GlobalRegistry.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,7 @@ public GlobalRegistry duplicate() {
192192
other.storeLong(address, value);
193193
other.storeObject(address, objectValue);
194194
}
195-
for (int i = 0; i < externalGlobals.length; i++) {
196-
other.externalGlobals[i] = this.externalGlobals[i];
197-
}
195+
System.arraycopy(this.externalGlobals, 0, other.externalGlobals, 0, externalGlobals.length);
198196
return other;
199197
}
200198

0 commit comments

Comments
 (0)