From f435d43996567bd585df67989f0ba1a4c75de45a Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 28 Jan 2021 17:02:00 +0300 Subject: [PATCH] Revert "JS: fix for creation of typed arrays from view method (#532)" This reverts commit dfef5ffd --- .../src/main/java/org/teavm/jso/typedarrays/DataView.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Float32Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Float64Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Int16Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Int32Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Int8Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Uint16Array.java | 4 ++-- .../src/main/java/org/teavm/jso/typedarrays/Uint8Array.java | 4 ++-- .../java/org/teavm/jso/typedarrays/Uint8ClampedArray.java | 4 ++-- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java index 92aa3ec75..dd851a37f 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/DataView.java @@ -77,8 +77,8 @@ public abstract class DataView extends ArrayBufferView { @JSBody(params = "buffer", script = "return new DataView(buffer);") public static native DataView create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new DataView(bufferView.buffer);") - public static native DataView create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new DataView(buffer);") + public static native DataView create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new DataView(buffer, offset, length);") public static native DataView create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java index ad650d14e..64647df3a 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float32Array.java @@ -31,8 +31,8 @@ public abstract class Float32Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Float32Array(buffer);") public static native Float32Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Float32Array(bufferView.buffer);") - public static native Float32Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Float32Array(buffer);") + public static native Float32Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Float32Array(buffer, offset, length);") public static native Float32Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java index 0b86a3bc1..d1379f931 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Float64Array.java @@ -31,8 +31,8 @@ public abstract class Float64Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Float64Array(buffer);") public static native Float64Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Float64Array(bufferView.buffer);") - public static native Float64Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Float64Array(buffer);") + public static native Float64Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Float64Array(buffer, offset, length);") public static native Float64Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java index f9bfc84d2..caaa5d0bf 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int16Array.java @@ -31,8 +31,8 @@ public abstract class Int16Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int16Array(buffer);") public static native Int16Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Int16Array(bufferView.buffer);") - public static native Int16Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Int16Array(buffer);") + public static native Int16Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int16Array(buffer, offset, length);") public static native Int16Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java index f59facc1c..0f92358c9 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int32Array.java @@ -36,8 +36,8 @@ public abstract class Int32Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int32Array(buffer);") public static native Int32Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Int32Array(bufferView.buffer);") - public static native Int32Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Int32Array(buffer);") + public static native Int32Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int32Array(buffer, offset, length);") public static native Int32Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java index 8c30e2fd0..ed42d640c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Int8Array.java @@ -31,8 +31,8 @@ public abstract class Int8Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Int8Array(buffer);") public static native Int8Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Int8Array(bufferView.buffer);") - public static native Int8Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Int8Array(buffer);") + public static native Int8Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Int8Array(buffer, offset, length);") public static native Int8Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java index 4c5fb34aa..177975a0f 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint16Array.java @@ -31,8 +31,8 @@ public abstract class Uint16Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint16Array(buffer);") public static native Uint16Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Uint16Array(bufferView.buffer);") - public static native Uint16Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Uint16Array(buffer);") + public static native Uint16Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint16Array(buffer, offset, length);") public static native Uint16Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java index 62c49aa8a..dbb1fc959 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8Array.java @@ -31,8 +31,8 @@ public abstract class Uint8Array extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint8Array(buffer);") public static native Uint8Array create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Uint8Array(bufferView.buffer);") - public static native Uint8Array create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Uint8Array(buffer);") + public static native Uint8Array create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new Uint8Array(buffer, offset, length);") public static native Uint8Array create(ArrayBuffer buffer, int offset, int length); diff --git a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java index d814ff599..6fbdb6545 100644 --- a/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java +++ b/jso/apis/src/main/java/org/teavm/jso/typedarrays/Uint8ClampedArray.java @@ -31,8 +31,8 @@ public abstract class Uint8ClampedArray extends ArrayBufferView { @JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);") public static native Uint8ClampedArray create(ArrayBuffer buffer); - @JSBody(params = "bufferView", script = "return new Uint8ClampedArray(bufferView.buffer);") - public static native Uint8ClampedArray create(ArrayBufferView bufferView); + @JSBody(params = "buffer", script = "return new Uint8ClampedArray(buffer);") + public static native Uint8ClampedArray create(ArrayBufferView buffer); @JSBody(params = { "buffer", "offset", "length" }, script = "return new " + "Uint8ClampedArray(buffer, offset, length);")