@@ -2158,6 +2158,57 @@ fileprivate func bjs_benchmarkRunner(_ name: Int32, _ body: Int32) -> Void {
21582158}
21592159#endif
21602160
2161+ func _$benchmarkRunner( _ name: String , _ body: JSObject ) throws ( JSException) -> Void {
2162+ let nameValue = name. bridgeJSLowerParameter ( )
2163+ let bodyValue = body. bridgeJSLowerParameter ( )
2164+ bjs_benchmarkRunner ( nameValue, bodyValue)
2165+ if let error = _swift_js_take_exception ( ) {
2166+ throw error
2167+ }
2168+ }
2169+
2170+ #if arch(wasm32)
2171+ @_extern ( wasm, module: " Benchmarks " , name: " bjs_benchmarkHelperNoop " )
2172+ fileprivate func bjs_benchmarkHelperNoop( ) -> Void
2173+ #else
2174+ fileprivate func bjs_benchmarkHelperNoop( ) -> Void {
2175+ fatalError ( " Only available on WebAssembly " )
2176+ }
2177+ #endif
2178+
2179+ func _$benchmarkHelperNoop( ) throws ( JSException) -> Void {
2180+ bjs_benchmarkHelperNoop ( )
2181+ if let error = _swift_js_take_exception ( ) {
2182+ throw error
2183+ }
2184+ }
2185+
2186+ #if arch(wasm32)
2187+ @_extern ( wasm, module: " Benchmarks " , name: " bjs_benchmarkHelperNoopWithNumber " )
2188+ fileprivate func bjs_benchmarkHelperNoopWithNumber( _ n: Float64 ) -> Void
2189+ #else
2190+ fileprivate func bjs_benchmarkHelperNoopWithNumber( _ n: Float64 ) -> Void {
2191+ fatalError ( " Only available on WebAssembly " )
2192+ }
2193+ #endif
2194+
2195+ func _$benchmarkHelperNoopWithNumber( _ n: Double ) throws ( JSException) -> Void {
2196+ let nValue = n. bridgeJSLowerParameter ( )
2197+ bjs_benchmarkHelperNoopWithNumber ( nValue)
2198+ if let error = _swift_js_take_exception ( ) {
2199+ throw error
2200+ }
2201+ }
2202+
2203+ #if arch(wasm32)
2204+ @_extern ( wasm, module: " Benchmarks " , name: " bjs_benchmarkRunner " )
2205+ fileprivate func bjs_benchmarkRunner( _ name: Int32 , _ body: Int32 ) -> Void
2206+ #else
2207+ fileprivate func bjs_benchmarkRunner( _ name: Int32 , _ body: Int32 ) -> Void {
2208+ fatalError ( " Only available on WebAssembly " )
2209+ }
2210+ #endif
2211+
21612212func _$benchmarkRunner( _ name: String , _ body: JSObject ) throws ( JSException) -> Void {
21622213 let nameValue = name. bridgeJSLowerParameter ( )
21632214 let bodyValue = body. bridgeJSLowerParameter ( )
0 commit comments