From d9c0301e5840e2ddf8bf4c116710f56781cfeceb Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 2 Feb 2026 19:14:24 +0900 Subject: [PATCH 1/4] BridgeJS: Rename stack manipulation imports - `swift_js_pop_param_int32` -> `swift_js_pop_i32` - `swift_js_pop_param_f32` -> `swift_js_pop_f32` - `swift_js_pop_param_f64` -> `swift_js_pop_f64` --- Benchmarks/Sources/Generated/BridgeJS.swift | 132 ++++---- .../Sources/BridgeJSCore/ExportSwift.swift | 66 ++-- .../Sources/BridgeJSLink/BridgeJSLink.swift | 10 +- .../ArrayParameter.Import.js | 10 +- .../BridgeJSLinkTests/ArrayTypes.Export.js | 10 +- .../BridgeJSLinkTests/Async.Export.js | 10 +- .../BridgeJSLinkTests/Async.Import.js | 10 +- .../DefaultParameters.Export.js | 10 +- .../EnumAssociatedValue.Export.js | 10 +- .../BridgeJSLinkTests/EnumCase.Export.js | 10 +- .../BridgeJSLinkTests/EnumNamespace.Export.js | 10 +- .../EnumNamespace.Global.Export.js | 10 +- .../BridgeJSLinkTests/EnumRawType.Export.js | 10 +- .../GlobalGetter.ImportMacros.js | 10 +- .../GlobalThisImports.ImportMacros.js | 10 +- .../ImportedTypeInExportedInterface.Export.js | 10 +- .../BridgeJSLinkTests/Interface.Import.js | 10 +- .../InvalidPropertyNames.Import.js | 10 +- .../BridgeJSLinkTests/MixedGlobal.Export.js | 10 +- .../BridgeJSLinkTests/MixedModules.Export.js | 10 +- .../BridgeJSLinkTests/MixedPrivate.Export.js | 10 +- .../MultipleImportedTypes.Import.js | 10 +- .../BridgeJSLinkTests/Namespaces.Export.js | 10 +- .../Namespaces.Global.Export.js | 10 +- .../BridgeJSLinkTests/Optionals.Export.js | 10 +- .../PrimitiveParameters.Export.js | 10 +- .../PrimitiveParameters.Import.js | 10 +- .../PrimitiveReturn.Export.js | 10 +- .../PrimitiveReturn.Import.js | 10 +- .../BridgeJSLinkTests/PropertyTypes.Export.js | 10 +- .../BridgeJSLinkTests/Protocol.Export.js | 10 +- .../BridgeJSLinkTests/ReExportFrom.Import.js | 10 +- .../StaticFunctions.Export.js | 10 +- .../StaticFunctions.Global.Export.js | 10 +- .../StaticProperties.Export.js | 10 +- .../StaticProperties.Global.Export.js | 10 +- .../BridgeJSLinkTests/StringEnum.Import.js | 10 +- .../StringParameter.Export.js | 10 +- .../StringParameter.Import.js | 10 +- .../BridgeJSLinkTests/StringReturn.Export.js | 10 +- .../BridgeJSLinkTests/StringReturn.Import.js | 10 +- .../BridgeJSLinkTests/SwiftClass.Export.js | 10 +- .../BridgeJSLinkTests/SwiftClosure.Export.js | 10 +- .../SwiftClosureImports.ImportMacros.js | 10 +- .../BridgeJSLinkTests/SwiftStruct.Export.js | 10 +- .../SwiftStructImports.ImportMacros.js | 10 +- .../TS2SkeletonLike.Import.js | 10 +- .../BridgeJSLinkTests/Throws.Export.js | 10 +- .../BridgeJSLinkTests/TypeAlias.Import.js | 10 +- .../TypeScriptClass.Import.js | 10 +- .../BridgeJSLinkTests/UnsafePointer.Export.js | 10 +- .../VoidParameterVoidReturn.Export.js | 10 +- .../VoidParameterVoidReturn.Import.js | 10 +- .../ExportSwiftTests/ArrayTypes.swift | 98 +++--- .../ExportSwiftTests/DefaultParameters.swift | 32 +- .../EnumAssociatedValue.swift | 36 +-- .../ExportSwiftTests/Protocol.swift | 16 +- .../StaticFunctions.Global.swift | 4 +- .../ExportSwiftTests/StaticFunctions.swift | 4 +- .../ExportSwiftTests/SwiftClosure.swift | 10 +- .../ExportSwiftTests/SwiftStruct.swift | 32 +- .../ExportSwiftTests/UnsafePointer.swift | 10 +- Plugins/PackageToJS/Templates/instantiate.js | 6 +- .../JavaScriptKit/BridgeJSIntrinsics.swift | 30 +- .../Generated/BridgeJS.swift | 282 +++++++++--------- 65 files changed, 634 insertions(+), 634 deletions(-) diff --git a/Benchmarks/Sources/Generated/BridgeJS.swift b/Benchmarks/Sources/Generated/BridgeJS.swift index 569eb2eac..fd45582e1 100644 --- a/Benchmarks/Sources/Generated/BridgeJS.swift +++ b/Benchmarks/Sources/Generated/BridgeJS.swift @@ -11,15 +11,15 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) case 3: - return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_param_f32())) + return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_f32())) case 4: - return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: return .info default: @@ -94,17 +94,17 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> ComplexResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .error(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .error(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .location(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .location(Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 3: - return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 4: - return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: - return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 6: return .info default: @@ -249,11 +249,11 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { extension SimpleStruct: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> SimpleStruct { - let precise = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let rate = Float.bridgeJSLiftParameter(_swift_js_pop_param_f32()) - let flag = Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let count = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let precise = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let rate = Float.bridgeJSLiftParameter(_swift_js_pop_f32()) + let flag = Bool.bridgeJSLiftParameter(_swift_js_pop_i32()) + let count = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return SimpleStruct(name: name, count: count, flag: flag, rate: rate, precise: precise) } @@ -303,9 +303,9 @@ fileprivate func _bjs_struct_lift_SimpleStruct() -> Int32 { extension Address: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Address { - let zipCode = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let city = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let street = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let zipCode = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let city = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let street = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Address(street: street, city: city, zipCode: zipCode) } @@ -356,10 +356,10 @@ fileprivate func _bjs_struct_lift_Address() -> Int32 { extension Person: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Person { - let email = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let email = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32()) let address = Address.bridgeJSLiftParameter() - let age = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let age = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Person(name: name, age: age, address: address, email: email) } @@ -415,12 +415,12 @@ fileprivate func _bjs_struct_lift_Person() -> Int32 { extension ComplexStruct: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> ComplexStruct { - let metadata = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let tags = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let score = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let active = Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let title = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let metadata = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let tags = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let score = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let active = Bool.bridgeJSLiftParameter(_swift_js_pop_i32()) + let title = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return ComplexStruct(id: id, title: title, active: active, score: score, tags: tags, metadata: metadata) } @@ -477,8 +477,8 @@ fileprivate func _bjs_struct_lift_ComplexStruct() -> Int32 { extension Point: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Point { - let y = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let x = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let y = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let x = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return Point(x: x, y: y) } @@ -1488,11 +1488,11 @@ public func _bjs_ArrayRoundtrip_init() -> UnsafeMutableRawPointer { public func _bjs_ArrayRoundtrip_takeIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -1520,11 +1520,11 @@ public func _bjs_ArrayRoundtrip_makeIntArray(_ _self: UnsafeMutableRawPointer) - public func _bjs_ArrayRoundtrip_roundtripIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -1555,11 +1555,11 @@ public func _bjs_ArrayRoundtrip_makeIntArrayLarge(_ _self: UnsafeMutableRawPoint public func _bjs_ArrayRoundtrip_takeDoubleArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeDoubleArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -1587,11 +1587,11 @@ public func _bjs_ArrayRoundtrip_makeDoubleArray(_ _self: UnsafeMutableRawPointer public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripDoubleArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -1609,11 +1609,11 @@ public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_takeStringArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -1644,11 +1644,11 @@ public func _bjs_ArrayRoundtrip_makeStringArray(_ _self: UnsafeMutableRawPointer public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -1669,7 +1669,7 @@ public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_takePointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takePointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1701,7 +1701,7 @@ public func _bjs_ArrayRoundtrip_makePointArray(_ _self: UnsafeMutableRawPointer) public func _bjs_ArrayRoundtrip_roundtripPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1736,16 +1736,16 @@ public func _bjs_ArrayRoundtrip_makePointArrayLarge(_ _self: UnsafeMutableRawPoi public func _bjs_ArrayRoundtrip_takeNestedIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeNestedIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -1779,16 +1779,16 @@ public func _bjs_ArrayRoundtrip_makeNestedIntArray(_ _self: UnsafeMutableRawPoin public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripNestedIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -1812,12 +1812,12 @@ public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRa public func _bjs_ArrayRoundtrip_takeNestedPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeNestedPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1855,12 +1855,12 @@ public func _bjs_ArrayRoundtrip_makeNestedPointArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripNestedPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1888,11 +1888,11 @@ public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutable public func _bjs_ArrayRoundtrip_takeOptionalIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeOptionalIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -1923,11 +1923,11 @@ public func _bjs_ArrayRoundtrip_makeOptionalIntArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripOptionalIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -1948,11 +1948,11 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutable public func _bjs_ArrayRoundtrip_takeOptionalPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeOptionalPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -1983,11 +1983,11 @@ public func _bjs_ArrayRoundtrip_makeOptionalPointArray(_ _self: UnsafeMutableRaw public func _bjs_ArrayRoundtrip_roundtripOptionalPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripOptionalPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -2012,11 +2012,11 @@ public func _bjs_ArrayRoundtrip_takeOptionalArray(_ _self: UnsafeMutableRawPoint return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -2069,11 +2069,11 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalArray(_ _self: UnsafeMutableRaw return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result diff --git a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift index dd28397df..d91024d10 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift @@ -799,41 +799,41 @@ struct StackCodegen { func liftExpression(for type: BridgeType) -> ExprSyntax { switch type { case .string: - return "String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + return "String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .int, .uint: - return "Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "Int.bridgeJSLiftParameter(_swift_js_pop_i32())" case .bool: - return "Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "Bool.bridgeJSLiftParameter(_swift_js_pop_i32())" case .float: - return "Float.bridgeJSLiftParameter(_swift_js_pop_param_f32())" + return "Float.bridgeJSLiftParameter(_swift_js_pop_f32())" case .double: - return "Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())" + return "Double.bridgeJSLiftParameter(_swift_js_pop_f64())" case .jsObject: - return "JSObject.bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "JSObject.bridgeJSLiftParameter(_swift_js_pop_i32())" case .swiftHeapObject(let className): - return "\(raw: className).bridgeJSLiftParameter(_swift_js_pop_param_pointer())" + return "\(raw: className).bridgeJSLiftParameter(_swift_js_pop_pointer())" case .unsafePointer: - return "\(raw: type.swiftType).bridgeJSLiftParameter(_swift_js_pop_param_pointer())" + return "\(raw: type.swiftType).bridgeJSLiftParameter(_swift_js_pop_pointer())" case .swiftProtocol(let protocolName): // Protocols use their Any wrapper type for lifting let wrapperName = "Any\(protocolName)" - return "\(raw: wrapperName).bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "\(raw: wrapperName).bridgeJSLiftParameter(_swift_js_pop_i32())" case .caseEnum(let enumName): - return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_i32())" case .rawValueEnum(let enumName, let rawType): switch rawType { case .string: return - "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .float: - return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_f32())" + return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_f32())" case .double: - return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_f64())" + return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_f64())" case .bool, .int, .int32, .int64, .uint, .uint32, .uint64: - return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_i32())" } case .associatedValueEnum(let enumName): - return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "\(raw: enumName).bridgeJSLiftParameter(_swift_js_pop_i32())" case .swiftStruct(let structName): return "\(raw: structName).bridgeJSLiftParameter()" case .optional(let wrappedType): @@ -845,7 +845,7 @@ struct StackCodegen { // Namespace enums are not passed as values return "()" case .closure: - return "JSObject.bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "JSObject.bridgeJSLiftParameter(_swift_js_pop_i32())" case .array(let elementType): return liftArrayExpression(elementType: elementType) } @@ -856,7 +856,7 @@ struct StackCodegen { let swiftTypeName = elementType.swiftType return """ { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [\(raw: swiftTypeName)] = [] __result.reserveCapacity(__count) for _ in 0..<__count { @@ -872,49 +872,49 @@ struct StackCodegen { switch wrappedType { case .string: return - "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())" case .int, .uint: - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .bool: - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .float: - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f32())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f32())" case .double: - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f64())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f64())" case .caseEnum(let enumName): return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .rawValueEnum(let enumName, let rawType): switch rawType { case .string: return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())" case .float: return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f32())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f32())" case .double: return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f64())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f64())" case .bool, .int, .int32, .int64, .uint, .uint32, .uint64: return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" } case .swiftStruct(let nestedName): - return "Optional<\(raw: nestedName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32())" + return "Optional<\(raw: nestedName)>.bridgeJSLiftParameter(_swift_js_pop_i32())" case .swiftHeapObject(let className): return - "Optional<\(raw: className)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_pointer())" + "Optional<\(raw: className)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_pointer())" case .associatedValueEnum(let enumName): return - "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + "Optional<\(raw: enumName)>.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .jsObject: - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" case .array(let elementType): let arrayLift = liftArrayExpression(elementType: elementType) let swiftTypeName = elementType.swiftType return """ { - let __isSome = _swift_js_pop_param_int32() + let __isSome = _swift_js_pop_i32() if __isSome == 0 { return Optional<[\(raw: swiftTypeName)]>.none } else { @@ -924,7 +924,7 @@ struct StackCodegen { """ default: // Fallback for other optional types - return "Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())" + return "Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())" } } diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift index 4e2c9f86d..dc20ee73a 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift @@ -416,17 +416,17 @@ public struct BridgeJSLink { printer.write("\(JSGlueVariableScope.reservedTmpRetStrings).push(value);") } printer.write("}") - printer.write("bjs[\"swift_js_pop_param_int32\"] = function() {") + printer.write("bjs[\"swift_js_pop_i32\"] = function() {") printer.indent { printer.write("return \(JSGlueVariableScope.reservedTmpParamInts).pop();") } printer.write("}") - printer.write("bjs[\"swift_js_pop_param_f32\"] = function() {") + printer.write("bjs[\"swift_js_pop_f32\"] = function() {") printer.indent { printer.write("return \(JSGlueVariableScope.reservedTmpParamF32s).pop();") } printer.write("}") - printer.write("bjs[\"swift_js_pop_param_f64\"] = function() {") + printer.write("bjs[\"swift_js_pop_f64\"] = function() {") printer.indent { printer.write("return \(JSGlueVariableScope.reservedTmpParamF64s).pop();") } @@ -436,7 +436,7 @@ public struct BridgeJSLink { printer.write("\(JSGlueVariableScope.reservedTmpRetPointers).push(pointer);") } printer.write("}") - printer.write("bjs[\"swift_js_pop_param_pointer\"] = function() {") + printer.write("bjs[\"swift_js_pop_pointer\"] = function() {") printer.indent { printer.write("return \(JSGlueVariableScope.reservedTmpParamPointers).pop();") } @@ -446,7 +446,7 @@ public struct BridgeJSLink { printer.write("\(JSGlueVariableScope.reservedTmpRetArrayLengths).push(len | 0);") } printer.write("}") - printer.write("bjs[\"swift_js_pop_param_array_length\"] = function() {") + printer.write("bjs[\"swift_js_pop_array_length\"] = function() {") printer.indent { printer.write("return \(JSGlueVariableScope.reservedTmpParamArrayLengths).pop();") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js index e0b1c0561..30b8318bb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js index 9416bb546..b99d6dabf 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js @@ -115,25 +115,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js index cffc92db4..77c342a4a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js index 9259ae32d..9bc5e68f6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js index dd0f2af21..10610bffe 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js @@ -141,25 +141,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js index c22bd2b18..93a671ce0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js @@ -563,25 +563,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js index 1adfe67bf..bce9a1e13 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js @@ -112,25 +112,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js index ceb2b2fd5..7fa29cbeb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js @@ -113,25 +113,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js index 94e886cb5..144189324 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js @@ -132,25 +132,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js index 896b925f3..7d26b5a93 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js @@ -163,25 +163,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js index d0d035a38..7c209def8 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js index 6a5969915..e5f0cd3ee 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js index ba9024495..c9534033f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js index 2dd3e0cee..681816a95 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js index 220b91e94..5a1deb65a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js index fd05b0884..c1b926130 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js index 69c674b51..ae95f4431 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js index 33013eae7..63dd5b663 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js index 08f8ab83e..f4833046b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js index bd48815c5..0d7b5da19 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js index 26ba1bba7..6e7b72de5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js index 64340972b..979053ca9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js index 8e14c6c75..e7dc4822a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js index a06cc4974..5bc929c84 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js index f187fa8f0..15ba11dd9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js index a19f3c0ac..3fb51061f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js index 5699a3e3d..db62b9a72 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js index 4fd02029d..6f0810c05 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js @@ -152,25 +152,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js index 1cdc061e1..10ab693ec 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js index 4d8b282fa..a77b18b37 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js @@ -139,25 +139,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js index 5e712ef85..317e80b89 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js @@ -139,25 +139,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js index 40c09140d..d7e384d43 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js @@ -93,25 +93,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js index f5e30215c..b9b4307cc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js @@ -93,25 +93,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js index e634e4147..9712e79e0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js index 3155c6611..c06d3fb4e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js index 7c3999c87..fb12e02f6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js index d0fd0eb1c..52b0ffc2e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js index dc5b94a17..b81ff5526 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js index 6fb8849f6..189cab792 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js index d32c5a27d..ada39cb45 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js @@ -190,25 +190,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js index 51d52e0e5..5f3d4bb0c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js index 5e528e7bc..fe124a7d6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js @@ -282,25 +282,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js index 8683a87f6..23937d680 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js @@ -103,25 +103,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js index 5ff21f227..feac2e1be 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js index 664794d4a..1b6ecbf8b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js index 0aa603d8a..2bbe333e2 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js index f442cd882..be93e6af4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js index 95602db76..a6d141ebf 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js @@ -108,25 +108,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js index 67eb8bc8f..1328d8af1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js @@ -88,25 +88,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js index 915f64367..dbb6cc0ba 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js @@ -89,25 +89,25 @@ export async function createInstantiator(options, swift) { const value = textDecoder.decode(bytes); tmpRetStrings.push(value); } - bjs["swift_js_pop_param_int32"] = function() { + bjs["swift_js_pop_i32"] = function() { return tmpParamInts.pop(); } - bjs["swift_js_pop_param_f32"] = function() { + bjs["swift_js_pop_f32"] = function() { return tmpParamF32s.pop(); } - bjs["swift_js_pop_param_f64"] = function() { + bjs["swift_js_pop_f64"] = function() { return tmpParamF64s.pop(); } bjs["swift_js_push_pointer"] = function(pointer) { tmpRetPointers.push(pointer); } - bjs["swift_js_pop_param_pointer"] = function() { + bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_param_array_length"] = function() { + bjs["swift_js_pop_array_length"] = function() { return tmpParamArrayLengths.pop(); } bjs["swift_js_struct_cleanup"] = function(cleanupId) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift index 8142d6905..b897ab42f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift @@ -46,8 +46,8 @@ extension Status: _BridgedSwiftEnumNoPayload { extension Point: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Point { - let y = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let x = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let y = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let x = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return Point(x: x, y: y) } @@ -94,11 +94,11 @@ fileprivate func _bjs_struct_lift_Point() -> Int32 { public func _bjs_processIntArray() -> Void { #if arch(wasm32) let ret = processIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -116,11 +116,11 @@ public func _bjs_processIntArray() -> Void { public func _bjs_processStringArray() -> Void { #if arch(wasm32) let ret = processStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -141,11 +141,11 @@ public func _bjs_processStringArray() -> Void { public func _bjs_processDoubleArray() -> Void { #if arch(wasm32) let ret = processDoubleArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -163,11 +163,11 @@ public func _bjs_processDoubleArray() -> Void { public func _bjs_processBoolArray() -> Void { #if arch(wasm32) let ret = processBoolArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -185,7 +185,7 @@ public func _bjs_processBoolArray() -> Void { public func _bjs_processPointArray() -> Void { #if arch(wasm32) let ret = processPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -207,11 +207,11 @@ public func _bjs_processPointArray() -> Void { public func _bjs_processDirectionArray() -> Void { #if arch(wasm32) let ret = processDirectionArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -229,11 +229,11 @@ public func _bjs_processDirectionArray() -> Void { public func _bjs_processStatusArray() -> Void { #if arch(wasm32) let ret = processStatusArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Status] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Status.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Status.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -251,11 +251,11 @@ public func _bjs_processStatusArray() -> Void { public func _bjs_sumIntArray() -> Int32 { #if arch(wasm32) let ret = sumIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -271,7 +271,7 @@ public func _bjs_sumIntArray() -> Int32 { public func _bjs_findFirstPoint(_ matchingBytes: Int32, _ matchingLength: Int32) -> Void { #if arch(wasm32) let ret = findFirstPoint(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -291,11 +291,11 @@ public func _bjs_findFirstPoint(_ matchingBytes: Int32, _ matchingLength: Int32) public func _bjs_processUnsafeRawPointerArray() -> Void { #if arch(wasm32) let ret = processUnsafeRawPointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [UnsafeRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -313,11 +313,11 @@ public func _bjs_processUnsafeRawPointerArray() -> Void { public func _bjs_processUnsafeMutableRawPointerArray() -> Void { #if arch(wasm32) let ret = processUnsafeMutableRawPointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [UnsafeMutableRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -335,11 +335,11 @@ public func _bjs_processUnsafeMutableRawPointerArray() -> Void { public func _bjs_processOpaquePointerArray() -> Void { #if arch(wasm32) let ret = processOpaquePointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [OpaquePointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -357,11 +357,11 @@ public func _bjs_processOpaquePointerArray() -> Void { public func _bjs_processOptionalIntArray() -> Void { #if arch(wasm32) let ret = processOptionalIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -382,11 +382,11 @@ public func _bjs_processOptionalIntArray() -> Void { public func _bjs_processOptionalStringArray() -> Void { #if arch(wasm32) let ret = processOptionalStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -414,11 +414,11 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -441,11 +441,11 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { public func _bjs_processOptionalPointArray() -> Void { #if arch(wasm32) let ret = processOptionalPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -466,11 +466,11 @@ public func _bjs_processOptionalPointArray() -> Void { public func _bjs_processOptionalDirectionArray() -> Void { #if arch(wasm32) let ret = processOptionalDirectionArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -491,11 +491,11 @@ public func _bjs_processOptionalDirectionArray() -> Void { public func _bjs_processOptionalStatusArray() -> Void { #if arch(wasm32) let ret = processOptionalStatusArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -516,16 +516,16 @@ public func _bjs_processOptionalStatusArray() -> Void { public func _bjs_processNestedIntArray() -> Void { #if arch(wasm32) let ret = processNestedIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -549,16 +549,16 @@ public func _bjs_processNestedIntArray() -> Void { public func _bjs_processNestedStringArray() -> Void { #if arch(wasm32) let ret = processNestedStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[String]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -585,12 +585,12 @@ public func _bjs_processNestedStringArray() -> Void { public func _bjs_processNestedPointArray() -> Void { #if arch(wasm32) let ret = processNestedPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -618,11 +618,11 @@ public func _bjs_processNestedPointArray() -> Void { public func _bjs_processItemArray() -> Void { #if arch(wasm32) let ret = processItemArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Item] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Item.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(Item.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -640,16 +640,16 @@ public func _bjs_processItemArray() -> Void { public func _bjs_processNestedItemArray() -> Void { #if arch(wasm32) let ret = processNestedItemArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Item]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Item] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Item.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(Item.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift index 7803860a3..f4d02f14f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift @@ -39,9 +39,9 @@ extension Status: _BridgedSwiftCaseEnum { extension Config: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Config { - let enabled = Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let value = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let enabled = Bool.bridgeJSLiftParameter(_swift_js_pop_i32()) + let value = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Config(name: name, value: value, enabled: enabled) } @@ -89,7 +89,7 @@ fileprivate func _bjs_struct_lift_Config() -> Int32 { extension MathOperations: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> MathOperations { - let baseValue = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let baseValue = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return MathOperations(baseValue: baseValue) } @@ -322,11 +322,11 @@ public func _bjs_testOptionalStructWithValueDefault(_ point: Int32) -> Void { public func _bjs_testIntArrayDefault() -> Void { #if arch(wasm32) let ret = testIntArrayDefault(values: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -344,11 +344,11 @@ public func _bjs_testIntArrayDefault() -> Void { public func _bjs_testStringArrayDefault() -> Void { #if arch(wasm32) let ret = testStringArrayDefault(names: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -369,11 +369,11 @@ public func _bjs_testStringArrayDefault() -> Void { public func _bjs_testDoubleArrayDefault() -> Void { #if arch(wasm32) let ret = testDoubleArrayDefault(values: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -391,11 +391,11 @@ public func _bjs_testDoubleArrayDefault() -> Void { public func _bjs_testBoolArrayDefault() -> Void { #if arch(wasm32) let ret = testBoolArrayDefault(flags: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -413,11 +413,11 @@ public func _bjs_testBoolArrayDefault() -> Void { public func _bjs_testEmptyArrayDefault() -> Void { #if arch(wasm32) let ret = testEmptyArrayDefault(items: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -435,11 +435,11 @@ public func _bjs_testEmptyArrayDefault() -> Void { public func _bjs_testMixedWithArrayDefault(_ nameBytes: Int32, _ nameLength: Int32, _ enabled: Int32) -> Void { #if arch(wasm32) let ret = testMixedWithArrayDefault(name: String.bridgeJSLiftParameter(nameBytes, nameLength), values: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift index 13239108f..fa9e791ee 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift @@ -2,15 +2,15 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) case 3: - return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_param_f32())) + return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_f32())) case 4: - return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: return .info default: @@ -85,15 +85,15 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> ComplexResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .error(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .error(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 3: - return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 4: - return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 5: return .info default: @@ -224,11 +224,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> Utilities.Result { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) default: fatalError("Unknown Utilities.Result case ID: \(caseId)") } @@ -303,9 +303,9 @@ extension NetworkingResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> NetworkingResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) default: fatalError("Unknown NetworkingResult case ID: \(caseId)") } @@ -364,11 +364,11 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIOptionalResult { switch caseId { case 0: - return .success(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .failure(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 2: - return .status(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) default: fatalError("Unknown APIOptionalResult case ID: \(caseId)") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift index 7592f2960..cccbbf524 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift @@ -366,9 +366,9 @@ extension Result: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> Result { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) default: fatalError("Unknown Result case ID: \(caseId)") } @@ -423,11 +423,11 @@ extension Priority: _BridgedSwiftEnumNoPayload { public func _bjs_processDelegates() -> Void { #if arch(wasm32) let ret = processDelegates(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -654,11 +654,11 @@ fileprivate func _bjs_MyViewController_wrap(_ pointer: UnsafeMutableRawPointer) public func _bjs_DelegateManager_init() -> UnsafeMutableRawPointer { #if arch(wasm32) let ret = DelegateManager(delegates: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -697,11 +697,11 @@ public func _bjs_DelegateManager_delegates_get(_ _self: UnsafeMutableRawPointer) public func _bjs_DelegateManager_delegates_set(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) DelegateManager.bridgeJSLiftParameter(_self).delegates = { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(AnyMyViewControllerDelegate.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift index 8a5b56065..6d1f56f50 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift @@ -48,9 +48,9 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) default: fatalError("Unknown APIResult case ID: \(caseId)") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift index 8a5b56065..6d1f56f50 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift @@ -48,9 +48,9 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) default: fatalError("Unknown APIResult case ID: \(caseId)") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift index 7d0ae15da..feddadf15 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift @@ -677,15 +677,15 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) case 3: - return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_param_f32())) + return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_f32())) case 4: - return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: return .info default: diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift index ca164c1bf..35fbe039c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift @@ -3,11 +3,11 @@ extension Precision: _BridgedSwiftEnumNoPayload { extension DataPoint: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> DataPoint { - let optFlag = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let optCount = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let label = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let y = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let x = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let optFlag = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let optCount = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let label = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let y = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let x = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return DataPoint(x: x, y: y, label: label, optCount: optCount, optFlag: optFlag) } @@ -76,9 +76,9 @@ public func _bjs_DataPoint_init(_ x: Float64, _ y: Float64, _ labelBytes: Int32, extension Address: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Address { - let zipCode = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let city = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let street = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let zipCode = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let city = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let street = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Address(street: street, city: city, zipCode: zipCode) } @@ -133,10 +133,10 @@ fileprivate func _bjs_struct_lift_Address() -> Int32 { extension Person: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Person { - let email = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let email = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32()) let address = Address.bridgeJSLiftParameter() - let age = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let age = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Person(name: name, age: age, address: address, email: email) } @@ -192,8 +192,8 @@ fileprivate func _bjs_struct_lift_Person() -> Int32 { extension Session: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Session { - let owner = Greeter.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let owner = Greeter.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return Session(id: id, owner: owner) } @@ -237,9 +237,9 @@ fileprivate func _bjs_struct_lift_Session() -> Int32 { extension Measurement: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Measurement { - let optionalPrecision = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f32()) - let precision = Precision.bridgeJSLiftParameter(_swift_js_pop_param_f32()) - let value = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let optionalPrecision = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f32()) + let precision = Precision.bridgeJSLiftParameter(_swift_js_pop_f32()) + let value = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return Measurement(value: value, precision: precision, optionalPrecision: optionalPrecision) } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/UnsafePointer.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/UnsafePointer.swift index 3ef3b9939..4c368908b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/UnsafePointer.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/UnsafePointer.swift @@ -1,10 +1,10 @@ extension PointerFields: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> PointerFields { - let mutPtr = UnsafeMutablePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let ptr = UnsafePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let opaque = OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let mutRaw = UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let raw = UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) + let mutPtr = UnsafeMutablePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let ptr = UnsafePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let opaque = OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let mutRaw = UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let raw = UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) return PointerFields(raw: raw, mutRaw: mutRaw, opaque: opaque, ptr: ptr, mutPtr: mutPtr) } diff --git a/Plugins/PackageToJS/Templates/instantiate.js b/Plugins/PackageToJS/Templates/instantiate.js index 1ab35de35..462df924b 100644 --- a/Plugins/PackageToJS/Templates/instantiate.js +++ b/Plugins/PackageToJS/Templates/instantiate.js @@ -44,9 +44,9 @@ async function createInstantiator(options, swift) { swift_js_push_f32: unexpectedBjsCall, swift_js_push_f64: unexpectedBjsCall, swift_js_push_string: unexpectedBjsCall, - swift_js_pop_param_int32: unexpectedBjsCall, - swift_js_pop_param_f32: unexpectedBjsCall, - swift_js_pop_param_f64: unexpectedBjsCall, + swift_js_pop_i32: unexpectedBjsCall, + swift_js_pop_f32: unexpectedBjsCall, + swift_js_pop_f64: unexpectedBjsCall, swift_js_return_optional_bool: unexpectedBjsCall, swift_js_return_optional_int: unexpectedBjsCall, swift_js_return_optional_string: unexpectedBjsCall, diff --git a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift index dcdb8f6d0..3f4914ca0 100644 --- a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift +++ b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift @@ -452,28 +452,28 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_param_int32") -@_spi(BridgeJS) public func _swift_js_pop_param_int32() -> Int32 +@_extern(wasm, module: "bjs", name: "swift_js_pop_i32") +@_spi(BridgeJS) public func _swift_js_pop_i32() -> Int32 #else -@_spi(BridgeJS) public func _swift_js_pop_param_int32() -> Int32 { +@_spi(BridgeJS) public func _swift_js_pop_i32() -> Int32 { _onlyAvailableOnWasm() } #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_param_f32") -@_spi(BridgeJS) public func _swift_js_pop_param_f32() -> Float32 +@_extern(wasm, module: "bjs", name: "swift_js_pop_f32") +@_spi(BridgeJS) public func _swift_js_pop_f32() -> Float32 #else -@_spi(BridgeJS) public func _swift_js_pop_param_f32() -> Float32 { +@_spi(BridgeJS) public func _swift_js_pop_f32() -> Float32 { _onlyAvailableOnWasm() } #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_param_f64") -@_spi(BridgeJS) public func _swift_js_pop_param_f64() -> Float64 +@_extern(wasm, module: "bjs", name: "swift_js_pop_f64") +@_spi(BridgeJS) public func _swift_js_pop_f64() -> Float64 #else -@_spi(BridgeJS) public func _swift_js_pop_param_f64() -> Float64 { +@_spi(BridgeJS) public func _swift_js_pop_f64() -> Float64 { _onlyAvailableOnWasm() } #endif @@ -490,10 +490,10 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_param_array_length") -@_spi(BridgeJS) public func _swift_js_pop_param_array_length() -> Int32 +@_extern(wasm, module: "bjs", name: "swift_js_pop_array_length") +@_spi(BridgeJS) public func _swift_js_pop_array_length() -> Int32 #else -@_spi(BridgeJS) public func _swift_js_pop_param_array_length() -> Int32 { +@_spi(BridgeJS) public func _swift_js_pop_array_length() -> Int32 { _onlyAvailableOnWasm() } #endif @@ -704,10 +704,10 @@ func _swift_js_return_optional_double(_ isSome: Int32, _ value: Float64) { #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_param_pointer") -@_spi(BridgeJS) public func _swift_js_pop_param_pointer() -> UnsafeMutableRawPointer +@_extern(wasm, module: "bjs", name: "swift_js_pop_pointer") +@_spi(BridgeJS) public func _swift_js_pop_pointer() -> UnsafeMutableRawPointer #else -@_spi(BridgeJS) public func _swift_js_pop_param_pointer() -> UnsafeMutableRawPointer { +@_spi(BridgeJS) public func _swift_js_pop_pointer() -> UnsafeMutableRawPointer { _onlyAvailableOnWasm() } #endif diff --git a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift index 948b454c4..0cc31abc4 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift +++ b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift @@ -1438,15 +1438,15 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .flag(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) case 3: - return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_param_f32())) + return .rate(Float.bridgeJSLiftParameter(_swift_js_pop_f32())) case 4: - return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .precise(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: return .info default: @@ -1521,17 +1521,17 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> ComplexResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .error(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .error(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .location(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .location(Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 3: - return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 4: - return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + return .coordinates(Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64())) case 5: - return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .comprehensive(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), Double.bridgeJSLiftParameter(_swift_js_pop_f64()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 6: return .info default: @@ -1678,11 +1678,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> Utilities.Result { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) case 2: - return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()), String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Bool.bridgeJSLiftParameter(_swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32()), String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) default: fatalError("Unknown Utilities.Result case ID: \(caseId)") } @@ -1757,9 +1757,9 @@ extension API.NetworkingResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> API.NetworkingResult { switch caseId { case 0: - return .success(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + return .failure(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Int.bridgeJSLiftParameter(_swift_js_pop_i32())) default: fatalError("Unknown API.NetworkingResult case ID: \(caseId)") } @@ -1818,11 +1818,11 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { private static func _bridgeJSLiftFromCaseId(_ caseId: Int32) -> APIOptionalResult { switch caseId { case 0: - return .success(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .success(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) case 1: - return .failure(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .failure(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) case 2: - return .status(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()), Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + return .status(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()), Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) default: fatalError("Unknown APIOptionalResult case ID: \(caseId)") } @@ -2220,8 +2220,8 @@ public func _bjs_StaticPropertyNamespace_NestedProperties_static_nestedDouble_se extension Point: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Point { - let y = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let x = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let y = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let x = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return Point(x: x, y: y) } @@ -2265,11 +2265,11 @@ fileprivate func _bjs_struct_lift_Point() -> Int32 { extension PointerFields: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> PointerFields { - let mutPtr = UnsafeMutablePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let ptr = UnsafePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let opaque = OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let mutRaw = UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) - let raw = UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer()) + let mutPtr = UnsafeMutablePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let ptr = UnsafePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let opaque = OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let mutRaw = UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) + let raw = UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer()) return PointerFields(raw: raw, mutRaw: mutRaw, opaque: opaque, ptr: ptr, mutPtr: mutPtr) } @@ -2327,11 +2327,11 @@ public func _bjs_PointerFields_init(_ raw: UnsafeMutableRawPointer, _ mutRaw: Un extension DataPoint: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> DataPoint { - let optFlag = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let optCount = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let label = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let y = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let x = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let optFlag = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let optCount = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let label = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let y = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) + let x = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return DataPoint(x: x, y: y, label: label, optCount: optCount, optFlag: optFlag) } @@ -2400,9 +2400,9 @@ public func _bjs_DataPoint_init(_ x: Float64, _ y: Float64, _ labelBytes: Int32, extension Address: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Address { - let zipCode = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let city = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let street = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let zipCode = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let city = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let street = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Address(street: street, city: city, zipCode: zipCode) } @@ -2457,11 +2457,11 @@ fileprivate func _bjs_struct_lift_Address() -> Int32 { extension Contact: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Contact { - let secondaryAddress = Optional
.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let email = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let secondaryAddress = Optional
.bridgeJSLiftParameter(_swift_js_pop_i32()) + let email = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32()) let address = Address.bridgeJSLiftParameter() - let age = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let age = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Contact(name: name, age: age, address: address, email: email, secondaryAddress: secondaryAddress) } @@ -2522,10 +2522,10 @@ fileprivate func _bjs_struct_lift_Contact() -> Int32 { extension Config: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> Config { - let status = Status.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let direction = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let theme = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let status = Status.bridgeJSLiftParameter(_swift_js_pop_i32()) + let direction = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let theme = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return Config(name: name, theme: theme, direction: direction, status: status) } @@ -2585,8 +2585,8 @@ fileprivate func _bjs_struct_lift_Config() -> Int32 { extension SessionData: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> SessionData { - let owner = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_pointer()) - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let owner = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_pointer()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return SessionData(id: id, owner: owner) } @@ -2634,10 +2634,10 @@ fileprivate func _bjs_struct_lift_SessionData() -> Int32 { extension ValidationReport: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> ValidationReport { - let outcome = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let status = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let result = APIResult.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let outcome = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let status = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let result = APIResult.bridgeJSLiftParameter(_swift_js_pop_i32()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return ValidationReport(id: id, result: result, status: status, outcome: outcome) } @@ -2691,16 +2691,16 @@ fileprivate func _bjs_struct_lift_ValidationReport() -> Int32 { extension AdvancedConfig: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> AdvancedConfig { - let overrideDefaults = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let overrideDefaults = Optional.bridgeJSLiftParameter(_swift_js_pop_i32()) let defaults = ConfigStruct.bridgeJSLiftParameter() - let location = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let metadata = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let result = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let status = Status.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let theme = Theme.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let enabled = Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let title = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let location = Optional.bridgeJSLiftParameter(_swift_js_pop_i32()) + let metadata = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let result = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let status = Status.bridgeJSLiftParameter(_swift_js_pop_i32()) + let theme = Theme.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let enabled = Bool.bridgeJSLiftParameter(_swift_js_pop_i32()) + let title = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return AdvancedConfig(id: id, title: title, enabled: enabled, theme: theme, status: status, result: result, metadata: metadata, location: location, defaults: defaults, overrideDefaults: overrideDefaults) } @@ -2774,10 +2774,10 @@ fileprivate func _bjs_struct_lift_AdvancedConfig() -> Int32 { extension MeasurementConfig: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> MeasurementConfig { - let optionalRatio = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f64()) - let optionalPrecision = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_f32()) - let ratio = Ratio.bridgeJSLiftParameter(_swift_js_pop_param_f64()) - let precision = Precision.bridgeJSLiftParameter(_swift_js_pop_param_f32()) + let optionalRatio = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f64()) + let optionalPrecision = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_f32()) + let ratio = Ratio.bridgeJSLiftParameter(_swift_js_pop_f64()) + let precision = Precision.bridgeJSLiftParameter(_swift_js_pop_f32()) return MeasurementConfig(precision: precision, ratio: ratio, optionalPrecision: optionalPrecision, optionalRatio: optionalRatio) } @@ -2831,7 +2831,7 @@ fileprivate func _bjs_struct_lift_MeasurementConfig() -> Int32 { extension MathOperations: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> MathOperations { - let baseValue = Double.bridgeJSLiftParameter(_swift_js_pop_param_f64()) + let baseValue = Double.bridgeJSLiftParameter(_swift_js_pop_f64()) return MathOperations(baseValue: baseValue) } @@ -2918,8 +2918,8 @@ public func _bjs_MathOperations_static_subtract(_ a: Float64, _ b: Float64) -> F extension CopyableCart: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> CopyableCart { - let note = Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32()) - let x = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let note = Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32()) + let x = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return CopyableCart(x: x, note: note) } @@ -2981,8 +2981,8 @@ public func _bjs_CopyableCart_static_fromJSObject(_ object: Int32) -> Void { extension CopyableCartItem: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> CopyableCartItem { - let quantity = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let sku = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let quantity = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let sku = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return CopyableCartItem(sku: sku, quantity: quantity) } @@ -3029,9 +3029,9 @@ fileprivate func _bjs_struct_lift_CopyableCartItem() -> Int32 { extension CopyableNestedCart: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> CopyableNestedCart { - let shippingAddress = Optional
.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let shippingAddress = Optional
.bridgeJSLiftParameter(_swift_js_pop_i32()) let item = CopyableCartItem.bridgeJSLiftParameter() - let id = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) + let id = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) return CopyableNestedCart(id: id, item: item, shippingAddress: shippingAddress) } @@ -3091,8 +3091,8 @@ public func _bjs_CopyableNestedCart_static_fromJSObject(_ object: Int32) -> Void extension ConfigStruct: _BridgedSwiftStruct { @_spi(BridgeJS) @_transparent public static func bridgeJSLiftParameter() -> ConfigStruct { - let value = Int.bridgeJSLiftParameter(_swift_js_pop_param_int32()) - let name = String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32()) + let value = Int.bridgeJSLiftParameter(_swift_js_pop_i32()) + let name = String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32()) return ConfigStruct(name: name, value: value) } @@ -4567,11 +4567,11 @@ public func _bjs_testEmptyInit(_ object: UnsafeMutableRawPointer) -> UnsafeMutab public func _bjs_arrayWithDefault() -> Int32 { #if arch(wasm32) let ret = arrayWithDefault(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4591,11 +4591,11 @@ public func _bjs_arrayWithOptionalDefault(_ values: Int32) -> Int32 { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4613,11 +4613,11 @@ public func _bjs_arrayWithOptionalDefault(_ values: Int32) -> Int32 { public func _bjs_arrayMixedDefaults(_ prefixBytes: Int32, _ prefixLength: Int32, _ suffixBytes: Int32, _ suffixLength: Int32) -> Void { #if arch(wasm32) let ret = arrayMixedDefaults(prefix: String.bridgeJSLiftParameter(prefixBytes, prefixLength), values: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4666,11 +4666,11 @@ public func _bjs_makeAdder(_ base: Int32) -> UnsafeMutableRawPointer { public func _bjs_roundTripIntArray() -> Void { #if arch(wasm32) let ret = roundTripIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4688,11 +4688,11 @@ public func _bjs_roundTripIntArray() -> Void { public func _bjs_roundTripStringArray() -> Void { #if arch(wasm32) let ret = roundTripStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -4713,11 +4713,11 @@ public func _bjs_roundTripStringArray() -> Void { public func _bjs_roundTripDoubleArray() -> Void { #if arch(wasm32) let ret = roundTripDoubleArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -4735,11 +4735,11 @@ public func _bjs_roundTripDoubleArray() -> Void { public func _bjs_roundTripBoolArray() -> Void { #if arch(wasm32) let ret = roundTripBoolArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4757,11 +4757,11 @@ public func _bjs_roundTripBoolArray() -> Void { public func _bjs_roundTripDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripDirectionArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4779,11 +4779,11 @@ public func _bjs_roundTripDirectionArray() -> Void { public func _bjs_roundTripStatusArray() -> Void { #if arch(wasm32) let ret = roundTripStatusArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Status] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Status.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Status.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4801,11 +4801,11 @@ public func _bjs_roundTripStatusArray() -> Void { public func _bjs_roundTripThemeArray() -> Void { #if arch(wasm32) let ret = roundTripThemeArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Theme] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Theme.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Theme.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -4826,11 +4826,11 @@ public func _bjs_roundTripThemeArray() -> Void { public func _bjs_roundTripHttpStatusArray() -> Void { #if arch(wasm32) let ret = roundTripHttpStatusArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [HttpStatus] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(HttpStatus.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(HttpStatus.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4848,7 +4848,7 @@ public func _bjs_roundTripHttpStatusArray() -> Void { public func _bjs_roundTripDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripDataPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [DataPoint] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4870,11 +4870,11 @@ public func _bjs_roundTripDataPointArray() -> Void { public func _bjs_roundTripGreeterArray() -> Void { #if arch(wasm32) let ret = roundTripGreeterArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -4892,11 +4892,11 @@ public func _bjs_roundTripGreeterArray() -> Void { public func _bjs_roundTripOptionalIntArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -4917,11 +4917,11 @@ public func _bjs_roundTripOptionalIntArray() -> Void { public func _bjs_roundTripOptionalStringArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -4945,11 +4945,11 @@ public func _bjs_roundTripOptionalStringArray() -> Void { public func _bjs_roundTripOptionalDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalDataPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -4970,11 +4970,11 @@ public func _bjs_roundTripOptionalDataPointArray() -> Void { public func _bjs_roundTripOptionalDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalDirectionArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -4995,11 +4995,11 @@ public func _bjs_roundTripOptionalDirectionArray() -> Void { public func _bjs_roundTripOptionalStatusArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalStatusArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(Optional.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -5024,11 +5024,11 @@ public func _bjs_roundTripOptionalIntArrayType(_ values: Int32) -> Void { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -5055,11 +5055,11 @@ public func _bjs_roundTripOptionalStringArrayType(_ values: Int32) -> Void { return Optional<[String]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -5089,11 +5089,11 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { return Optional<[Greeter]>.none } else { return { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -5116,16 +5116,16 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { public func _bjs_roundTripNestedIntArray() -> Void { #if arch(wasm32) let ret = roundTripNestedIntArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Int.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -5149,16 +5149,16 @@ public func _bjs_roundTripNestedIntArray() -> Void { public func _bjs_roundTripNestedStringArray() -> Void { #if arch(wasm32) let ret = roundTripNestedStringArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[String]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(String.bridgeJSLiftParameter(_swift_js_pop_param_int32(), _swift_js_pop_param_int32())) + __result.append(String.bridgeJSLiftParameter(_swift_js_pop_i32(), _swift_js_pop_i32())) } __result.reverse() return __result @@ -5185,16 +5185,16 @@ public func _bjs_roundTripNestedStringArray() -> Void { public func _bjs_roundTripNestedDoubleArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDoubleArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Double]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_param_f64())) + __result.append(Double.bridgeJSLiftParameter(_swift_js_pop_f64())) } __result.reverse() return __result @@ -5218,16 +5218,16 @@ public func _bjs_roundTripNestedDoubleArray() -> Void { public func _bjs_roundTripNestedBoolArray() -> Void { #if arch(wasm32) let ret = roundTripNestedBoolArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Bool]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Bool.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -5251,12 +5251,12 @@ public func _bjs_roundTripNestedBoolArray() -> Void { public func _bjs_roundTripNestedDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDataPointArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[DataPoint]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [DataPoint] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5284,16 +5284,16 @@ public func _bjs_roundTripNestedDataPointArray() -> Void { public func _bjs_roundTripNestedDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDirectionArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Direction]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(Direction.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -5317,16 +5317,16 @@ public func _bjs_roundTripNestedDirectionArray() -> Void { public func _bjs_roundTripNestedGreeterArray() -> Void { #if arch(wasm32) let ret = roundTripNestedGreeterArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [[Greeter]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(Greeter.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -5350,11 +5350,11 @@ public func _bjs_roundTripNestedGreeterArray() -> Void { public func _bjs_roundTripUnsafeRawPointerArray() -> Void { #if arch(wasm32) let ret = roundTripUnsafeRawPointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [UnsafeRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(UnsafeRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -5372,11 +5372,11 @@ public func _bjs_roundTripUnsafeRawPointerArray() -> Void { public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { #if arch(wasm32) let ret = roundTripUnsafeMutableRawPointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [UnsafeMutableRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(UnsafeMutableRawPointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -5394,11 +5394,11 @@ public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { public func _bjs_roundTripOpaquePointerArray() -> Void { #if arch(wasm32) let ret = roundTripOpaquePointerArray(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [OpaquePointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_param_pointer())) + __result.append(OpaquePointer.bridgeJSLiftParameter(_swift_js_pop_pointer())) } __result.reverse() return __result @@ -5416,11 +5416,11 @@ public func _bjs_roundTripOpaquePointerArray() -> Void { public func _bjs_consumeDataProcessorArrayType() -> Int32 { #if arch(wasm32) let ret = consumeDataProcessorArrayType(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [AnyDataProcessor] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(AnyDataProcessor.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(AnyDataProcessor.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result @@ -5436,11 +5436,11 @@ public func _bjs_consumeDataProcessorArrayType() -> Int32 { public func _bjs_roundTripDataProcessorArrayType() -> Void { #if arch(wasm32) let ret = roundTripDataProcessorArrayType(_: { - let __count = Int(_swift_js_pop_param_array_length()) + let __count = Int(_swift_js_pop_array_length()) var __result: [AnyDataProcessor] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { - __result.append(AnyDataProcessor.bridgeJSLiftParameter(_swift_js_pop_param_int32())) + __result.append(AnyDataProcessor.bridgeJSLiftParameter(_swift_js_pop_i32())) } __result.reverse() return __result From dbc216afc4836e0977b0345f43462ef7a463a50e Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 2 Feb 2026 19:23:30 +0900 Subject: [PATCH 2/4] BridgeJS: Remove `swift_js_pop_array_length` --- Benchmarks/Sources/Generated/BridgeJS.swift | 44 +++++----- .../Sources/BridgeJSCore/ExportSwift.swift | 2 +- .../Sources/BridgeJSLink/BridgeJSLink.swift | 6 -- .../Sources/BridgeJSLink/JSGlueGen.swift | 4 +- .../ArrayParameter.Import.js | 4 - .../BridgeJSLinkTests/ArrayTypes.Export.js | 58 +++++++------- .../BridgeJSLinkTests/Async.Export.js | 4 - .../BridgeJSLinkTests/Async.Import.js | 4 - .../DefaultParameters.Export.js | 16 ++-- .../EnumAssociatedValue.Export.js | 4 - .../BridgeJSLinkTests/EnumCase.Export.js | 4 - .../BridgeJSLinkTests/EnumNamespace.Export.js | 4 - .../EnumNamespace.Global.Export.js | 4 - .../BridgeJSLinkTests/EnumRawType.Export.js | 4 - .../GlobalGetter.ImportMacros.js | 4 - .../GlobalThisImports.ImportMacros.js | 4 - .../ImportedTypeInExportedInterface.Export.js | 4 - .../BridgeJSLinkTests/Interface.Import.js | 4 - .../InvalidPropertyNames.Import.js | 4 - .../BridgeJSLinkTests/MixedGlobal.Export.js | 4 - .../BridgeJSLinkTests/MixedModules.Export.js | 4 - .../BridgeJSLinkTests/MixedPrivate.Export.js | 4 - .../MultipleImportedTypes.Import.js | 4 - .../BridgeJSLinkTests/Namespaces.Export.js | 4 - .../Namespaces.Global.Export.js | 4 - .../BridgeJSLinkTests/Optionals.Export.js | 4 - .../PrimitiveParameters.Export.js | 4 - .../PrimitiveParameters.Import.js | 4 - .../PrimitiveReturn.Export.js | 4 - .../PrimitiveReturn.Import.js | 4 - .../BridgeJSLinkTests/PropertyTypes.Export.js | 4 - .../BridgeJSLinkTests/Protocol.Export.js | 10 +-- .../BridgeJSLinkTests/ReExportFrom.Import.js | 4 - .../StaticFunctions.Export.js | 4 - .../StaticFunctions.Global.Export.js | 4 - .../StaticProperties.Export.js | 4 - .../StaticProperties.Global.Export.js | 4 - .../BridgeJSLinkTests/StringEnum.Import.js | 4 - .../StringParameter.Export.js | 4 - .../StringParameter.Import.js | 4 - .../BridgeJSLinkTests/StringReturn.Export.js | 4 - .../BridgeJSLinkTests/StringReturn.Import.js | 4 - .../BridgeJSLinkTests/SwiftClass.Export.js | 4 - .../BridgeJSLinkTests/SwiftClosure.Export.js | 4 - .../SwiftClosureImports.ImportMacros.js | 4 - .../BridgeJSLinkTests/SwiftStruct.Export.js | 4 - .../SwiftStructImports.ImportMacros.js | 4 - .../TS2SkeletonLike.Import.js | 4 - .../BridgeJSLinkTests/Throws.Export.js | 4 - .../BridgeJSLinkTests/TypeAlias.Import.js | 4 - .../TypeScriptClass.Import.js | 4 - .../BridgeJSLinkTests/UnsafePointer.Export.js | 4 - .../VoidParameterVoidReturn.Export.js | 4 - .../VoidParameterVoidReturn.Import.js | 4 - .../ExportSwiftTests/ArrayTypes.swift | 54 ++++++------- .../ExportSwiftTests/DefaultParameters.swift | 12 +-- .../ExportSwiftTests/Protocol.swift | 6 +- .../JavaScriptKit/BridgeJSIntrinsics.swift | 9 --- .../Generated/BridgeJS.swift | 80 +++++++++---------- 59 files changed, 136 insertions(+), 353 deletions(-) diff --git a/Benchmarks/Sources/Generated/BridgeJS.swift b/Benchmarks/Sources/Generated/BridgeJS.swift index fd45582e1..a582a1bed 100644 --- a/Benchmarks/Sources/Generated/BridgeJS.swift +++ b/Benchmarks/Sources/Generated/BridgeJS.swift @@ -1488,7 +1488,7 @@ public func _bjs_ArrayRoundtrip_init() -> UnsafeMutableRawPointer { public func _bjs_ArrayRoundtrip_takeIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1520,7 +1520,7 @@ public func _bjs_ArrayRoundtrip_makeIntArray(_ _self: UnsafeMutableRawPointer) - public func _bjs_ArrayRoundtrip_roundtripIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1555,7 +1555,7 @@ public func _bjs_ArrayRoundtrip_makeIntArrayLarge(_ _self: UnsafeMutableRawPoint public func _bjs_ArrayRoundtrip_takeDoubleArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeDoubleArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1587,7 +1587,7 @@ public func _bjs_ArrayRoundtrip_makeDoubleArray(_ _self: UnsafeMutableRawPointer public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripDoubleArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1609,7 +1609,7 @@ public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_takeStringArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1644,7 +1644,7 @@ public func _bjs_ArrayRoundtrip_makeStringArray(_ _self: UnsafeMutableRawPointer public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1669,7 +1669,7 @@ public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_takePointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takePointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1701,7 +1701,7 @@ public func _bjs_ArrayRoundtrip_makePointArray(_ _self: UnsafeMutableRawPointer) public func _bjs_ArrayRoundtrip_roundtripPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1736,12 +1736,12 @@ public func _bjs_ArrayRoundtrip_makePointArrayLarge(_ _self: UnsafeMutableRawPoi public func _bjs_ArrayRoundtrip_takeNestedIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeNestedIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1779,12 +1779,12 @@ public func _bjs_ArrayRoundtrip_makeNestedIntArray(_ _self: UnsafeMutableRawPoin public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripNestedIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1812,12 +1812,12 @@ public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRa public func _bjs_ArrayRoundtrip_takeNestedPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeNestedPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1855,12 +1855,12 @@ public func _bjs_ArrayRoundtrip_makeNestedPointArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripNestedPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1888,7 +1888,7 @@ public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutable public func _bjs_ArrayRoundtrip_takeOptionalIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeOptionalIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1923,7 +1923,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalIntArray(_ _self: UnsafeMutableRawPo public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripOptionalIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1948,7 +1948,7 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutable public func _bjs_ArrayRoundtrip_takeOptionalPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) ArrayRoundtrip.bridgeJSLiftParameter(_self).takeOptionalPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -1983,7 +1983,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalPointArray(_ _self: UnsafeMutableRaw public func _bjs_ArrayRoundtrip_roundtripOptionalPointArray(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).roundtripOptionalPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -2012,7 +2012,7 @@ public func _bjs_ArrayRoundtrip_takeOptionalArray(_ _self: UnsafeMutableRawPoint return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -2069,7 +2069,7 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalArray(_ _self: UnsafeMutableRaw return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { diff --git a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift index d91024d10..62c0475ea 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift @@ -856,7 +856,7 @@ struct StackCodegen { let swiftTypeName = elementType.swiftType return """ { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [\(raw: swiftTypeName)] = [] __result.reserveCapacity(__count) for _ in 0..<__count { diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift index dc20ee73a..8c2cbe474 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift @@ -257,7 +257,6 @@ public struct BridgeJSLink { "let \(JSGlueVariableScope.reservedTmpParamPointers) = [];", "let \(JSGlueVariableScope.reservedTmpStructCleanups) = [];", "let \(JSGlueVariableScope.reservedTmpRetArrayLengths) = [];", - "let \(JSGlueVariableScope.reservedTmpParamArrayLengths) = [];", "const \(JSGlueVariableScope.reservedEnumHelpers) = {};", "const \(JSGlueVariableScope.reservedStructHelpers) = {};", "", @@ -446,11 +445,6 @@ public struct BridgeJSLink { printer.write("\(JSGlueVariableScope.reservedTmpRetArrayLengths).push(len | 0);") } printer.write("}") - printer.write("bjs[\"swift_js_pop_array_length\"] = function() {") - printer.indent { - printer.write("return \(JSGlueVariableScope.reservedTmpParamArrayLengths).pop();") - } - printer.write("}") printer.write("bjs[\"swift_js_struct_cleanup\"] = function(cleanupId) {") printer.indent { printer.write("if (cleanupId === 0) { return; }") diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift index cf0919304..5ff651282 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift @@ -32,7 +32,6 @@ final class JSGlueVariableScope { static let reservedTmpParamPointers = "tmpParamPointers" static let reservedTmpStructCleanups = "tmpStructCleanups" static let reservedTmpRetArrayLengths = "tmpRetArrayLengths" - static let reservedTmpParamArrayLengths = "tmpParamArrayLengths" static let reservedEnumHelpers = "enumHelpers" static let reservedStructHelpers = "structHelpers" @@ -63,7 +62,6 @@ final class JSGlueVariableScope { reservedTmpParamPointers, reservedTmpStructCleanups, reservedTmpRetArrayLengths, - reservedTmpParamArrayLengths, reservedEnumHelpers, reservedStructHelpers, ] @@ -2172,7 +2170,7 @@ struct IntrinsicJSFragment: Sendable { } } printer.write("}") - printer.write("\(JSGlueVariableScope.reservedTmpParamArrayLengths).push(\(arr).length);") + printer.write("\(JSGlueVariableScope.reservedTmpParamInts).push(\(arr).length);") cleanupCode.write("for (const cleanup of \(cleanupArrayVar)) { cleanup(); }") return [] } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js index 30b8318bb..be84c1438 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js index b99d6dabf..89c574bb3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js @@ -43,7 +43,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -133,9 +132,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -302,7 +298,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processIntArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -325,7 +321,7 @@ export async function createInstantiator(options, swift) { swift.memory.release(id); }); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processStringArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -342,7 +338,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamF64s.push(elem); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processDoubleArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -359,7 +355,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push(elem ? 1 : 0); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processBoolArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -379,7 +375,7 @@ export async function createInstantiator(options, swift) { if (cleanup) { cleanup(); } }); } - tmpParamArrayLengths.push(points.length); + tmpParamInts.push(points.length); instance.exports.bjs_processPointArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -396,7 +392,7 @@ export async function createInstantiator(options, swift) { for (const elem of directions) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(directions.length); + tmpParamInts.push(directions.length); instance.exports.bjs_processDirectionArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -413,7 +409,7 @@ export async function createInstantiator(options, swift) { for (const elem of statuses) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(statuses.length); + tmpParamInts.push(statuses.length); instance.exports.bjs_processStatusArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -430,7 +426,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); const ret = instance.exports.bjs_sumIntArray(); for (const cleanup of arrayCleanups) { cleanup(); } return ret; @@ -443,7 +439,7 @@ export async function createInstantiator(options, swift) { if (cleanup) { cleanup(); } }); } - tmpParamArrayLengths.push(points.length); + tmpParamInts.push(points.length); const matchingBytes = textEncoder.encode(matching); const matchingId = swift.memory.retain(matchingBytes); instance.exports.bjs_findFirstPoint(matchingId, matchingBytes.length); @@ -457,7 +453,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamPointers.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processUnsafeRawPointerArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -474,7 +470,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamPointers.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processUnsafeMutableRawPointerArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -491,7 +487,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamPointers.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processOpaquePointerArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -514,7 +510,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(isSome); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processOptionalIntArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -549,7 +545,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(isSome); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processOptionalStringArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -576,7 +572,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); valuesCleanups.push(() => { for (const cleanup of arrayCleanups) { cleanup(); } }); } instance.exports.bjs_processOptionalArray(+isSome); @@ -608,7 +604,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(isSome); } - tmpParamArrayLengths.push(points.length); + tmpParamInts.push(points.length); instance.exports.bjs_processOptionalPointArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -638,7 +634,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(isSome); } - tmpParamArrayLengths.push(directions.length); + tmpParamInts.push(directions.length); instance.exports.bjs_processOptionalDirectionArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -668,7 +664,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(isSome); } - tmpParamArrayLengths.push(statuses.length); + tmpParamInts.push(statuses.length); instance.exports.bjs_processOptionalStatusArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -694,12 +690,12 @@ export async function createInstantiator(options, swift) { for (const elem1 of elem) { tmpParamInts.push((elem1 | 0)); } - tmpParamArrayLengths.push(elem.length); + tmpParamInts.push(elem.length); arrayCleanups.push(() => { for (const cleanup of arrayCleanups1) { cleanup(); } }); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processNestedIntArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -730,12 +726,12 @@ export async function createInstantiator(options, swift) { swift.memory.release(id); }); } - tmpParamArrayLengths.push(elem.length); + tmpParamInts.push(elem.length); arrayCleanups.push(() => { for (const cleanup of arrayCleanups1) { cleanup(); } }); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_processNestedStringArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -763,12 +759,12 @@ export async function createInstantiator(options, swift) { if (cleanup) { cleanup(); } }); } - tmpParamArrayLengths.push(elem.length); + tmpParamInts.push(elem.length); arrayCleanups.push(() => { for (const cleanup of arrayCleanups1) { cleanup(); } }); } - tmpParamArrayLengths.push(points.length); + tmpParamInts.push(points.length); instance.exports.bjs_processNestedPointArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -791,7 +787,7 @@ export async function createInstantiator(options, swift) { for (const elem of items) { tmpParamPointers.push(elem.pointer); } - tmpParamArrayLengths.push(items.length); + tmpParamInts.push(items.length); instance.exports.bjs_processItemArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -811,12 +807,12 @@ export async function createInstantiator(options, swift) { for (const elem1 of elem) { tmpParamPointers.push(elem1.pointer); } - tmpParamArrayLengths.push(elem.length); + tmpParamInts.push(elem.length); arrayCleanups.push(() => { for (const cleanup of arrayCleanups1) { cleanup(); } }); } - tmpParamArrayLengths.push(items.length); + tmpParamInts.push(items.length); instance.exports.bjs_processNestedItemArray(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js index 77c342a4a..a83274e1a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js index 9bc5e68f6..ff3551e31 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js index 10610bffe..6b9785933 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js @@ -36,7 +36,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -159,9 +158,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -566,7 +562,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_testIntArrayDefault(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -589,7 +585,7 @@ export async function createInstantiator(options, swift) { swift.memory.release(id); }); } - tmpParamArrayLengths.push(names.length); + tmpParamInts.push(names.length); instance.exports.bjs_testStringArrayDefault(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -606,7 +602,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamF64s.push(elem); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_testDoubleArrayDefault(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -623,7 +619,7 @@ export async function createInstantiator(options, swift) { for (const elem of flags) { tmpParamInts.push(elem ? 1 : 0); } - tmpParamArrayLengths.push(flags.length); + tmpParamInts.push(flags.length); instance.exports.bjs_testBoolArrayDefault(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -640,7 +636,7 @@ export async function createInstantiator(options, swift) { for (const elem of items) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(items.length); + tmpParamInts.push(items.length); instance.exports.bjs_testEmptyArrayDefault(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; @@ -659,7 +655,7 @@ export async function createInstantiator(options, swift) { for (const elem of values) { tmpParamInts.push((elem | 0)); } - tmpParamArrayLengths.push(values.length); + tmpParamInts.push(values.length); instance.exports.bjs_testMixedWithArrayDefault(nameId, nameBytes.length, enabled); const ret = tmpRetString; tmpRetString = undefined; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js index 93a671ce0..d1bf82d39 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js @@ -505,7 +505,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -581,9 +580,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js index bce9a1e13..5b5a631cd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js @@ -54,7 +54,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -130,9 +129,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js index 7fa29cbeb..936080db8 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js @@ -55,7 +55,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -131,9 +130,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js index 144189324..9e4b57dbe 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js @@ -74,7 +74,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -150,9 +149,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js index 7d26b5a93..1ef43bd79 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js @@ -105,7 +105,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -181,9 +180,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js index 7c209def8..ac53d326f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js index e5f0cd3ee..724df077e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js index c9534033f..231873ab0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js index 681816a95..b1dd75c44 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js index 5a1deb65a..50de3378c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js index c1b926130..d11b74338 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js index ae95f4431..f39b6209b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js index 63dd5b663..a78095948 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js index f4833046b..d6adac3c0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js index 0d7b5da19..5342ac94e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js index 6e7b72de5..e262b76fc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js index 979053ca9..df4337f5f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js index e7dc4822a..ccde5f78f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js index 5bc929c84..4d7787868 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js index 15ba11dd9..35069b2e4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js index 3fb51061f..c07676bc4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js index db62b9a72..7e5e3c1ca 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js index 6f0810c05..6d51db5e6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js @@ -94,7 +94,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -170,9 +169,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -703,7 +699,7 @@ export async function createInstantiator(options, swift) { const objId = swift.memory.retain(elem); tmpParamInts.push(objId); } - tmpParamArrayLengths.push(delegates.length); + tmpParamInts.push(delegates.length); const ret = instance.exports.bjs_DelegateManager_init(); for (const cleanup of arrayCleanups) { cleanup(); } return DelegateManager.__construct(ret); @@ -730,7 +726,7 @@ export async function createInstantiator(options, swift) { const objId = swift.memory.retain(elem); tmpParamInts.push(objId); } - tmpParamArrayLengths.push(value.length); + tmpParamInts.push(value.length); instance.exports.bjs_DelegateManager_delegates_set(this.pointer); for (const cleanup of arrayCleanups) { cleanup(); } } @@ -745,7 +741,7 @@ export async function createInstantiator(options, swift) { const objId = swift.memory.retain(elem); tmpParamInts.push(objId); } - tmpParamArrayLengths.push(delegates.length); + tmpParamInts.push(delegates.length); instance.exports.bjs_processDelegates(); const arrayLen = tmpRetArrayLengths.pop(); const arrayResult = []; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js index 10ab693ec..3a3cc4fd6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js index a77b18b37..cdf2e4d80 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js @@ -81,7 +81,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -157,9 +156,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js index 317e80b89..51833fee1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js @@ -81,7 +81,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -157,9 +156,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js index d7e384d43..91ced0c67 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js @@ -35,7 +35,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -111,9 +110,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js index b9b4307cc..c374d9a6f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js @@ -35,7 +35,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -111,9 +110,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js index 9712e79e0..a836bf2b5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js index c06d3fb4e..9a9c9cdc2 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js index fb12e02f6..9ebd38074 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js index 52b0ffc2e..cfe649726 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js index b81ff5526..75c9a1d47 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js index 189cab792..e7f76436c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js index ada39cb45..9d18cd143 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js @@ -132,7 +132,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -208,9 +207,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js index 5f3d4bb0c..a51be1c96 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js index fe124a7d6..745998d8e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js @@ -35,7 +35,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -300,9 +299,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js index 23937d680..916be5c96 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -121,9 +120,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js index feac2e1be..d87b8b6cb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js index 1b6ecbf8b..8c039e374 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js index 2bbe333e2..94012ee5d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js index be93e6af4..01646bc60 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js index a6d141ebf..1b7fd5ceb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -126,9 +125,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js index 1328d8af1..bc542c373 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -106,9 +105,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js index dbb6cc0ba..7f99e811e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js @@ -30,7 +30,6 @@ export async function createInstantiator(options, swift) { let tmpParamPointers = []; let tmpStructCleanups = []; let tmpRetArrayLengths = []; - let tmpParamArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_array_length"] = function(len) { tmpRetArrayLengths.push(len | 0); } - bjs["swift_js_pop_array_length"] = function() { - return tmpParamArrayLengths.pop(); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift index b897ab42f..7c0d12892 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift @@ -94,7 +94,7 @@ fileprivate func _bjs_struct_lift_Point() -> Int32 { public func _bjs_processIntArray() -> Void { #if arch(wasm32) let ret = processIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -116,7 +116,7 @@ public func _bjs_processIntArray() -> Void { public func _bjs_processStringArray() -> Void { #if arch(wasm32) let ret = processStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -141,7 +141,7 @@ public func _bjs_processStringArray() -> Void { public func _bjs_processDoubleArray() -> Void { #if arch(wasm32) let ret = processDoubleArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -163,7 +163,7 @@ public func _bjs_processDoubleArray() -> Void { public func _bjs_processBoolArray() -> Void { #if arch(wasm32) let ret = processBoolArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -185,7 +185,7 @@ public func _bjs_processBoolArray() -> Void { public func _bjs_processPointArray() -> Void { #if arch(wasm32) let ret = processPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -207,7 +207,7 @@ public func _bjs_processPointArray() -> Void { public func _bjs_processDirectionArray() -> Void { #if arch(wasm32) let ret = processDirectionArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -229,7 +229,7 @@ public func _bjs_processDirectionArray() -> Void { public func _bjs_processStatusArray() -> Void { #if arch(wasm32) let ret = processStatusArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Status] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -251,7 +251,7 @@ public func _bjs_processStatusArray() -> Void { public func _bjs_sumIntArray() -> Int32 { #if arch(wasm32) let ret = sumIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -271,7 +271,7 @@ public func _bjs_sumIntArray() -> Int32 { public func _bjs_findFirstPoint(_ matchingBytes: Int32, _ matchingLength: Int32) -> Void { #if arch(wasm32) let ret = findFirstPoint(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -291,7 +291,7 @@ public func _bjs_findFirstPoint(_ matchingBytes: Int32, _ matchingLength: Int32) public func _bjs_processUnsafeRawPointerArray() -> Void { #if arch(wasm32) let ret = processUnsafeRawPointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [UnsafeRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -313,7 +313,7 @@ public func _bjs_processUnsafeRawPointerArray() -> Void { public func _bjs_processUnsafeMutableRawPointerArray() -> Void { #if arch(wasm32) let ret = processUnsafeMutableRawPointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [UnsafeMutableRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -335,7 +335,7 @@ public func _bjs_processUnsafeMutableRawPointerArray() -> Void { public func _bjs_processOpaquePointerArray() -> Void { #if arch(wasm32) let ret = processOpaquePointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [OpaquePointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -357,7 +357,7 @@ public func _bjs_processOpaquePointerArray() -> Void { public func _bjs_processOptionalIntArray() -> Void { #if arch(wasm32) let ret = processOptionalIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -382,7 +382,7 @@ public func _bjs_processOptionalIntArray() -> Void { public func _bjs_processOptionalStringArray() -> Void { #if arch(wasm32) let ret = processOptionalStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -414,7 +414,7 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -441,7 +441,7 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { public func _bjs_processOptionalPointArray() -> Void { #if arch(wasm32) let ret = processOptionalPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -466,7 +466,7 @@ public func _bjs_processOptionalPointArray() -> Void { public func _bjs_processOptionalDirectionArray() -> Void { #if arch(wasm32) let ret = processOptionalDirectionArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -491,7 +491,7 @@ public func _bjs_processOptionalDirectionArray() -> Void { public func _bjs_processOptionalStatusArray() -> Void { #if arch(wasm32) let ret = processOptionalStatusArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -516,12 +516,12 @@ public func _bjs_processOptionalStatusArray() -> Void { public func _bjs_processNestedIntArray() -> Void { #if arch(wasm32) let ret = processNestedIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -549,12 +549,12 @@ public func _bjs_processNestedIntArray() -> Void { public func _bjs_processNestedStringArray() -> Void { #if arch(wasm32) let ret = processNestedStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[String]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -585,12 +585,12 @@ public func _bjs_processNestedStringArray() -> Void { public func _bjs_processNestedPointArray() -> Void { #if arch(wasm32) let ret = processNestedPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Point]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Point] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -618,7 +618,7 @@ public func _bjs_processNestedPointArray() -> Void { public func _bjs_processItemArray() -> Void { #if arch(wasm32) let ret = processItemArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Item] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -640,12 +640,12 @@ public func _bjs_processItemArray() -> Void { public func _bjs_processNestedItemArray() -> Void { #if arch(wasm32) let ret = processNestedItemArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Item]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Item] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift index f4d02f14f..b60a3c782 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift @@ -322,7 +322,7 @@ public func _bjs_testOptionalStructWithValueDefault(_ point: Int32) -> Void { public func _bjs_testIntArrayDefault() -> Void { #if arch(wasm32) let ret = testIntArrayDefault(values: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -344,7 +344,7 @@ public func _bjs_testIntArrayDefault() -> Void { public func _bjs_testStringArrayDefault() -> Void { #if arch(wasm32) let ret = testStringArrayDefault(names: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -369,7 +369,7 @@ public func _bjs_testStringArrayDefault() -> Void { public func _bjs_testDoubleArrayDefault() -> Void { #if arch(wasm32) let ret = testDoubleArrayDefault(values: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -391,7 +391,7 @@ public func _bjs_testDoubleArrayDefault() -> Void { public func _bjs_testBoolArrayDefault() -> Void { #if arch(wasm32) let ret = testBoolArrayDefault(flags: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -413,7 +413,7 @@ public func _bjs_testBoolArrayDefault() -> Void { public func _bjs_testEmptyArrayDefault() -> Void { #if arch(wasm32) let ret = testEmptyArrayDefault(items: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -435,7 +435,7 @@ public func _bjs_testEmptyArrayDefault() -> Void { public func _bjs_testMixedWithArrayDefault(_ nameBytes: Int32, _ nameLength: Int32, _ enabled: Int32) -> Void { #if arch(wasm32) let ret = testMixedWithArrayDefault(name: String.bridgeJSLiftParameter(nameBytes, nameLength), values: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift index cccbbf524..b22bc404b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift @@ -423,7 +423,7 @@ extension Priority: _BridgedSwiftEnumNoPayload { public func _bjs_processDelegates() -> Void { #if arch(wasm32) let ret = processDelegates(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -654,7 +654,7 @@ fileprivate func _bjs_MyViewController_wrap(_ pointer: UnsafeMutableRawPointer) public func _bjs_DelegateManager_init() -> UnsafeMutableRawPointer { #if arch(wasm32) let ret = DelegateManager(delegates: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -697,7 +697,7 @@ public func _bjs_DelegateManager_delegates_get(_ _self: UnsafeMutableRawPointer) public func _bjs_DelegateManager_delegates_set(_ _self: UnsafeMutableRawPointer) -> Void { #if arch(wasm32) DelegateManager.bridgeJSLiftParameter(_self).delegates = { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [AnyMyViewControllerDelegate] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { diff --git a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift index 3f4914ca0..4737a2d50 100644 --- a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift +++ b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift @@ -489,15 +489,6 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo } #endif -#if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_pop_array_length") -@_spi(BridgeJS) public func _swift_js_pop_array_length() -> Int32 -#else -@_spi(BridgeJS) public func _swift_js_pop_array_length() -> Int32 { - _onlyAvailableOnWasm() -} -#endif - // MARK: Struct bridging helpers (JS-side lowering/raising) #if arch(wasm32) diff --git a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift index 0cc31abc4..1476436ae 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift +++ b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift @@ -4567,7 +4567,7 @@ public func _bjs_testEmptyInit(_ object: UnsafeMutableRawPointer) -> UnsafeMutab public func _bjs_arrayWithDefault() -> Int32 { #if arch(wasm32) let ret = arrayWithDefault(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4591,7 +4591,7 @@ public func _bjs_arrayWithOptionalDefault(_ values: Int32) -> Int32 { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4613,7 +4613,7 @@ public func _bjs_arrayWithOptionalDefault(_ values: Int32) -> Int32 { public func _bjs_arrayMixedDefaults(_ prefixBytes: Int32, _ prefixLength: Int32, _ suffixBytes: Int32, _ suffixLength: Int32) -> Void { #if arch(wasm32) let ret = arrayMixedDefaults(prefix: String.bridgeJSLiftParameter(prefixBytes, prefixLength), values: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4666,7 +4666,7 @@ public func _bjs_makeAdder(_ base: Int32) -> UnsafeMutableRawPointer { public func _bjs_roundTripIntArray() -> Void { #if arch(wasm32) let ret = roundTripIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4688,7 +4688,7 @@ public func _bjs_roundTripIntArray() -> Void { public func _bjs_roundTripStringArray() -> Void { #if arch(wasm32) let ret = roundTripStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4713,7 +4713,7 @@ public func _bjs_roundTripStringArray() -> Void { public func _bjs_roundTripDoubleArray() -> Void { #if arch(wasm32) let ret = roundTripDoubleArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4735,7 +4735,7 @@ public func _bjs_roundTripDoubleArray() -> Void { public func _bjs_roundTripBoolArray() -> Void { #if arch(wasm32) let ret = roundTripBoolArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4757,7 +4757,7 @@ public func _bjs_roundTripBoolArray() -> Void { public func _bjs_roundTripDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripDirectionArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4779,7 +4779,7 @@ public func _bjs_roundTripDirectionArray() -> Void { public func _bjs_roundTripStatusArray() -> Void { #if arch(wasm32) let ret = roundTripStatusArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Status] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4801,7 +4801,7 @@ public func _bjs_roundTripStatusArray() -> Void { public func _bjs_roundTripThemeArray() -> Void { #if arch(wasm32) let ret = roundTripThemeArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Theme] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4826,7 +4826,7 @@ public func _bjs_roundTripThemeArray() -> Void { public func _bjs_roundTripHttpStatusArray() -> Void { #if arch(wasm32) let ret = roundTripHttpStatusArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [HttpStatus] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4848,7 +4848,7 @@ public func _bjs_roundTripHttpStatusArray() -> Void { public func _bjs_roundTripDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripDataPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [DataPoint] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4870,7 +4870,7 @@ public func _bjs_roundTripDataPointArray() -> Void { public func _bjs_roundTripGreeterArray() -> Void { #if arch(wasm32) let ret = roundTripGreeterArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4892,7 +4892,7 @@ public func _bjs_roundTripGreeterArray() -> Void { public func _bjs_roundTripOptionalIntArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4917,7 +4917,7 @@ public func _bjs_roundTripOptionalIntArray() -> Void { public func _bjs_roundTripOptionalStringArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4945,7 +4945,7 @@ public func _bjs_roundTripOptionalStringArray() -> Void { public func _bjs_roundTripOptionalDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalDataPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4970,7 +4970,7 @@ public func _bjs_roundTripOptionalDataPointArray() -> Void { public func _bjs_roundTripOptionalDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalDirectionArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -4995,7 +4995,7 @@ public func _bjs_roundTripOptionalDirectionArray() -> Void { public func _bjs_roundTripOptionalStatusArray() -> Void { #if arch(wasm32) let ret = roundTripOptionalStatusArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Optional] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5024,7 +5024,7 @@ public func _bjs_roundTripOptionalIntArrayType(_ values: Int32) -> Void { return Optional<[Int]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5055,7 +5055,7 @@ public func _bjs_roundTripOptionalStringArrayType(_ values: Int32) -> Void { return Optional<[String]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5089,7 +5089,7 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { return Optional<[Greeter]>.none } else { return { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5116,12 +5116,12 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { public func _bjs_roundTripNestedIntArray() -> Void { #if arch(wasm32) let ret = roundTripNestedIntArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Int]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Int] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5149,12 +5149,12 @@ public func _bjs_roundTripNestedIntArray() -> Void { public func _bjs_roundTripNestedStringArray() -> Void { #if arch(wasm32) let ret = roundTripNestedStringArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[String]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [String] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5185,12 +5185,12 @@ public func _bjs_roundTripNestedStringArray() -> Void { public func _bjs_roundTripNestedDoubleArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDoubleArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Double]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Double] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5218,12 +5218,12 @@ public func _bjs_roundTripNestedDoubleArray() -> Void { public func _bjs_roundTripNestedBoolArray() -> Void { #if arch(wasm32) let ret = roundTripNestedBoolArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Bool]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Bool] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5251,12 +5251,12 @@ public func _bjs_roundTripNestedBoolArray() -> Void { public func _bjs_roundTripNestedDataPointArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDataPointArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[DataPoint]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [DataPoint] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5284,12 +5284,12 @@ public func _bjs_roundTripNestedDataPointArray() -> Void { public func _bjs_roundTripNestedDirectionArray() -> Void { #if arch(wasm32) let ret = roundTripNestedDirectionArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Direction]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Direction] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5317,12 +5317,12 @@ public func _bjs_roundTripNestedDirectionArray() -> Void { public func _bjs_roundTripNestedGreeterArray() -> Void { #if arch(wasm32) let ret = roundTripNestedGreeterArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [[Greeter]] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { __result.append({ - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [Greeter] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5350,7 +5350,7 @@ public func _bjs_roundTripNestedGreeterArray() -> Void { public func _bjs_roundTripUnsafeRawPointerArray() -> Void { #if arch(wasm32) let ret = roundTripUnsafeRawPointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [UnsafeRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5372,7 +5372,7 @@ public func _bjs_roundTripUnsafeRawPointerArray() -> Void { public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { #if arch(wasm32) let ret = roundTripUnsafeMutableRawPointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [UnsafeMutableRawPointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5394,7 +5394,7 @@ public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { public func _bjs_roundTripOpaquePointerArray() -> Void { #if arch(wasm32) let ret = roundTripOpaquePointerArray(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [OpaquePointer] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5416,7 +5416,7 @@ public func _bjs_roundTripOpaquePointerArray() -> Void { public func _bjs_consumeDataProcessorArrayType() -> Int32 { #if arch(wasm32) let ret = consumeDataProcessorArrayType(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [AnyDataProcessor] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { @@ -5436,7 +5436,7 @@ public func _bjs_consumeDataProcessorArrayType() -> Int32 { public func _bjs_roundTripDataProcessorArrayType() -> Void { #if arch(wasm32) let ret = roundTripDataProcessorArrayType(_: { - let __count = Int(_swift_js_pop_array_length()) + let __count = Int(_swift_js_pop_i32()) var __result: [AnyDataProcessor] = [] __result.reserveCapacity(__count) for _ in 0 ..< __count { From 8c82550721aafc8d05dd09f3fe6552bfb74fc8fd Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 2 Feb 2026 19:26:52 +0900 Subject: [PATCH 3/4] BridgeJS: Remove `swift_js_push_array_length` --- Benchmarks/Sources/Generated/BridgeJS.swift | 50 ++++++------- .../Sources/BridgeJSCore/ExportSwift.swift | 2 +- .../Sources/BridgeJSLink/BridgeJSLink.swift | 6 -- .../Sources/BridgeJSLink/JSGlueGen.swift | 4 +- .../ArrayParameter.Import.js | 4 -- .../BridgeJSLinkTests/ArrayTypes.Export.js | 54 +++++++------- .../BridgeJSLinkTests/Async.Export.js | 4 -- .../BridgeJSLinkTests/Async.Import.js | 4 -- .../DefaultParameters.Export.js | 14 ++-- .../EnumAssociatedValue.Export.js | 4 -- .../BridgeJSLinkTests/EnumCase.Export.js | 4 -- .../BridgeJSLinkTests/EnumNamespace.Export.js | 4 -- .../EnumNamespace.Global.Export.js | 4 -- .../BridgeJSLinkTests/EnumRawType.Export.js | 4 -- .../GlobalGetter.ImportMacros.js | 4 -- .../GlobalThisImports.ImportMacros.js | 4 -- .../ImportedTypeInExportedInterface.Export.js | 4 -- .../BridgeJSLinkTests/Interface.Import.js | 4 -- .../InvalidPropertyNames.Import.js | 4 -- .../BridgeJSLinkTests/MixedGlobal.Export.js | 4 -- .../BridgeJSLinkTests/MixedModules.Export.js | 4 -- .../BridgeJSLinkTests/MixedPrivate.Export.js | 4 -- .../MultipleImportedTypes.Import.js | 4 -- .../BridgeJSLinkTests/Namespaces.Export.js | 4 -- .../Namespaces.Global.Export.js | 4 -- .../BridgeJSLinkTests/Optionals.Export.js | 4 -- .../PrimitiveParameters.Export.js | 4 -- .../PrimitiveParameters.Import.js | 4 -- .../PrimitiveReturn.Export.js | 4 -- .../PrimitiveReturn.Import.js | 4 -- .../BridgeJSLinkTests/PropertyTypes.Export.js | 4 -- .../BridgeJSLinkTests/Protocol.Export.js | 8 +-- .../BridgeJSLinkTests/ReExportFrom.Import.js | 4 -- .../StaticFunctions.Export.js | 4 -- .../StaticFunctions.Global.Export.js | 4 -- .../StaticProperties.Export.js | 4 -- .../StaticProperties.Global.Export.js | 4 -- .../BridgeJSLinkTests/StringEnum.Import.js | 4 -- .../StringParameter.Export.js | 4 -- .../StringParameter.Import.js | 4 -- .../BridgeJSLinkTests/StringReturn.Export.js | 4 -- .../BridgeJSLinkTests/StringReturn.Import.js | 4 -- .../BridgeJSLinkTests/SwiftClass.Export.js | 4 -- .../BridgeJSLinkTests/SwiftClosure.Export.js | 4 -- .../SwiftClosureImports.ImportMacros.js | 4 -- .../BridgeJSLinkTests/SwiftStruct.Export.js | 4 -- .../SwiftStructImports.ImportMacros.js | 4 -- .../TS2SkeletonLike.Import.js | 4 -- .../BridgeJSLinkTests/Throws.Export.js | 4 -- .../BridgeJSLinkTests/TypeAlias.Import.js | 4 -- .../TypeScriptClass.Import.js | 4 -- .../BridgeJSLinkTests/UnsafePointer.Export.js | 4 -- .../VoidParameterVoidReturn.Export.js | 4 -- .../VoidParameterVoidReturn.Import.js | 4 -- .../ExportSwiftTests/ArrayTypes.swift | 50 ++++++------- .../ExportSwiftTests/DefaultParameters.swift | 10 +-- .../ExportSwiftTests/Protocol.swift | 4 +- .../JavaScriptKit/BridgeJSIntrinsics.swift | 11 --- .../Generated/BridgeJS.swift | 72 +++++++++---------- 59 files changed, 127 insertions(+), 346 deletions(-) diff --git a/Benchmarks/Sources/Generated/BridgeJS.swift b/Benchmarks/Sources/Generated/BridgeJS.swift index a582a1bed..5572db46e 100644 --- a/Benchmarks/Sources/Generated/BridgeJS.swift +++ b/Benchmarks/Sources/Generated/BridgeJS.swift @@ -1509,7 +1509,7 @@ public func _bjs_ArrayRoundtrip_makeIntArray(_ _self: UnsafeMutableRawPointer) - let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeIntArray() for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1531,7 +1531,7 @@ public func _bjs_ArrayRoundtrip_roundtripIntArray(_ _self: UnsafeMutableRawPoint }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1544,7 +1544,7 @@ public func _bjs_ArrayRoundtrip_makeIntArrayLarge(_ _self: UnsafeMutableRawPoint let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeIntArrayLarge() for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1576,7 +1576,7 @@ public func _bjs_ArrayRoundtrip_makeDoubleArray(_ _self: UnsafeMutableRawPointer let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeDoubleArray() for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1598,7 +1598,7 @@ public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPo }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1633,7 +1633,7 @@ public func _bjs_ArrayRoundtrip_makeStringArray(_ _self: UnsafeMutableRawPointer __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1658,7 +1658,7 @@ public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPo __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1690,7 +1690,7 @@ public func _bjs_ArrayRoundtrip_makePointArray(_ _self: UnsafeMutableRawPointer) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makePointArray() for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1712,7 +1712,7 @@ public func _bjs_ArrayRoundtrip_roundtripPointArray(_ _self: UnsafeMutableRawPoi }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1725,7 +1725,7 @@ public func _bjs_ArrayRoundtrip_makePointArrayLarge(_ _self: UnsafeMutableRawPoi let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makePointArrayLarge() for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1767,8 +1767,8 @@ public func _bjs_ArrayRoundtrip_makeNestedIntArray(_ _self: UnsafeMutableRawPoin for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1800,8 +1800,8 @@ public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRa for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1843,8 +1843,8 @@ public func _bjs_ArrayRoundtrip_makeNestedPointArray(_ _self: UnsafeMutableRawPo for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1876,8 +1876,8 @@ public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutable for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1912,7 +1912,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalIntArray(_ _self: UnsafeMutableRawPo if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1937,7 +1937,7 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutable if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1972,7 +1972,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalPointArray(_ _self: UnsafeMutableRaw if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1997,7 +1997,7 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalPointArray(_ _self: UnsafeMutab if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -2037,7 +2037,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalArraySome(_ _self: UnsafeMutableRawP if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -2053,7 +2053,7 @@ public func _bjs_ArrayRoundtrip_makeOptionalArrayNone(_ _self: UnsafeMutableRawP if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -2084,7 +2084,7 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalArray(_ _self: UnsafeMutableRaw if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") diff --git a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift index 62c0475ea..567b16ee0 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift @@ -1014,7 +1014,7 @@ struct StackCodegen { } statements.append("}") - statements.append("_swift_js_push_array_length(Int32(\(raw: accessor).count))") + statements.append("_swift_js_push_int(Int32(\(raw: accessor).count))") return statements } diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift index 8c2cbe474..be120d4c8 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift @@ -256,7 +256,6 @@ public struct BridgeJSLink { "let \(JSGlueVariableScope.reservedTmpRetPointers) = [];", "let \(JSGlueVariableScope.reservedTmpParamPointers) = [];", "let \(JSGlueVariableScope.reservedTmpStructCleanups) = [];", - "let \(JSGlueVariableScope.reservedTmpRetArrayLengths) = [];", "const \(JSGlueVariableScope.reservedEnumHelpers) = {};", "const \(JSGlueVariableScope.reservedStructHelpers) = {};", "", @@ -440,11 +439,6 @@ public struct BridgeJSLink { printer.write("return \(JSGlueVariableScope.reservedTmpParamPointers).pop();") } printer.write("}") - printer.write("bjs[\"swift_js_push_array_length\"] = function(len) {") - printer.indent { - printer.write("\(JSGlueVariableScope.reservedTmpRetArrayLengths).push(len | 0);") - } - printer.write("}") printer.write("bjs[\"swift_js_struct_cleanup\"] = function(cleanupId) {") printer.indent { printer.write("if (cleanupId === 0) { return; }") diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift index 5ff651282..28f756a43 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/JSGlueGen.swift @@ -31,7 +31,6 @@ final class JSGlueVariableScope { static let reservedTmpRetPointers = "tmpRetPointers" static let reservedTmpParamPointers = "tmpParamPointers" static let reservedTmpStructCleanups = "tmpStructCleanups" - static let reservedTmpRetArrayLengths = "tmpRetArrayLengths" static let reservedEnumHelpers = "enumHelpers" static let reservedStructHelpers = "structHelpers" @@ -61,7 +60,6 @@ final class JSGlueVariableScope { reservedTmpRetPointers, reservedTmpParamPointers, reservedTmpStructCleanups, - reservedTmpRetArrayLengths, reservedEnumHelpers, reservedStructHelpers, ] @@ -2186,7 +2184,7 @@ struct IntrinsicJSFragment: Sendable { let lenVar = scope.variable("arrayLen") let iVar = scope.variable("i") - printer.write("const \(lenVar) = \(JSGlueVariableScope.reservedTmpRetArrayLengths).pop();") + printer.write("const \(lenVar) = \(JSGlueVariableScope.reservedTmpRetInts).pop();") printer.write("const \(resultVar) = [];") printer.write("for (let \(iVar) = 0; \(iVar) < \(lenVar); \(iVar)++) {") printer.indent { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js index be84c1438..cb77759da 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js index 89c574bb3..5abce72bb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js @@ -42,7 +42,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -129,9 +128,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -300,7 +296,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processIntArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const int = tmpRetInts.pop(); @@ -323,7 +319,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processStringArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const string = tmpRetStrings.pop(); @@ -340,7 +336,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processDoubleArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const f64 = tmpRetF64s.pop(); @@ -357,7 +353,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processBoolArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const bool = tmpRetInts.pop() !== 0; @@ -377,7 +373,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(points.length); instance.exports.bjs_processPointArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const struct = structHelpers.Point.lift(tmpRetStrings, tmpRetInts, tmpRetF32s, tmpRetF64s, tmpRetPointers); @@ -394,7 +390,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(directions.length); instance.exports.bjs_processDirectionArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const caseId = tmpRetInts.pop(); @@ -411,7 +407,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(statuses.length); instance.exports.bjs_processStatusArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const rawValue = tmpRetInts.pop(); @@ -455,7 +451,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processUnsafeRawPointerArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const pointer = tmpRetPointers.pop(); @@ -472,7 +468,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processUnsafeMutableRawPointerArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const pointer = tmpRetPointers.pop(); @@ -489,7 +485,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processOpaquePointerArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const pointer = tmpRetPointers.pop(); @@ -512,7 +508,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processOptionalIntArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const isSome1 = tmpRetInts.pop(); @@ -547,7 +543,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processOptionalStringArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const isSome1 = tmpRetInts.pop(); @@ -579,7 +575,7 @@ export async function createInstantiator(options, swift) { const isSome1 = tmpRetInts.pop(); let optResult; if (isSome1) { - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const int = tmpRetInts.pop(); @@ -606,7 +602,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(points.length); instance.exports.bjs_processOptionalPointArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const isSome1 = tmpRetInts.pop(); @@ -636,7 +632,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(directions.length); instance.exports.bjs_processOptionalDirectionArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const isSome1 = tmpRetInts.pop(); @@ -666,7 +662,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(statuses.length); instance.exports.bjs_processOptionalStatusArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const isSome1 = tmpRetInts.pop(); @@ -697,10 +693,10 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processNestedIntArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { - const arrayLen1 = tmpRetArrayLengths.pop(); + const arrayLen1 = tmpRetInts.pop(); const arrayResult1 = []; for (let i1 = 0; i1 < arrayLen1; i1++) { const int = tmpRetInts.pop(); @@ -733,10 +729,10 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_processNestedStringArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { - const arrayLen1 = tmpRetArrayLengths.pop(); + const arrayLen1 = tmpRetInts.pop(); const arrayResult1 = []; for (let i1 = 0; i1 < arrayLen1; i1++) { const string = tmpRetStrings.pop(); @@ -766,10 +762,10 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(points.length); instance.exports.bjs_processNestedPointArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { - const arrayLen1 = tmpRetArrayLengths.pop(); + const arrayLen1 = tmpRetInts.pop(); const arrayResult1 = []; for (let i1 = 0; i1 < arrayLen1; i1++) { const struct = structHelpers.Point.lift(tmpRetStrings, tmpRetInts, tmpRetF32s, tmpRetF64s, tmpRetPointers); @@ -789,7 +785,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(items.length); instance.exports.bjs_processItemArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const ptr = tmpRetPointers.pop(); @@ -814,10 +810,10 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(items.length); instance.exports.bjs_processNestedItemArray(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { - const arrayLen1 = tmpRetArrayLengths.pop(); + const arrayLen1 = tmpRetInts.pop(); const arrayResult1 = []; for (let i1 = 0; i1 < arrayLen1; i1++) { const ptr = tmpRetPointers.pop(); diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js index a83274e1a..afdd6e578 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js index ff3551e31..50b71fef0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js index 6b9785933..dfbf187f8 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js @@ -35,7 +35,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -155,9 +154,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -564,7 +560,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_testIntArrayDefault(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const int = tmpRetInts.pop(); @@ -587,7 +583,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(names.length); instance.exports.bjs_testStringArrayDefault(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const string = tmpRetStrings.pop(); @@ -604,7 +600,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(values.length); instance.exports.bjs_testDoubleArrayDefault(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const f64 = tmpRetF64s.pop(); @@ -621,7 +617,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(flags.length); instance.exports.bjs_testBoolArrayDefault(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const bool = tmpRetInts.pop() !== 0; @@ -638,7 +634,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(items.length); instance.exports.bjs_testEmptyArrayDefault(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const int = tmpRetInts.pop(); diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js index d1bf82d39..ff6813db9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js @@ -504,7 +504,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -577,9 +576,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js index 5b5a631cd..1858b6aed 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js @@ -53,7 +53,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -126,9 +125,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js index 936080db8..457b71af3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js @@ -54,7 +54,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -127,9 +126,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js index 9e4b57dbe..6c3e7b2cd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js @@ -73,7 +73,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -146,9 +145,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js index 1ef43bd79..9189b3e5a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js @@ -104,7 +104,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -177,9 +176,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js index ac53d326f..1b48c018b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js index 724df077e..98b94270c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js index 231873ab0..6f835d8e8 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js index b1dd75c44..48959038e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js index 50de3378c..1908f78c0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js index d11b74338..bbd8acf95 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js index f39b6209b..7328c7978 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js index a78095948..df5a2824d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js index d6adac3c0..be1baccad 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js index 5342ac94e..b843caf53 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js index e262b76fc..c13941e40 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js index df4337f5f..159667388 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js index ccde5f78f..e14c49547 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js index 4d7787868..3bf604348 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js index 35069b2e4..04be2979b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js index c07676bc4..a24360f8e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js index 7e5e3c1ca..917a0e17b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js index 6d51db5e6..b25433743 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js @@ -93,7 +93,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -166,9 +165,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; @@ -709,7 +705,7 @@ export async function createInstantiator(options, swift) { } get delegates() { instance.exports.bjs_DelegateManager_delegates_get(this.pointer); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const objId = tmpRetInts.pop(); @@ -743,7 +739,7 @@ export async function createInstantiator(options, swift) { } tmpParamInts.push(delegates.length); instance.exports.bjs_processDelegates(); - const arrayLen = tmpRetArrayLengths.pop(); + const arrayLen = tmpRetInts.pop(); const arrayResult = []; for (let i = 0; i < arrayLen; i++) { const objId1 = tmpRetInts.pop(); diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js index 3a3cc4fd6..7ece6c8f4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js index cdf2e4d80..85aa83fe4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js @@ -80,7 +80,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -153,9 +152,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js index 51833fee1..3ba252268 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js @@ -80,7 +80,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -153,9 +152,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js index 91ced0c67..7cba70388 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js @@ -34,7 +34,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js index c374d9a6f..4e621547a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js @@ -34,7 +34,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -107,9 +106,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js index a836bf2b5..5feacfdac 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js index 9a9c9cdc2..c3ed2fbbd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js index 9ebd38074..de72a94c0 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js index cfe649726..05a0206ea 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js index 75c9a1d47..2a60e1aba 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js index e7f76436c..8af3295cf 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js index 9d18cd143..ee89aa98d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js @@ -131,7 +131,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -204,9 +203,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js index a51be1c96..7ff9cc0b5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js index 745998d8e..36b0d1685 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js @@ -34,7 +34,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -296,9 +295,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js index 916be5c96..7102f173e 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -117,9 +116,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js index d87b8b6cb..97cf902e7 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js index 8c039e374..202a39045 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js index 94012ee5d..b6cab607b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js index 01646bc60..97204e7d7 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js index 1b7fd5ceb..737fd1867 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -122,9 +121,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js index bc542c373..b50901edd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -102,9 +101,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js index 7f99e811e..bcda74570 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js @@ -29,7 +29,6 @@ export async function createInstantiator(options, swift) { let tmpRetPointers = []; let tmpParamPointers = []; let tmpStructCleanups = []; - let tmpRetArrayLengths = []; const enumHelpers = {}; const structHelpers = {}; @@ -103,9 +102,6 @@ export async function createInstantiator(options, swift) { bjs["swift_js_pop_pointer"] = function() { return tmpParamPointers.pop(); } - bjs["swift_js_push_array_length"] = function(len) { - tmpRetArrayLengths.push(len | 0); - } bjs["swift_js_struct_cleanup"] = function(cleanupId) { if (cleanupId === 0) { return; } const index = (cleanupId | 0) - 1; diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift index 7c0d12892..19971fc0b 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift @@ -105,7 +105,7 @@ public func _bjs_processIntArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -130,7 +130,7 @@ public func _bjs_processStringArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -152,7 +152,7 @@ public func _bjs_processDoubleArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -174,7 +174,7 @@ public func _bjs_processBoolArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -196,7 +196,7 @@ public func _bjs_processPointArray() -> Void { }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -218,7 +218,7 @@ public func _bjs_processDirectionArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -240,7 +240,7 @@ public func _bjs_processStatusArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -302,7 +302,7 @@ public func _bjs_processUnsafeRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -324,7 +324,7 @@ public func _bjs_processUnsafeMutableRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -346,7 +346,7 @@ public func _bjs_processOpaquePointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -371,7 +371,7 @@ public func _bjs_processOptionalIntArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -399,7 +399,7 @@ public func _bjs_processOptionalStringArray() -> Void { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -429,7 +429,7 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -455,7 +455,7 @@ public func _bjs_processOptionalPointArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -480,7 +480,7 @@ public func _bjs_processOptionalDirectionArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -505,7 +505,7 @@ public func _bjs_processOptionalStatusArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -537,8 +537,8 @@ public func _bjs_processNestedIntArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -573,8 +573,8 @@ public func _bjs_processNestedStringArray() -> Void { __bjs_ret_elem_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -606,8 +606,8 @@ public func _bjs_processNestedPointArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -629,7 +629,7 @@ public func _bjs_processItemArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -661,8 +661,8 @@ public func _bjs_processNestedItemArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_pointer(__bjs_elem_ret_elem.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift index b60a3c782..6827af228 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift @@ -333,7 +333,7 @@ public func _bjs_testIntArrayDefault() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -358,7 +358,7 @@ public func _bjs_testStringArrayDefault() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -380,7 +380,7 @@ public func _bjs_testDoubleArrayDefault() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -402,7 +402,7 @@ public func _bjs_testBoolArrayDefault() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -424,7 +424,7 @@ public func _bjs_testEmptyArrayDefault() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift index b22bc404b..02a202268 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift @@ -434,7 +434,7 @@ public func _bjs_processDelegates() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -686,7 +686,7 @@ public func _bjs_DelegateManager_delegates_get(_ _self: UnsafeMutableRawPointer) let ret = DelegateManager.bridgeJSLiftParameter(_self).delegates for __bjs_elem_ret in ret { _swift_js_push_int((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift index 4737a2d50..0bf62648c 100644 --- a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift +++ b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift @@ -478,17 +478,6 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo } #endif -// MARK: Array length operations - -#if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_push_array_length") -@_spi(BridgeJS) public func _swift_js_push_array_length(_ length: Int32) -#else -@_spi(BridgeJS) public func _swift_js_push_array_length(_ length: Int32) { - _onlyAvailableOnWasm() -} -#endif - // MARK: Struct bridging helpers (JS-side lowering/raising) #if arch(wasm32) diff --git a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift index 1476436ae..e9b2aa903 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift +++ b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift @@ -4677,7 +4677,7 @@ public func _bjs_roundTripIntArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4702,7 +4702,7 @@ public func _bjs_roundTripStringArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4724,7 +4724,7 @@ public func _bjs_roundTripDoubleArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4746,7 +4746,7 @@ public func _bjs_roundTripBoolArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4768,7 +4768,7 @@ public func _bjs_roundTripDirectionArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4790,7 +4790,7 @@ public func _bjs_roundTripStatusArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4815,7 +4815,7 @@ public func _bjs_roundTripThemeArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4837,7 +4837,7 @@ public func _bjs_roundTripHttpStatusArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4859,7 +4859,7 @@ public func _bjs_roundTripDataPointArray() -> Void { }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4881,7 +4881,7 @@ public func _bjs_roundTripGreeterArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4906,7 +4906,7 @@ public func _bjs_roundTripOptionalIntArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4934,7 +4934,7 @@ public func _bjs_roundTripOptionalStringArray() -> Void { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4959,7 +4959,7 @@ public func _bjs_roundTripOptionalDataPointArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4984,7 +4984,7 @@ public func _bjs_roundTripOptionalDirectionArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5009,7 +5009,7 @@ public func _bjs_roundTripOptionalStatusArray() -> Void { if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5039,7 +5039,7 @@ public func _bjs_roundTripOptionalIntArrayType(_ values: Int32) -> Void { if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -5073,7 +5073,7 @@ public func _bjs_roundTripOptionalStringArrayType(_ values: Int32) -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -5104,7 +5104,7 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") @@ -5137,8 +5137,8 @@ public func _bjs_roundTripNestedIntArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5173,8 +5173,8 @@ public func _bjs_roundTripNestedStringArray() -> Void { __bjs_ret_elem_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5206,8 +5206,8 @@ public func _bjs_roundTripNestedDoubleArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_f64(__bjs_elem_ret_elem)} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5239,8 +5239,8 @@ public func _bjs_roundTripNestedBoolArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(__bjs_elem_ret_elem ? 1 : 0)} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5272,8 +5272,8 @@ public func _bjs_roundTripNestedDataPointArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5305,8 +5305,8 @@ public func _bjs_roundTripNestedDirectionArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_int(Int32(__bjs_elem_ret_elem.bridgeJSLowerParameter()))} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5338,8 +5338,8 @@ public func _bjs_roundTripNestedGreeterArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_pointer(__bjs_elem_ret_elem.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(__bjs_elem_ret.count))} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(__bjs_elem_ret.count))} + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5361,7 +5361,7 @@ public func _bjs_roundTripUnsafeRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5383,7 +5383,7 @@ public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5405,7 +5405,7 @@ public func _bjs_roundTripOpaquePointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5447,7 +5447,7 @@ public func _bjs_roundTripDataProcessorArrayType() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_int((__bjs_elem_ret as! AnyDataProcessor).bridgeJSLowerReturn())} - _swift_js_push_array_length(Int32(ret.count)) + _swift_js_push_int(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif From e604fa6707143373082aba77326ef4ca75ba0e28 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 2 Feb 2026 19:28:34 +0900 Subject: [PATCH 4/4] BridgeJS: Rename swift_js_push_int -> swift_js_push_i32 --- Benchmarks/Sources/Generated/BridgeJS.swift | 134 ++++----- .../Sources/BridgeJSCore/ExportSwift.swift | 28 +- .../Sources/BridgeJSLink/BridgeJSLink.swift | 2 +- .../ArrayParameter.Import.js | 2 +- .../BridgeJSLinkTests/ArrayTypes.Export.js | 2 +- .../BridgeJSLinkTests/Async.Export.js | 2 +- .../BridgeJSLinkTests/Async.Import.js | 2 +- .../DefaultParameters.Export.js | 2 +- .../EnumAssociatedValue.Export.js | 2 +- .../BridgeJSLinkTests/EnumCase.Export.js | 2 +- .../BridgeJSLinkTests/EnumNamespace.Export.js | 2 +- .../EnumNamespace.Global.Export.js | 2 +- .../BridgeJSLinkTests/EnumRawType.Export.js | 2 +- .../GlobalGetter.ImportMacros.js | 2 +- .../GlobalThisImports.ImportMacros.js | 2 +- .../ImportedTypeInExportedInterface.Export.js | 2 +- .../BridgeJSLinkTests/Interface.Import.js | 2 +- .../InvalidPropertyNames.Import.js | 2 +- .../BridgeJSLinkTests/MixedGlobal.Export.js | 2 +- .../BridgeJSLinkTests/MixedModules.Export.js | 2 +- .../BridgeJSLinkTests/MixedPrivate.Export.js | 2 +- .../MultipleImportedTypes.Import.js | 2 +- .../BridgeJSLinkTests/Namespaces.Export.js | 2 +- .../Namespaces.Global.Export.js | 2 +- .../BridgeJSLinkTests/Optionals.Export.js | 2 +- .../PrimitiveParameters.Export.js | 2 +- .../PrimitiveParameters.Import.js | 2 +- .../PrimitiveReturn.Export.js | 2 +- .../PrimitiveReturn.Import.js | 2 +- .../BridgeJSLinkTests/PropertyTypes.Export.js | 2 +- .../BridgeJSLinkTests/Protocol.Export.js | 2 +- .../BridgeJSLinkTests/ReExportFrom.Import.js | 2 +- .../StaticFunctions.Export.js | 2 +- .../StaticFunctions.Global.Export.js | 2 +- .../StaticProperties.Export.js | 2 +- .../StaticProperties.Global.Export.js | 2 +- .../BridgeJSLinkTests/StringEnum.Import.js | 2 +- .../StringParameter.Export.js | 2 +- .../StringParameter.Import.js | 2 +- .../BridgeJSLinkTests/StringReturn.Export.js | 2 +- .../BridgeJSLinkTests/StringReturn.Import.js | 2 +- .../BridgeJSLinkTests/SwiftClass.Export.js | 2 +- .../BridgeJSLinkTests/SwiftClosure.Export.js | 2 +- .../SwiftClosureImports.ImportMacros.js | 2 +- .../BridgeJSLinkTests/SwiftStruct.Export.js | 2 +- .../SwiftStructImports.ImportMacros.js | 2 +- .../TS2SkeletonLike.Import.js | 2 +- .../BridgeJSLinkTests/Throws.Export.js | 2 +- .../BridgeJSLinkTests/TypeAlias.Import.js | 2 +- .../TypeScriptClass.Import.js | 2 +- .../BridgeJSLinkTests/UnsafePointer.Export.js | 2 +- .../VoidParameterVoidReturn.Export.js | 2 +- .../VoidParameterVoidReturn.Import.js | 2 +- .../ExportSwiftTests/ArrayTypes.swift | 80 ++--- .../ExportSwiftTests/DefaultParameters.swift | 20 +- .../EnumAssociatedValue.swift | 92 +++--- .../ExportSwiftTests/Protocol.swift | 12 +- .../StaticFunctions.Global.swift | 4 +- .../ExportSwiftTests/StaticFunctions.swift | 4 +- .../ExportSwiftTests/SwiftClosure.swift | 8 +- .../ExportSwiftTests/SwiftStruct.swift | 20 +- Plugins/PackageToJS/Templates/instantiate.js | 2 +- .../JavaScriptKit/BridgeJSIntrinsics.swift | 10 +- .../Generated/BridgeJS.swift | 284 +++++++++--------- 64 files changed, 400 insertions(+), 400 deletions(-) diff --git a/Benchmarks/Sources/Generated/BridgeJS.swift b/Benchmarks/Sources/Generated/BridgeJS.swift index 5572db46e..86f4c87dc 100644 --- a/Benchmarks/Sources/Generated/BridgeJS.swift +++ b/Benchmarks/Sources/Generated/BridgeJS.swift @@ -38,10 +38,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) case .flag(let param0): - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) return Int32(2) case .rate(let param0): _swift_js_push_f32(param0) @@ -74,10 +74,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) case .flag(let param0): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) case .rate(let param0): _swift_js_push_tag(Int32(3)) _swift_js_push_f32(param0) @@ -127,7 +127,7 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) case .location(let param0, let param1, let param2): _swift_js_push_f64(param0) @@ -138,8 +138,8 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { } return Int32(2) case .status(let param0, let param1, let param2): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -151,10 +151,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) return Int32(4) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -199,7 +199,7 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) case .location(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) _swift_js_push_f64(param0) @@ -210,8 +210,8 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { } case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(3)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -223,10 +223,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): _swift_js_push_tag(Int32(5)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -262,8 +262,8 @@ extension SimpleStruct: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.count)) - _swift_js_push_int(self.flag ? 1 : 0) + _swift_js_push_i32(Int32(self.count)) + _swift_js_push_i32(self.flag ? 1 : 0) _swift_js_push_f32(self.rate) _swift_js_push_f64(self.precise) } @@ -318,7 +318,7 @@ extension Address: _BridgedSwiftStruct { __bjs_city.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.zipCode)) + _swift_js_push_i32(Int32(self.zipCode)) } init(unsafelyCopying jsObject: JSObject) { @@ -368,7 +368,7 @@ extension Person: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.age)) + _swift_js_push_i32(Int32(self.age)) self.address.bridgeJSLowerReturn() let __bjs_isSome_email = self.email != nil if let __bjs_unwrapped_email = self.email { @@ -377,7 +377,7 @@ extension Person: _BridgedSwiftStruct { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_email ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_email ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -425,12 +425,12 @@ extension ComplexStruct: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) var __bjs_title = self.title __bjs_title.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(self.active ? 1 : 0) + _swift_js_push_i32(self.active ? 1 : 0) _swift_js_push_f64(self.score) var __bjs_tags = self.tags __bjs_tags.withUTF8 { ptr in @@ -1508,8 +1508,8 @@ public func _bjs_ArrayRoundtrip_makeIntArray(_ _self: UnsafeMutableRawPointer) - #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeIntArray() for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1530,8 +1530,8 @@ public func _bjs_ArrayRoundtrip_roundtripIntArray(_ _self: UnsafeMutableRawPoint return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1543,8 +1543,8 @@ public func _bjs_ArrayRoundtrip_makeIntArrayLarge(_ _self: UnsafeMutableRawPoint #if arch(wasm32) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeIntArrayLarge() for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1576,7 +1576,7 @@ public func _bjs_ArrayRoundtrip_makeDoubleArray(_ _self: UnsafeMutableRawPointer let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeDoubleArray() for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1598,7 +1598,7 @@ public func _bjs_ArrayRoundtrip_roundtripDoubleArray(_ _self: UnsafeMutableRawPo }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1633,7 +1633,7 @@ public func _bjs_ArrayRoundtrip_makeStringArray(_ _self: UnsafeMutableRawPointer __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1658,7 +1658,7 @@ public func _bjs_ArrayRoundtrip_roundtripStringArray(_ _self: UnsafeMutableRawPo __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1690,7 +1690,7 @@ public func _bjs_ArrayRoundtrip_makePointArray(_ _self: UnsafeMutableRawPointer) let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makePointArray() for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1712,7 +1712,7 @@ public func _bjs_ArrayRoundtrip_roundtripPointArray(_ _self: UnsafeMutableRawPoi }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1725,7 +1725,7 @@ public func _bjs_ArrayRoundtrip_makePointArrayLarge(_ _self: UnsafeMutableRawPoi let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makePointArrayLarge() for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1766,9 +1766,9 @@ public func _bjs_ArrayRoundtrip_makeNestedIntArray(_ _self: UnsafeMutableRawPoin let ret = ArrayRoundtrip.bridgeJSLiftParameter(_self).makeNestedIntArray() for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret_elem))} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1799,9 +1799,9 @@ public func _bjs_ArrayRoundtrip_roundtripNestedIntArray(_ _self: UnsafeMutableRa }()) for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret_elem))} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1843,8 +1843,8 @@ public func _bjs_ArrayRoundtrip_makeNestedPointArray(_ _self: UnsafeMutableRawPo for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1876,8 +1876,8 @@ public func _bjs_ArrayRoundtrip_roundtripNestedPointArray(_ _self: UnsafeMutable for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1910,9 +1910,9 @@ public func _bjs_ArrayRoundtrip_makeOptionalIntArray(_ _self: UnsafeMutableRawPo for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret_elem))} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1935,9 +1935,9 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalIntArray(_ _self: UnsafeMutable for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret_elem))} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1971,8 +1971,8 @@ public func _bjs_ArrayRoundtrip_makeOptionalPointArray(_ _self: UnsafeMutableRaw let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -1996,8 +1996,8 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalPointArray(_ _self: UnsafeMutab let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -2036,9 +2036,9 @@ public func _bjs_ArrayRoundtrip_makeOptionalArraySome(_ _self: UnsafeMutableRawP let __bjs_isSome_ret = ret != nil if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -2052,9 +2052,9 @@ public func _bjs_ArrayRoundtrip_makeOptionalArrayNone(_ _self: UnsafeMutableRawP let __bjs_isSome_ret = ret != nil if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -2083,9 +2083,9 @@ public func _bjs_ArrayRoundtrip_roundtripOptionalArray(_ _self: UnsafeMutableRaw let __bjs_isSome_ret = ret != nil if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift index 567b16ee0..d7d5c8200 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSCore/ExportSwift.swift @@ -946,24 +946,24 @@ struct StackCodegen { "__bjs_\(raw: varPrefix).withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }", ] case .int, .uint: - return ["_swift_js_push_int(Int32(\(raw: accessor)))"] + return ["_swift_js_push_i32(Int32(\(raw: accessor)))"] case .bool: - return ["_swift_js_push_int(\(raw: accessor) ? 1 : 0)"] + return ["_swift_js_push_i32(\(raw: accessor) ? 1 : 0)"] case .float: return ["_swift_js_push_f32(\(raw: accessor))"] case .double: return ["_swift_js_push_f64(\(raw: accessor))"] case .jsObject: - return ["_swift_js_push_int(\(raw: accessor).bridgeJSLowerReturn())"] + return ["_swift_js_push_i32(\(raw: accessor).bridgeJSLowerReturn())"] case .swiftHeapObject: return ["_swift_js_push_pointer(\(raw: accessor).bridgeJSLowerReturn())"] case .unsafePointer: return ["_swift_js_push_pointer(\(raw: accessor).bridgeJSLowerReturn())"] case .swiftProtocol(let protocolName): let wrapperName = "Any\(protocolName)" - return ["_swift_js_push_int((\(raw: accessor) as! \(raw: wrapperName)).bridgeJSLowerReturn())"] + return ["_swift_js_push_i32((\(raw: accessor) as! \(raw: wrapperName)).bridgeJSLowerReturn())"] case .caseEnum: - return ["_swift_js_push_int(Int32(\(raw: accessor).bridgeJSLowerParameter()))"] + return ["_swift_js_push_i32(Int32(\(raw: accessor).bridgeJSLowerParameter()))"] case .rawValueEnum(_, let rawType): switch rawType { case .string: @@ -976,7 +976,7 @@ struct StackCodegen { case .double: return ["_swift_js_push_f64(\(raw: accessor).bridgeJSLowerParameter())"] default: - return ["_swift_js_push_int(Int32(\(raw: accessor).bridgeJSLowerParameter()))"] + return ["_swift_js_push_i32(Int32(\(raw: accessor).bridgeJSLowerParameter()))"] } case .associatedValueEnum: return ["\(raw: accessor).bridgeJSLowerReturn()"] @@ -1014,7 +1014,7 @@ struct StackCodegen { } statements.append("}") - statements.append("_swift_js_push_int(Int32(\(raw: accessor).count))") + statements.append("_swift_js_push_i32(Int32(\(raw: accessor).count))") return statements } @@ -1037,7 +1037,7 @@ struct StackCodegen { } statements.append("}") - statements.append("_swift_js_push_int(__bjs_isSome_\(raw: varPrefix) ? 1 : 0)") + statements.append("_swift_js_push_i32(__bjs_isSome_\(raw: varPrefix) ? 1 : 0)") return statements } @@ -1053,15 +1053,15 @@ struct StackCodegen { "__bjs_str_\(raw: varPrefix).withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }", ] case .int, .uint: - return ["_swift_js_push_int(Int32(\(raw: unwrappedVar)))"] + return ["_swift_js_push_i32(Int32(\(raw: unwrappedVar)))"] case .bool: - return ["_swift_js_push_int(\(raw: unwrappedVar) ? 1 : 0)"] + return ["_swift_js_push_i32(\(raw: unwrappedVar) ? 1 : 0)"] case .float: return ["_swift_js_push_f32(\(raw: unwrappedVar))"] case .double: return ["_swift_js_push_f64(\(raw: unwrappedVar))"] case .caseEnum: - return ["_swift_js_push_int(\(raw: unwrappedVar).bridgeJSLowerParameter())"] + return ["_swift_js_push_i32(\(raw: unwrappedVar).bridgeJSLowerParameter())"] case .rawValueEnum(_, let rawType): switch rawType { case .string: @@ -1074,16 +1074,16 @@ struct StackCodegen { case .double: return ["_swift_js_push_f64(\(raw: unwrappedVar).bridgeJSLowerParameter())"] default: - return ["_swift_js_push_int(\(raw: unwrappedVar).bridgeJSLowerParameter())"] + return ["_swift_js_push_i32(\(raw: unwrappedVar).bridgeJSLowerParameter())"] } case .swiftStruct: return ["\(raw: unwrappedVar).bridgeJSLowerReturn()"] case .swiftHeapObject: return ["_swift_js_push_pointer(\(raw: unwrappedVar).bridgeJSLowerReturn())"] case .associatedValueEnum: - return ["_swift_js_push_int(\(raw: unwrappedVar).bridgeJSLowerParameter())"] + return ["_swift_js_push_i32(\(raw: unwrappedVar).bridgeJSLowerParameter())"] case .jsObject: - return ["_swift_js_push_int(\(raw: unwrappedVar).bridgeJSLowerReturn())"] + return ["_swift_js_push_i32(\(raw: unwrappedVar).bridgeJSLowerReturn())"] case .array(let elementType): return lowerArrayStatements(elementType: elementType, accessor: unwrappedVar, varPrefix: varPrefix) default: diff --git a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift index be120d4c8..60b55cd47 100644 --- a/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift +++ b/Plugins/BridgeJS/Sources/BridgeJSLink/BridgeJSLink.swift @@ -390,7 +390,7 @@ public struct BridgeJSLink { printer.write("\(JSGlueVariableScope.reservedTmpRetTag) = tag;") } printer.write("}") - printer.write("bjs[\"swift_js_push_int\"] = function(v) {") + printer.write("bjs[\"swift_js_push_i32\"] = function(v) {") printer.indent { printer.write("\(JSGlueVariableScope.reservedTmpRetInts).push(v | 0);") } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js index cb77759da..8add18b9f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayParameter.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js index 5abce72bb..7388f4150 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ArrayTypes.Export.js @@ -99,7 +99,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js index afdd6e578..4015b6261 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js index 50b71fef0..981cecbe5 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Async.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js index dfbf187f8..978272568 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/DefaultParameters.Export.js @@ -125,7 +125,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js index ff6813db9..2d8dbc0ca 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumAssociatedValue.Export.js @@ -547,7 +547,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js index 1858b6aed..89a0f0897 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumCase.Export.js @@ -96,7 +96,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js index 457b71af3..b01148873 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Export.js @@ -97,7 +97,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js index 6c3e7b2cd..77c327e8d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumNamespace.Global.Export.js @@ -116,7 +116,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js index 9189b3e5a..c1865adfc 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/EnumRawType.Export.js @@ -147,7 +147,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js index 1b48c018b..b3b809476 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalGetter.ImportMacros.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js index 98b94270c..35a3d76ec 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/GlobalThisImports.ImportMacros.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js index 6f835d8e8..094c2241d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ImportedTypeInExportedInterface.Export.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js index 48959038e..1d25a2954 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Interface.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js index 1908f78c0..833436226 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/InvalidPropertyNames.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js index bbd8acf95..f079de1da 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedGlobal.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js index 7328c7978..2c43b91e8 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedModules.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js index df5a2824d..4b8ce8a66 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MixedPrivate.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js index be1baccad..f8cfd7366 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/MultipleImportedTypes.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js index b843caf53..ae7bf7451 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js index c13941e40..671868eab 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Namespaces.Global.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js index 159667388..2c08e3d9f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Optionals.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js index e14c49547..0a92510f7 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js index 3bf604348..fe6c3ae04 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveParameters.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js index 04be2979b..836a82f21 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js index a24360f8e..e3263af05 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PrimitiveReturn.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js index 917a0e17b..fc13a471a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/PropertyTypes.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js index b25433743..24c02750f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Protocol.Export.js @@ -136,7 +136,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js index 7ece6c8f4..94e22ffc4 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/ReExportFrom.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js index 85aa83fe4..8b5a54315 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Export.js @@ -123,7 +123,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js index 3ba252268..e7bebfe6c 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticFunctions.Global.Export.js @@ -123,7 +123,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js index 7cba70388..ee127ed07 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Export.js @@ -77,7 +77,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js index 4e621547a..9806fc631 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StaticProperties.Global.Export.js @@ -77,7 +77,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js index 5feacfdac..373b433b6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringEnum.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js index c3ed2fbbd..021adcba3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js index de72a94c0..718f776c7 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringParameter.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js index 05a0206ea..479b313dd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js index 2a60e1aba..bb5278068 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/StringReturn.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js index 8af3295cf..d04cd6507 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClass.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js index ee89aa98d..40378d042 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosure.Export.js @@ -174,7 +174,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js index 7ff9cc0b5..9ab218df1 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftClosureImports.ImportMacros.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js index 36b0d1685..a3d60d0bd 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStruct.Export.js @@ -266,7 +266,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js index 7102f173e..f4e7e61e9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/SwiftStructImports.ImportMacros.js @@ -87,7 +87,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js index 97cf902e7..45c273115 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TS2SkeletonLike.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js index 202a39045..5a492295a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/Throws.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js index b6cab607b..406d7f0f3 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeAlias.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js index 97204e7d7..d83919051 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/TypeScriptClass.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js index 737fd1867..2ac28b7e9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/UnsafePointer.Export.js @@ -92,7 +92,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js index b50901edd..8a2fabca9 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Export.js @@ -72,7 +72,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js index bcda74570..2944bcf5a 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/BridgeJSLinkTests/VoidParameterVoidReturn.Import.js @@ -73,7 +73,7 @@ export async function createInstantiator(options, swift) { bjs["swift_js_push_tag"] = function(tag) { tmpRetTag = tag; } - bjs["swift_js_push_int"] = function(v) { + bjs["swift_js_push_i32"] = function(v) { tmpRetInts.push(v | 0); } bjs["swift_js_push_f32"] = function(v) { diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift index 19971fc0b..711694c9d 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/ArrayTypes.swift @@ -104,8 +104,8 @@ public func _bjs_processIntArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -130,7 +130,7 @@ public func _bjs_processStringArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -152,7 +152,7 @@ public func _bjs_processDoubleArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -173,8 +173,8 @@ public func _bjs_processBoolArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_elem_ret ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -196,7 +196,7 @@ public func _bjs_processPointArray() -> Void { }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -217,8 +217,8 @@ public func _bjs_processDirectionArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -239,8 +239,8 @@ public func _bjs_processStatusArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -302,7 +302,7 @@ public func _bjs_processUnsafeRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -324,7 +324,7 @@ public func _bjs_processUnsafeMutableRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -346,7 +346,7 @@ public func _bjs_processOpaquePointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -369,9 +369,9 @@ public func _bjs_processOptionalIntArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret_elem))} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -398,8 +398,8 @@ public func _bjs_processOptionalStringArray() -> Void { __bjs_str_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -428,9 +428,9 @@ public func _bjs_processOptionalArray(_ values: Int32) -> Void { let __bjs_isSome_ret = ret != nil if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -454,8 +454,8 @@ public func _bjs_processOptionalPointArray() -> Void { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -478,9 +478,9 @@ public func _bjs_processOptionalDirectionArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -503,9 +503,9 @@ public func _bjs_processOptionalStatusArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -536,9 +536,9 @@ public func _bjs_processNestedIntArray() -> Void { }()) for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret_elem))} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -573,8 +573,8 @@ public func _bjs_processNestedStringArray() -> Void { __bjs_ret_elem_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -606,8 +606,8 @@ public func _bjs_processNestedPointArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -629,7 +629,7 @@ public func _bjs_processItemArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -661,8 +661,8 @@ public func _bjs_processNestedItemArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_pointer(__bjs_elem_ret_elem.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift index 6827af228..5232bdd53 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/DefaultParameters.swift @@ -50,8 +50,8 @@ extension Config: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.value)) - _swift_js_push_int(self.enabled ? 1 : 0) + _swift_js_push_i32(Int32(self.value)) + _swift_js_push_i32(self.enabled ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -332,8 +332,8 @@ public func _bjs_testIntArrayDefault() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -358,7 +358,7 @@ public func _bjs_testStringArrayDefault() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -380,7 +380,7 @@ public func _bjs_testDoubleArrayDefault() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -401,8 +401,8 @@ public func _bjs_testBoolArrayDefault() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_elem_ret ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -423,8 +423,8 @@ public func _bjs_testEmptyArrayDefault() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift index fa9e791ee..e35da2f77 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/EnumAssociatedValue.swift @@ -29,10 +29,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) case .flag(let param0): - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) return Int32(2) case .rate(let param0): _swift_js_push_f32(param0) @@ -65,10 +65,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) case .flag(let param0): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) case .rate(let param0): _swift_js_push_tag(Int32(3)) _swift_js_push_f32(param0) @@ -116,11 +116,11 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) case .status(let param0, let param1, let param2): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -132,10 +132,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) return Int32(3) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -180,11 +180,11 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -196,10 +196,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): _swift_js_push_tag(Int32(4)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -249,11 +249,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) case .status(let param0, let param1, let param2): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -286,11 +286,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -326,7 +326,7 @@ extension NetworkingResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) } } @@ -355,7 +355,7 @@ extension NetworkingResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) } } } @@ -386,31 +386,31 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) return Int32(0) case .failure(let param0, let param1): let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(Int32(__bjs_unwrapped_param0)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param0)) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(__bjs_unwrapped_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param1 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) return Int32(1) case .status(let param0, let param1, let param2): let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(__bjs_unwrapped_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param0 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(Int32(__bjs_unwrapped_param1)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param1)) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) let __bjs_isSome_param2 = param2 != nil if let __bjs_unwrapped_param2 = param2 { var __bjs_str_param2 = __bjs_unwrapped_param2 @@ -418,7 +418,7 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param2 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param2 ? 1 : 0) return Int32(2) } } @@ -444,31 +444,31 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) case .failure(let param0, let param1): _swift_js_push_tag(Int32(1)) let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(Int32(__bjs_unwrapped_param0)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param0)) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(__bjs_unwrapped_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param1 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(__bjs_unwrapped_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param0 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(Int32(__bjs_unwrapped_param1)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param1)) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) let __bjs_isSome_param2 = param2 != nil if let __bjs_unwrapped_param2 = param2 { var __bjs_str_param2 = __bjs_unwrapped_param2 @@ -476,7 +476,7 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param2 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param2 ? 1 : 0) } } } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift index 02a202268..0558e2a1f 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/Protocol.swift @@ -385,7 +385,7 @@ extension Result: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) } } @@ -410,7 +410,7 @@ extension Result: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) } } } @@ -433,8 +433,8 @@ public func _bjs_processDelegates() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -685,8 +685,8 @@ public func _bjs_DelegateManager_delegates_get(_ _self: UnsafeMutableRawPointer) #if arch(wasm32) let ret = DelegateManager.bridgeJSLiftParameter(_self).delegates for __bjs_elem_ret in ret { - _swift_js_push_int((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32((__bjs_elem_ret as! AnyMyViewControllerDelegate).bridgeJSLowerReturn())} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift index 6d1f56f50..378eff8bb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.Global.swift @@ -67,7 +67,7 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) } } @@ -92,7 +92,7 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) } } } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift index 6d1f56f50..378eff8bb 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/StaticFunctions.swift @@ -67,7 +67,7 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) } } @@ -92,7 +92,7 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) } } } diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift index feddadf15..415aa54f6 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftClosure.swift @@ -704,10 +704,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) case .flag(let param0): - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) return Int32(2) case .rate(let param0): _swift_js_push_f32(param0) @@ -740,10 +740,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) case .flag(let param0): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) case .rate(let param0): _swift_js_push_tag(Int32(3)) _swift_js_push_f32(param0) diff --git a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift index 35fbe039c..af4428979 100644 --- a/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift +++ b/Plugins/BridgeJS/Tests/BridgeJSToolTests/__Snapshots__/ExportSwiftTests/SwiftStruct.swift @@ -20,14 +20,14 @@ extension DataPoint: _BridgedSwiftStruct { } let __bjs_isSome_optCount = self.optCount != nil if let __bjs_unwrapped_optCount = self.optCount { - _swift_js_push_int(Int32(__bjs_unwrapped_optCount)) + _swift_js_push_i32(Int32(__bjs_unwrapped_optCount)) } - _swift_js_push_int(__bjs_isSome_optCount ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optCount ? 1 : 0) let __bjs_isSome_optFlag = self.optFlag != nil if let __bjs_unwrapped_optFlag = self.optFlag { - _swift_js_push_int(__bjs_unwrapped_optFlag ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_optFlag ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_optFlag ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optFlag ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -93,9 +93,9 @@ extension Address: _BridgedSwiftStruct { } let __bjs_isSome_zipCode = self.zipCode != nil if let __bjs_unwrapped_zipCode = self.zipCode { - _swift_js_push_int(Int32(__bjs_unwrapped_zipCode)) + _swift_js_push_i32(Int32(__bjs_unwrapped_zipCode)) } - _swift_js_push_int(__bjs_isSome_zipCode ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_zipCode ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -145,7 +145,7 @@ extension Person: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.age)) + _swift_js_push_i32(Int32(self.age)) self.address.bridgeJSLowerReturn() let __bjs_isSome_email = self.email != nil if let __bjs_unwrapped_email = self.email { @@ -154,7 +154,7 @@ extension Person: _BridgedSwiftStruct { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_email ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_email ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -198,7 +198,7 @@ extension Session: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) _swift_js_push_pointer(self.owner.bridgeJSLowerReturn()) } @@ -250,7 +250,7 @@ extension Measurement: _BridgedSwiftStruct { if let __bjs_unwrapped_optionalPrecision = self.optionalPrecision { _swift_js_push_f32(__bjs_unwrapped_optionalPrecision.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_optionalPrecision ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optionalPrecision ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { diff --git a/Plugins/PackageToJS/Templates/instantiate.js b/Plugins/PackageToJS/Templates/instantiate.js index 462df924b..54a7212c6 100644 --- a/Plugins/PackageToJS/Templates/instantiate.js +++ b/Plugins/PackageToJS/Templates/instantiate.js @@ -40,7 +40,7 @@ async function createInstantiator(options, swift) { swift_js_retain: unexpectedBjsCall, swift_js_release: unexpectedBjsCall, swift_js_push_tag: unexpectedBjsCall, - swift_js_push_int: unexpectedBjsCall, + swift_js_push_i32: unexpectedBjsCall, swift_js_push_f32: unexpectedBjsCall, swift_js_push_f64: unexpectedBjsCall, swift_js_push_string: unexpectedBjsCall, diff --git a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift index 0bf62648c..1e7893c82 100644 --- a/Sources/JavaScriptKit/BridgeJSIntrinsics.swift +++ b/Sources/JavaScriptKit/BridgeJSIntrinsics.swift @@ -425,10 +425,10 @@ where Self: RawRepresentable, RawValue: _BridgedSwiftTypeLoweredIntoSingleWasmCo #endif #if arch(wasm32) -@_extern(wasm, module: "bjs", name: "swift_js_push_int") -@_spi(BridgeJS) public func _swift_js_push_int(_ value: Int32) +@_extern(wasm, module: "bjs", name: "swift_js_push_i32") +@_spi(BridgeJS) public func _swift_js_push_i32(_ value: Int32) #else -@_spi(BridgeJS) public func _swift_js_push_int(_ value: Int32) { +@_spi(BridgeJS) public func _swift_js_push_i32(_ value: Int32) { _onlyAvailableOnWasm() } #endif @@ -1491,10 +1491,10 @@ extension Optional where Wrapped: _BridgedSwiftStruct { @_spi(BridgeJS) public consuming func bridgeJSLowerReturn() -> Void { switch consume self { case .none: - _swift_js_push_int(0) // Push only isSome=0 (no struct fields) + _swift_js_push_i32(0) // Push only isSome=0 (no struct fields) case .some(let value): value.bridgeJSLowerReturn() // Push all struct fields FIRST - _swift_js_push_int(1) // Then push isSome=1 LAST (so it's popped FIRST by JS) + _swift_js_push_i32(1) // Then push isSome=1 LAST (so it's popped FIRST by JS) } } } diff --git a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift index e9b2aa903..35a53805d 100644 --- a/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift +++ b/Tests/BridgeJSRuntimeTests/Generated/BridgeJS.swift @@ -1465,10 +1465,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } return Int32(0) case .failure(let param0): - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) return Int32(1) case .flag(let param0): - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) return Int32(2) case .rate(let param0): _swift_js_push_f32(param0) @@ -1501,10 +1501,10 @@ extension APIResult: _BridgedSwiftAssociatedValueEnum { } case .failure(let param0): _swift_js_push_tag(Int32(1)) - _swift_js_push_int(Int32(param0)) + _swift_js_push_i32(Int32(param0)) case .flag(let param0): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) + _swift_js_push_i32(param0 ? 1 : 0) case .rate(let param0): _swift_js_push_tag(Int32(3)) _swift_js_push_f32(param0) @@ -1554,7 +1554,7 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) case .location(let param0, let param1, let param2): _swift_js_push_f64(param0) @@ -1565,8 +1565,8 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { } return Int32(2) case .status(let param0, let param1, let param2): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -1578,10 +1578,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) return Int32(4) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -1626,7 +1626,7 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) case .location(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) _swift_js_push_f64(param0) @@ -1637,8 +1637,8 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { } case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(3)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -1650,10 +1650,10 @@ extension ComplexResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_f64(param2) case .comprehensive(let param0, let param1, let param2, let param3, let param4, let param5, let param6, let param7, let param8): _swift_js_push_tag(Int32(5)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(param1 ? 1 : 0) - _swift_js_push_int(Int32(param2)) - _swift_js_push_int(Int32(param3)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(param1 ? 1 : 0) + _swift_js_push_i32(Int32(param2)) + _swift_js_push_i32(Int32(param3)) _swift_js_push_f64(param4) _swift_js_push_f64(param5) var __bjs_param6 = param6 @@ -1703,11 +1703,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) case .status(let param0, let param1, let param2): - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -1740,11 +1740,11 @@ extension Utilities.Result: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) - _swift_js_push_int(param0 ? 1 : 0) - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(param0 ? 1 : 0) + _swift_js_push_i32(Int32(param1)) var __bjs_param2 = param2 __bjs_param2.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) @@ -1780,7 +1780,7 @@ extension API.NetworkingResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) return Int32(1) } } @@ -1809,7 +1809,7 @@ extension API.NetworkingResult: _BridgedSwiftAssociatedValueEnum { __bjs_param0.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(param1)) + _swift_js_push_i32(Int32(param1)) } } } @@ -1840,31 +1840,31 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) return Int32(0) case .failure(let param0, let param1): let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(Int32(__bjs_unwrapped_param0)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param0)) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(__bjs_unwrapped_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param1 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) return Int32(1) case .status(let param0, let param1, let param2): let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(__bjs_unwrapped_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param0 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(Int32(__bjs_unwrapped_param1)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param1)) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) let __bjs_isSome_param2 = param2 != nil if let __bjs_unwrapped_param2 = param2 { var __bjs_str_param2 = __bjs_unwrapped_param2 @@ -1872,7 +1872,7 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param2 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param2 ? 1 : 0) return Int32(2) } } @@ -1898,31 +1898,31 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) case .failure(let param0, let param1): _swift_js_push_tag(Int32(1)) let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(Int32(__bjs_unwrapped_param0)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param0)) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(__bjs_unwrapped_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param1 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) case .status(let param0, let param1, let param2): _swift_js_push_tag(Int32(2)) let __bjs_isSome_param0 = param0 != nil if let __bjs_unwrapped_param0 = param0 { - _swift_js_push_int(__bjs_unwrapped_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_param0 ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_param0 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param0 ? 1 : 0) let __bjs_isSome_param1 = param1 != nil if let __bjs_unwrapped_param1 = param1 { - _swift_js_push_int(Int32(__bjs_unwrapped_param1)) + _swift_js_push_i32(Int32(__bjs_unwrapped_param1)) } - _swift_js_push_int(__bjs_isSome_param1 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param1 ? 1 : 0) let __bjs_isSome_param2 = param2 != nil if let __bjs_unwrapped_param2 = param2 { var __bjs_str_param2 = __bjs_unwrapped_param2 @@ -1930,7 +1930,7 @@ extension APIOptionalResult: _BridgedSwiftAssociatedValueEnum { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_param2 ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_param2 ? 1 : 0) } } } @@ -2226,8 +2226,8 @@ extension Point: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.x)) - _swift_js_push_int(Int32(self.y)) + _swift_js_push_i32(Int32(self.x)) + _swift_js_push_i32(Int32(self.y)) } init(unsafelyCopying jsObject: JSObject) { @@ -2344,14 +2344,14 @@ extension DataPoint: _BridgedSwiftStruct { } let __bjs_isSome_optCount = self.optCount != nil if let __bjs_unwrapped_optCount = self.optCount { - _swift_js_push_int(Int32(__bjs_unwrapped_optCount)) + _swift_js_push_i32(Int32(__bjs_unwrapped_optCount)) } - _swift_js_push_int(__bjs_isSome_optCount ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optCount ? 1 : 0) let __bjs_isSome_optFlag = self.optFlag != nil if let __bjs_unwrapped_optFlag = self.optFlag { - _swift_js_push_int(__bjs_unwrapped_optFlag ? 1 : 0) + _swift_js_push_i32(__bjs_unwrapped_optFlag ? 1 : 0) } - _swift_js_push_int(__bjs_isSome_optFlag ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optFlag ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2417,9 +2417,9 @@ extension Address: _BridgedSwiftStruct { } let __bjs_isSome_zipCode = self.zipCode != nil if let __bjs_unwrapped_zipCode = self.zipCode { - _swift_js_push_int(Int32(__bjs_unwrapped_zipCode)) + _swift_js_push_i32(Int32(__bjs_unwrapped_zipCode)) } - _swift_js_push_int(__bjs_isSome_zipCode ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_zipCode ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2470,7 +2470,7 @@ extension Contact: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.age)) + _swift_js_push_i32(Int32(self.age)) self.address.bridgeJSLowerReturn() let __bjs_isSome_email = self.email != nil if let __bjs_unwrapped_email = self.email { @@ -2479,12 +2479,12 @@ extension Contact: _BridgedSwiftStruct { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_email ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_email ? 1 : 0) let __bjs_isSome_secondaryAddress = self.secondaryAddress != nil if let __bjs_unwrapped_secondaryAddress = self.secondaryAddress { __bjs_unwrapped_secondaryAddress.bridgeJSLowerReturn() } - _swift_js_push_int(__bjs_isSome_secondaryAddress ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_secondaryAddress ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2541,13 +2541,13 @@ extension Config: _BridgedSwiftStruct { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_theme ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_theme ? 1 : 0) let __bjs_isSome_direction = self.direction != nil if let __bjs_unwrapped_direction = self.direction { - _swift_js_push_int(__bjs_unwrapped_direction.bridgeJSLowerParameter()) + _swift_js_push_i32(__bjs_unwrapped_direction.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_direction ? 1 : 0) - _swift_js_push_int(Int32(self.status.bridgeJSLowerParameter())) + _swift_js_push_i32(__bjs_isSome_direction ? 1 : 0) + _swift_js_push_i32(Int32(self.status.bridgeJSLowerParameter())) } init(unsafelyCopying jsObject: JSObject) { @@ -2591,12 +2591,12 @@ extension SessionData: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) let __bjs_isSome_owner = self.owner != nil if let __bjs_unwrapped_owner = self.owner { _swift_js_push_pointer(__bjs_unwrapped_owner.bridgeJSLowerReturn()) } - _swift_js_push_int(__bjs_isSome_owner ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_owner ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2642,18 +2642,18 @@ extension ValidationReport: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) self.result.bridgeJSLowerReturn() let __bjs_isSome_status = self.status != nil if let __bjs_unwrapped_status = self.status { - _swift_js_push_int(__bjs_unwrapped_status.bridgeJSLowerParameter()) + _swift_js_push_i32(__bjs_unwrapped_status.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_status ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_status ? 1 : 0) let __bjs_isSome_outcome = self.outcome != nil if let __bjs_unwrapped_outcome = self.outcome { - _swift_js_push_int(__bjs_unwrapped_outcome.bridgeJSLowerParameter()) + _swift_js_push_i32(__bjs_unwrapped_outcome.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_outcome ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_outcome ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2705,38 +2705,38 @@ extension AdvancedConfig: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) var __bjs_title = self.title __bjs_title.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(self.enabled ? 1 : 0) + _swift_js_push_i32(self.enabled ? 1 : 0) var __bjs_theme = self.theme.rawValue __bjs_theme.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.status.bridgeJSLowerParameter())) + _swift_js_push_i32(Int32(self.status.bridgeJSLowerParameter())) let __bjs_isSome_result = self.result != nil if let __bjs_unwrapped_result = self.result { - _swift_js_push_int(__bjs_unwrapped_result.bridgeJSLowerParameter()) + _swift_js_push_i32(__bjs_unwrapped_result.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_result ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_result ? 1 : 0) let __bjs_isSome_metadata = self.metadata != nil if let __bjs_unwrapped_metadata = self.metadata { - _swift_js_push_int(__bjs_unwrapped_metadata.bridgeJSLowerReturn()) + _swift_js_push_i32(__bjs_unwrapped_metadata.bridgeJSLowerReturn()) } - _swift_js_push_int(__bjs_isSome_metadata ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_metadata ? 1 : 0) let __bjs_isSome_location = self.location != nil if let __bjs_unwrapped_location = self.location { __bjs_unwrapped_location.bridgeJSLowerReturn() } - _swift_js_push_int(__bjs_isSome_location ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_location ? 1 : 0) self.defaults.bridgeJSLowerReturn() let __bjs_isSome_overrideDefaults = self.overrideDefaults != nil if let __bjs_unwrapped_overrideDefaults = self.overrideDefaults { __bjs_unwrapped_overrideDefaults.bridgeJSLowerReturn() } - _swift_js_push_int(__bjs_isSome_overrideDefaults ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_overrideDefaults ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2788,12 +2788,12 @@ extension MeasurementConfig: _BridgedSwiftStruct { if let __bjs_unwrapped_optionalPrecision = self.optionalPrecision { _swift_js_push_f32(__bjs_unwrapped_optionalPrecision.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_optionalPrecision ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optionalPrecision ? 1 : 0) let __bjs_isSome_optionalRatio = self.optionalRatio != nil if let __bjs_unwrapped_optionalRatio = self.optionalRatio { _swift_js_push_f64(__bjs_unwrapped_optionalRatio.bridgeJSLowerParameter()) } - _swift_js_push_int(__bjs_isSome_optionalRatio ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_optionalRatio ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2924,7 +2924,7 @@ extension CopyableCart: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.x)) + _swift_js_push_i32(Int32(self.x)) let __bjs_isSome_note = self.note != nil if let __bjs_unwrapped_note = self.note { var __bjs_str_note = __bjs_unwrapped_note @@ -2932,7 +2932,7 @@ extension CopyableCart: _BridgedSwiftStruct { _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } } - _swift_js_push_int(__bjs_isSome_note ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_note ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -2991,7 +2991,7 @@ extension CopyableCartItem: _BridgedSwiftStruct { __bjs_sku.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.quantity)) + _swift_js_push_i32(Int32(self.quantity)) } init(unsafelyCopying jsObject: JSObject) { @@ -3036,13 +3036,13 @@ extension CopyableNestedCart: _BridgedSwiftStruct { } @_spi(BridgeJS) @_transparent public consuming func bridgeJSLowerReturn() { - _swift_js_push_int(Int32(self.id)) + _swift_js_push_i32(Int32(self.id)) self.item.bridgeJSLowerReturn() let __bjs_isSome_shippingAddress = self.shippingAddress != nil if let __bjs_unwrapped_shippingAddress = self.shippingAddress { __bjs_unwrapped_shippingAddress.bridgeJSLowerReturn() } - _swift_js_push_int(__bjs_isSome_shippingAddress ? 1 : 0) + _swift_js_push_i32(__bjs_isSome_shippingAddress ? 1 : 0) } init(unsafelyCopying jsObject: JSObject) { @@ -3101,7 +3101,7 @@ extension ConfigStruct: _BridgedSwiftStruct { __bjs_name.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) } - _swift_js_push_int(Int32(self.value)) + _swift_js_push_i32(Int32(self.value)) } init(unsafelyCopying jsObject: JSObject) { @@ -4676,8 +4676,8 @@ public func _bjs_roundTripIntArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4702,7 +4702,7 @@ public func _bjs_roundTripStringArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4724,7 +4724,7 @@ public func _bjs_roundTripDoubleArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_f64(__bjs_elem_ret)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4745,8 +4745,8 @@ public func _bjs_roundTripBoolArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(__bjs_elem_ret ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_elem_ret ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4767,8 +4767,8 @@ public func _bjs_roundTripDirectionArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4789,8 +4789,8 @@ public func _bjs_roundTripStatusArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4815,7 +4815,7 @@ public func _bjs_roundTripThemeArray() -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4836,8 +4836,8 @@ public func _bjs_roundTripHttpStatusArray() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4859,7 +4859,7 @@ public func _bjs_roundTripDataPointArray() -> Void { }()) for __bjs_elem_ret in ret { __bjs_elem_ret.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4881,7 +4881,7 @@ public func _bjs_roundTripGreeterArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4904,9 +4904,9 @@ public func _bjs_roundTripOptionalIntArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_unwrapped_ret_elem))} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret_elem))} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4933,8 +4933,8 @@ public func _bjs_roundTripOptionalStringArray() -> Void { __bjs_str_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4958,8 +4958,8 @@ public func _bjs_roundTripOptionalDataPointArray() -> Void { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { __bjs_unwrapped_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -4982,9 +4982,9 @@ public func _bjs_roundTripOptionalDirectionArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5007,9 +5007,9 @@ public func _bjs_roundTripOptionalStatusArray() -> Void { for __bjs_elem_ret in ret { let __bjs_isSome_ret_elem = __bjs_elem_ret != nil if let __bjs_unwrapped_ret_elem = __bjs_elem_ret { - _swift_js_push_int(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} - _swift_js_push_int(__bjs_isSome_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_unwrapped_ret_elem.bridgeJSLowerParameter())} + _swift_js_push_i32(__bjs_isSome_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5038,9 +5038,9 @@ public func _bjs_roundTripOptionalIntArrayType(_ values: Int32) -> Void { let __bjs_isSome_ret = ret != nil if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { - _swift_js_push_int(Int32(__bjs_elem_ret))} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_elem_ret))} + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -5073,8 +5073,8 @@ public func _bjs_roundTripOptionalStringArrayType(_ values: Int32) -> Void { __bjs_ret_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -5104,8 +5104,8 @@ public func _bjs_roundTripOptionalGreeterArrayType(_ greeters: Int32) -> Void { if let __bjs_unwrapped_ret = ret { for __bjs_elem_ret in __bjs_unwrapped_ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(__bjs_unwrapped_ret.count))} - _swift_js_push_int(__bjs_isSome_ret ? 1 : 0) + _swift_js_push_i32(Int32(__bjs_unwrapped_ret.count))} + _swift_js_push_i32(__bjs_isSome_ret ? 1 : 0) #else fatalError("Only available on WebAssembly") #endif @@ -5136,9 +5136,9 @@ public func _bjs_roundTripNestedIntArray() -> Void { }()) for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_elem_ret_elem))} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret_elem))} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5173,8 +5173,8 @@ public func _bjs_roundTripNestedStringArray() -> Void { __bjs_ret_elem_elem.withUTF8 { ptr in _swift_js_push_string(ptr.baseAddress, Int32(ptr.count)) }} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5206,8 +5206,8 @@ public func _bjs_roundTripNestedDoubleArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_f64(__bjs_elem_ret_elem)} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5238,9 +5238,9 @@ public func _bjs_roundTripNestedBoolArray() -> Void { }()) for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(__bjs_elem_ret_elem ? 1 : 0)} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(__bjs_elem_ret_elem ? 1 : 0)} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5272,8 +5272,8 @@ public func _bjs_roundTripNestedDataPointArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { __bjs_elem_ret_elem.bridgeJSLowerReturn()} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5304,9 +5304,9 @@ public func _bjs_roundTripNestedDirectionArray() -> Void { }()) for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { - _swift_js_push_int(Int32(__bjs_elem_ret_elem.bridgeJSLowerParameter()))} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret_elem.bridgeJSLowerParameter()))} + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5338,8 +5338,8 @@ public func _bjs_roundTripNestedGreeterArray() -> Void { for __bjs_elem_ret in ret { for __bjs_elem_ret_elem in __bjs_elem_ret { _swift_js_push_pointer(__bjs_elem_ret_elem.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(__bjs_elem_ret.count))} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(__bjs_elem_ret.count))} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5361,7 +5361,7 @@ public func _bjs_roundTripUnsafeRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5383,7 +5383,7 @@ public func _bjs_roundTripUnsafeMutableRawPointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5405,7 +5405,7 @@ public func _bjs_roundTripOpaquePointerArray() -> Void { }()) for __bjs_elem_ret in ret { _swift_js_push_pointer(__bjs_elem_ret.bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif @@ -5446,8 +5446,8 @@ public func _bjs_roundTripDataProcessorArrayType() -> Void { return __result }()) for __bjs_elem_ret in ret { - _swift_js_push_int((__bjs_elem_ret as! AnyDataProcessor).bridgeJSLowerReturn())} - _swift_js_push_int(Int32(ret.count)) + _swift_js_push_i32((__bjs_elem_ret as! AnyDataProcessor).bridgeJSLowerReturn())} + _swift_js_push_i32(Int32(ret.count)) #else fatalError("Only available on WebAssembly") #endif