@@ -228,20 +228,8 @@ public func _bjs_processOpaquePointerArray() -> Void {
228228@_cdecl ( " bjs_processOptionalIntArray " )
229229public func _bjs_processOptionalIntArray( ) -> Void {
230230 #if arch(wasm32)
231- let ret = processOptionalIntArray ( _: {
232- let __count = Int ( _swift_js_pop_i32 ( ) )
233- var __result : [ Optional < Int > ] = [ ]
234- __result. reserveCapacity ( __count)
235- for _ in 0 ..< __count {
236- __result. append ( Optional< Int> . bridgeJSStackPop( ) )
237- }
238- __result. reverse ( )
239- return __result
240- } ( ) )
241- for __bjs_elem_ret in ret {
242- __bjs_elem_ret. bridgeJSStackPush ( )
243- }
244- _swift_js_push_i32 ( Int32 ( ret. count) )
231+ let ret = processOptionalIntArray ( _: [ Optional < Int > ] . bridgeJSStackPop ( ) )
232+ ret. bridgeJSStackPush ( )
245233 #else
246234 fatalError ( " Only available on WebAssembly " )
247235 #endif
@@ -251,20 +239,8 @@ public func _bjs_processOptionalIntArray() -> Void {
251239@_cdecl ( " bjs_processOptionalStringArray " )
252240public func _bjs_processOptionalStringArray( ) -> Void {
253241 #if arch(wasm32)
254- let ret = processOptionalStringArray ( _: {
255- let __count = Int ( _swift_js_pop_i32 ( ) )
256- var __result : [ Optional < String > ] = [ ]
257- __result. reserveCapacity ( __count)
258- for _ in 0 ..< __count {
259- __result. append ( Optional< String> . bridgeJSStackPop( ) )
260- }
261- __result. reverse ( )
262- return __result
263- } ( ) )
264- for __bjs_elem_ret in ret {
265- __bjs_elem_ret. bridgeJSStackPush ( )
266- }
267- _swift_js_push_i32 ( Int32 ( ret. count) )
242+ let ret = processOptionalStringArray ( _: [ Optional < String > ] . bridgeJSStackPop ( ) )
243+ ret. bridgeJSStackPush ( )
268244 #else
269245 fatalError ( " Only available on WebAssembly " )
270246 #endif
@@ -285,20 +261,8 @@ public func _bjs_processOptionalArray() -> Void {
285261@_cdecl ( " bjs_processOptionalPointArray " )
286262public func _bjs_processOptionalPointArray( ) -> Void {
287263 #if arch(wasm32)
288- let ret = processOptionalPointArray ( _: {
289- let __count = Int ( _swift_js_pop_i32 ( ) )
290- var __result : [ Optional < Point > ] = [ ]
291- __result. reserveCapacity ( __count)
292- for _ in 0 ..< __count {
293- __result. append ( Optional< Point> . bridgeJSStackPop( ) )
294- }
295- __result. reverse ( )
296- return __result
297- } ( ) )
298- for __bjs_elem_ret in ret {
299- __bjs_elem_ret. bridgeJSStackPush ( )
300- }
301- _swift_js_push_i32 ( Int32 ( ret. count) )
264+ let ret = processOptionalPointArray ( _: [ Optional < Point > ] . bridgeJSStackPop ( ) )
265+ ret. bridgeJSStackPush ( )
302266 #else
303267 fatalError ( " Only available on WebAssembly " )
304268 #endif
@@ -308,20 +272,8 @@ public func _bjs_processOptionalPointArray() -> Void {
308272@_cdecl ( " bjs_processOptionalDirectionArray " )
309273public func _bjs_processOptionalDirectionArray( ) -> Void {
310274 #if arch(wasm32)
311- let ret = processOptionalDirectionArray ( _: {
312- let __count = Int ( _swift_js_pop_i32 ( ) )
313- var __result : [ Optional < Direction > ] = [ ]
314- __result. reserveCapacity ( __count)
315- for _ in 0 ..< __count {
316- __result. append ( Optional< Direction> . bridgeJSStackPop( ) )
317- }
318- __result. reverse ( )
319- return __result
320- } ( ) )
321- for __bjs_elem_ret in ret {
322- __bjs_elem_ret. bridgeJSStackPush ( )
323- }
324- _swift_js_push_i32 ( Int32 ( ret. count) )
275+ let ret = processOptionalDirectionArray ( _: [ Optional < Direction > ] . bridgeJSStackPop ( ) )
276+ ret. bridgeJSStackPush ( )
325277 #else
326278 fatalError ( " Only available on WebAssembly " )
327279 #endif
@@ -331,20 +283,8 @@ public func _bjs_processOptionalDirectionArray() -> Void {
331283@_cdecl ( " bjs_processOptionalStatusArray " )
332284public func _bjs_processOptionalStatusArray( ) -> Void {
333285 #if arch(wasm32)
334- let ret = processOptionalStatusArray ( _: {
335- let __count = Int ( _swift_js_pop_i32 ( ) )
336- var __result : [ Optional < Status > ] = [ ]
337- __result. reserveCapacity ( __count)
338- for _ in 0 ..< __count {
339- __result. append ( Optional< Status> . bridgeJSStackPop( ) )
340- }
341- __result. reverse ( )
342- return __result
343- } ( ) )
344- for __bjs_elem_ret in ret {
345- __bjs_elem_ret. bridgeJSStackPush ( )
346- }
347- _swift_js_push_i32 ( Int32 ( ret. count) )
286+ let ret = processOptionalStatusArray ( _: [ Optional < Status > ] . bridgeJSStackPop ( ) )
287+ ret. bridgeJSStackPush ( )
348288 #else
349289 fatalError ( " Only available on WebAssembly " )
350290 #endif
@@ -420,20 +360,8 @@ public func _bjs_processJSObjectArray() -> Void {
420360@_cdecl ( " bjs_processOptionalJSObjectArray " )
421361public func _bjs_processOptionalJSObjectArray( ) -> Void {
422362 #if arch(wasm32)
423- let ret = processOptionalJSObjectArray ( _: {
424- let __count = Int ( _swift_js_pop_i32 ( ) )
425- var __result : [ Optional < JSObject > ] = [ ]
426- __result. reserveCapacity ( __count)
427- for _ in 0 ..< __count {
428- __result. append ( Optional< JSObject> . bridgeJSStackPop( ) )
429- }
430- __result. reverse ( )
431- return __result
432- } ( ) )
433- for __bjs_elem_ret in ret {
434- __bjs_elem_ret. bridgeJSStackPush ( )
435- }
436- _swift_js_push_i32 ( Int32 ( ret. count) )
363+ let ret = processOptionalJSObjectArray ( _: [ Optional < JSObject > ] . bridgeJSStackPop ( ) )
364+ ret. bridgeJSStackPush ( )
437365 #else
438366 fatalError ( " Only available on WebAssembly " )
439367 #endif
0 commit comments