diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift index d882aad1c..82150d065 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift @@ -782,9 +782,10 @@ public struct BridgeJSLink { printer.indent { printer.write("const Ctor = taCtors[kind];") printer.write("const byteLen = count * Ctor.BYTES_PER_ELEMENT;") + printer.write("const start = ptr >>> 0;") // slice() copies the bytes into a new ArrayBuffer that is properly aligned printer.write( - "const copy = \(JSGlueVariableScope.reservedMemory).buffer.slice(ptr, ptr + byteLen);" + "const copy = \(JSGlueVariableScope.reservedMemory).buffer.slice(start, start + byteLen);" ) printer.write("\(JSGlueVariableScope.reservedTaStack).push(Array.from(new Ctor(copy)));") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Alias.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Alias.js index adc2e0fc9..dafac12d3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Alias.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Alias.js @@ -505,7 +505,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AliasInClosure.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AliasInClosure.js index d4174627e..4793a3d48 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AliasInClosure.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AliasInClosure.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.js index 6365fd99e..1e46aa559 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.js @@ -568,7 +568,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Point"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.js index 980dd9fdc..ab64ccfa0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.js @@ -480,7 +480,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_AsyncPoint"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncAssociatedValueEnum.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncAssociatedValueEnum.js index 69f17eae3..3e1483580 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncAssociatedValueEnum.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncAssociatedValueEnum.js @@ -245,7 +245,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncImport.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncImport.js index db15b92a8..7e6c1e2c4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncImport.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncImport.js @@ -227,7 +227,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncStaticImport.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncStaticImport.js index f6da4e275..0b854158d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncStaticImport.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/AsyncStaticImport.js @@ -227,7 +227,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ClassWithNestedTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ClassWithNestedTypes.js index 1d7ebeabf..08cab592c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ClassWithNestedTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ClassWithNestedTypes.js @@ -122,7 +122,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Account_Credentials"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.js index cbca91ea2..f8a62adb1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.js @@ -492,7 +492,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Config"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DictionaryTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DictionaryTypes.js index ab6cf6ebe..6e763b743 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DictionaryTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DictionaryTypes.js @@ -472,7 +472,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Counters"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DocComments.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DocComments.js index 902f06ff9..aa3ac20c9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DocComments.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DocComments.js @@ -122,7 +122,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Point"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAlias.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAlias.js index 3ff888129..00725576a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAlias.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAlias.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.js index 36d219f64..3369c92f9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.js @@ -1067,7 +1067,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Point"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValueImport.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValueImport.js index 0d770ed41..df18151cc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValueImport.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValueImport.js @@ -150,7 +150,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.js index 999d1847f..5e55689ff 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.js @@ -129,7 +129,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCaseImport.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCaseImport.js index 3a78dd143..20e16735c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCaseImport.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCaseImport.js @@ -111,7 +111,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.js index b838f4c96..a8a01bda5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.js @@ -149,7 +149,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.js index 929f55c86..e63ffc2ff 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.js index e33778458..299a1d730 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.js @@ -532,7 +532,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionNestedTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionNestedTypes.js index 1b54d416e..b573e3559 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionNestedTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionNestedTypes.js @@ -176,7 +176,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Library_Shelf"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionOrderIndependence.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionOrderIndependence.js index cda13ba4c..094d37c11 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionOrderIndependence.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionOrderIndependence.js @@ -125,7 +125,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Depot_Crate"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionScopeParity.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionScopeParity.js index d0d1ea8bd..ca1cf7361 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionScopeParity.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ExtensionScopeParity.js @@ -121,7 +121,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Meta"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/FixedWidthIntegers.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/FixedWidthIntegers.js index 50d25d09b..636aacd1e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/FixedWidthIntegers.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/FixedWidthIntegers.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GenericImports.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GenericImports.js index d6250c200..a39fe8bd7 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GenericImports.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GenericImports.js @@ -579,7 +579,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_GenericPoint"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.js index 1d299cab4..6917cc24e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.js index 8c3f0b5b4..435110d18 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.ConfigPointer.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.ConfigPointer.js index cc70a978a..308778af0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.ConfigPointer.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.ConfigPointer.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.PerClass.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.PerClass.js index b9b854e52..e1717e32e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.PerClass.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.PerClass.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.js index b9b854e52..e1717e32e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/IdentityModeClass.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportArray.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportArray.js index 2a64c6775..56a1489f5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportArray.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportArray.js @@ -440,7 +440,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.js index 3c4743ee6..ea45f4fb1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.js @@ -476,7 +476,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_FooContainer"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.js index edcedc1b7..8de2a8dc0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClass.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClass.js index cbec50c8f..732b4aaec 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClass.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClass.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClassStaticFunctions.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClassStaticFunctions.js index 9cbaf2a3e..abd4e32d5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClassStaticFunctions.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSClassStaticFunctions.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModule.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModule.js index 50ed98d9a..f72355ae0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModule.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModule.js @@ -111,7 +111,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModuleFallback.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModuleFallback.js index ca94e5a13..bf2c55047 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModuleFallback.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportBareModuleFallback.js @@ -108,7 +108,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportModule.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportModule.js index af4273cc3..130c0367c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportModule.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSImportModule.js @@ -108,7 +108,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameOverride.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameOverride.js index 0190b9c65..5025b2803 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameOverride.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameOverride.js @@ -127,7 +127,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_RenamedVector"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameTypes.js index 107f497fc..bbd490bd5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSNameTypes.js @@ -110,7 +110,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSTypedArrayTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSTypedArrayTypes.js index 9d03440f5..8ce616dd0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSTypedArrayTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSTypedArrayTypes.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.js index afccabed4..37c4134d6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/JSValue.js @@ -439,7 +439,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.js index 964b97e3a..dfe74e98b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.js index d8eee50de..4219f5249 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.js index 359f5ddd9..405be1d28 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NamespacedClassSignature.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NamespacedClassSignature.js index 1d6b6c343..db7ead8eb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NamespacedClassSignature.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NamespacedClassSignature.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.js index e76f92d8f..a40655ea6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.js @@ -447,7 +447,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.js index 31e413e1f..815e564be 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.js @@ -447,7 +447,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedType.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedType.js index 82710d04b..a1c133290 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedType.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedType.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_User_Stats"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedTypeNameCollision.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedTypeNameCollision.js index 541ad55df..b9697fc97 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedTypeNameCollision.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/NestedTypeNameCollision.js @@ -126,7 +126,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Catalog_Entry"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.js index 7aaa5296c..ac372c3d1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.js @@ -463,7 +463,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.js index 3b8c9adbc..2d89454c2 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.js index 1177dc82b..d3b49e4f3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.js index 44eab0d15..d136df4fc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.js index 945759fb1..5ab588886 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.js @@ -532,7 +532,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ProtocolInClosure.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ProtocolInClosure.js index a9730573c..c35d725e6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ProtocolInClosure.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ProtocolInClosure.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/RelativeQualifiedTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/RelativeQualifiedTypes.js index 06af75757..87daa2d84 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/RelativeQualifiedTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/RelativeQualifiedTypes.js @@ -148,7 +148,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Library_Shelf"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReservedWordParameters.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReservedWordParameters.js index c5e67f8ae..deb145efa 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReservedWordParameters.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReservedWordParameters.js @@ -131,7 +131,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.js index 4cc10e4b9..a5f1258e4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.js @@ -149,7 +149,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.js index b9c8414b0..e52f9d5dd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.js @@ -149,7 +149,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.js index 7eff82661..94888662f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.js @@ -110,7 +110,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.js index f8aa35927..84fb321ae 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.js @@ -110,7 +110,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.js index 6dc173b63..78f6a8dbc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.js index eb4e4c37b..0a8460da0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StructWithNestedTypes.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StructWithNestedTypes.js index f9b50f9f8..c5e8ebe24 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StructWithNestedTypes.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StructWithNestedTypes.js @@ -164,7 +164,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Shape"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.js index e171064a6..fc6903739 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.js index 082a42323..ece62f6ac 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.js @@ -574,7 +574,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Animal"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.js index 3045dd8cb..eb2347864 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.js @@ -227,7 +227,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.js index 39ba60207..7ba2ada2f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.js @@ -617,7 +617,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_DataPoint"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.js index 0f0838b41..c1bb5d023 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.js @@ -458,7 +458,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_Point"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftTypedClosureAccess.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftTypedClosureAccess.js index 80e2a1984..1abc20336 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftTypedClosureAccess.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftTypedClosureAccess.js @@ -130,7 +130,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.js index 5a575ffed..3b36bb511 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.js @@ -105,7 +105,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {}; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.js index ef00d53a6..f3d2a217a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.js @@ -122,7 +122,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["swift_js_struct_lower_PointerFields"] = function(objectId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.js index 5abfccc3f..c8693eeb3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.js @@ -106,7 +106,8 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_typed_array"] = function(kind, ptr, count) { const Ctor = taCtors[kind]; const byteLen = count * Ctor.BYTES_PER_ELEMENT; - const copy = memory.buffer.slice(ptr, ptr + byteLen); + const start = ptr >>> 0; + const copy = memory.buffer.slice(start, start + byteLen); taStack.push(Array.from(new Ctor(copy))); } bjs["bjs_core_register_type_handles"] = function() {};