Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 0 additions & 58 deletions Benchmarks/Sources/Generated/BridgeJS.ImportTS.swift

This file was deleted.

13 changes: 13 additions & 0 deletions Benchmarks/Sources/Generated/BridgeJS.Macros.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// `swift package bridge-js`.

import JavaScriptKit

@JSFunction func benchmarkHelperNoop() throws (JSException) -> Void

@JSFunction func benchmarkHelperNoopWithNumber(_ n: Double) throws (JSException) -> Void

@JSFunction func benchmarkRunner(_ name: String, _ body: JSObject) throws (JSException) -> Void
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// bridge-js: skip
// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
Expand Down Expand Up @@ -1172,4 +1173,64 @@ fileprivate func _bjs_ClassRoundtrip_wrap(_ pointer: UnsafeMutableRawPointer) ->
fileprivate func _bjs_ClassRoundtrip_wrap(_ pointer: UnsafeMutableRawPointer) -> Int32 {
fatalError("Only available on WebAssembly")
}
#endif
#endif

// bridge-js: skip
// NOTICE: This is auto-generated code by BridgeJS from JavaScriptKit,
// DO NOT EDIT.
//
// To update this file, just rebuild your project or run
// `swift package bridge-js`.

@_spi(BridgeJS) import JavaScriptKit

#if arch(wasm32)
@_extern(wasm, module: "Benchmarks", name: "bjs_benchmarkHelperNoop")
fileprivate func bjs_benchmarkHelperNoop() -> Void
#else
fileprivate func bjs_benchmarkHelperNoop() -> Void {
fatalError("Only available on WebAssembly")
}
#endif

func _$benchmarkHelperNoop() throws(JSException) -> Void {
bjs_benchmarkHelperNoop()
if let error = _swift_js_take_exception() {
throw error
}
}

#if arch(wasm32)
@_extern(wasm, module: "Benchmarks", name: "bjs_benchmarkHelperNoopWithNumber")
fileprivate func bjs_benchmarkHelperNoopWithNumber(_ n: Float64) -> Void
#else
fileprivate func bjs_benchmarkHelperNoopWithNumber(_ n: Float64) -> Void {
fatalError("Only available on WebAssembly")
}
#endif

func _$benchmarkHelperNoopWithNumber(_ n: Double) throws(JSException) -> Void {
let nValue = n.bridgeJSLowerParameter()
bjs_benchmarkHelperNoopWithNumber(nValue)
if let error = _swift_js_take_exception() {
throw error
}
}

#if arch(wasm32)
@_extern(wasm, module: "Benchmarks", name: "bjs_benchmarkRunner")
fileprivate func bjs_benchmarkRunner(_ name: Int32, _ body: Int32) -> Void
#else
fileprivate func bjs_benchmarkRunner(_ name: Int32, _ body: Int32) -> Void {
fatalError("Only available on WebAssembly")
}
#endif

func _$benchmarkRunner(_ name: String, _ body: JSObject) throws(JSException) -> Void {
let nameValue = name.bridgeJSLowerParameter()
let bodyValue = body.bridgeJSLowerParameter()
bjs_benchmarkRunner(nameValue, bodyValue)
if let error = _swift_js_take_exception() {
throw error
}
}
Loading
Loading