File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
IntegrationTests/TestSuites/Sources/BenchmarkTests
Sources/JavaScriptKit/BasicObjects Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Benchmark {
66 }
77
88 let title : String
9- let runner : JSFunctionRef = JSObjectRef . global. benchmarkRunner. function!
9+ let runner = JSObject . global. benchmarkRunner. function!
1010
1111 func testSuite( _ name: String , _ body: @escaping ( ) -> Void ) {
1212 let jsBody = JSClosure { arguments -> JSValue in
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let serialization = Benchmark("Serialization")
55let swiftInt : Double = 42
66serialization. testSuite ( " Swift Int to JavaScript " ) {
77 let jsNumber = JSValue . number ( swiftInt)
8- let object = JSObjectRef . global
8+ let object = JSObject . global
99 for i in 0 ..< 100 {
1010 object [ " numberValue \( i) " ] = jsNumber
1111 }
@@ -14,15 +14,15 @@ serialization.testSuite("Swift Int to JavaScript") {
1414let swiftString = " Hello, world "
1515serialization. testSuite ( " Swift String to JavaScript " ) {
1616 let jsString = JSValue . string ( swiftString)
17- let object = JSObjectRef . global
17+ let object = JSObject . global
1818 for i in 0 ..< 100 {
1919 object [ " stringValue \( i) " ] = jsString
2020 }
2121}
2222
2323let objectHeap = Benchmark ( " Object heap " )
2424
25- let global = JSObjectRef . global
25+ let global = JSObject . global
2626let Object = global. Object. function!
2727global. objectHeapDummy = . object( Object . new ( ) )
2828objectHeap. testSuite ( " Increment and decrement RC " ) {
Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ extension UInt32: TypedArrayElement {
118118
119119// FIXME: Support passing BigInts across the bridge
120120//extension Int64: TypedArrayElement {
121- // public static var typedArrayClass: JSFunctionRef { JSObjectRef .global.BigInt64Array.function! }
121+ // public static var typedArrayClass: JSFunction { JSObject .global.BigInt64Array.function! }
122122// public static var type: JavaScriptTypedArrayKind { .bigInt64 }
123123//}
124124//extension UInt64: TypedArrayElement {
125- // public static var typedArrayClass: JSFunctionRef { JSObjectRef .global.BigUint64Array.function! }
125+ // public static var typedArrayClass: JSFunction { JSObject .global.BigUint64Array.function! }
126126// public static var type: JavaScriptTypedArrayKind { .bigUint64 }
127127//}
128128
You can’t perform that action at this time.
0 commit comments