aboutsummaryrefslogtreecommitdiff
path: root/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jdk/nashorn/internal/runtime/arrays/ArrayData.java')
-rw-r--r--src/jdk/nashorn/internal/runtime/arrays/ArrayData.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java b/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
index ca4adb62..5c0c0476 100644
--- a/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
+++ b/src/jdk/nashorn/internal/runtime/arrays/ArrayData.java
@@ -461,7 +461,23 @@ public abstract class ArrayData {
*/
public abstract ArrayData slice(long from, long to);
- private static Class<?> widestType(final Object... items) {
+ /**
+ * Fast splice operation. This just modifies the array according to the number of
+ * elements added and deleted but does not insert the added elements. Throws
+ * {@code UnsupportedOperationException} if fast splice operation is not supported
+ * for this class or arguments.
+ *
+ * @param start start index of splice operation
+ * @param removed number of removed elements
+ * @param added number of added elements
+ * @throws UnsupportedOperationException if fast splice is not supported for the class or arguments.
+ */
+ public ArrayData fastSplice(final int start, final int removed, final int added) throws UnsupportedOperationException {
+ throw new UnsupportedOperationException();
+ }
+
+
+ static Class<?> widestType(final Object... items) {
assert items.length > 0;
Class<?> widest = Integer.class;