File tree 3 files changed +6
-6
lines changed
IntegrationTests/TestSuites/Sources/BenchmarkTests
Sources/JavaScriptKit/BasicObjects
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Benchmark {
6
6
}
7
7
8
8
let title : String
9
- let runner : JSFunctionRef = JSObjectRef . global. benchmarkRunner. function!
9
+ let runner = JSObject . global. benchmarkRunner. function!
10
10
11
11
func testSuite( _ name: String , _ body: @escaping ( ) -> Void ) {
12
12
let jsBody = JSClosure { arguments -> JSValue in
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ let serialization = Benchmark("Serialization")
5
5
let swiftInt : Double = 42
6
6
serialization. testSuite ( " Swift Int to JavaScript " ) {
7
7
let jsNumber = JSValue . number ( swiftInt)
8
- let object = JSObjectRef . global
8
+ let object = JSObject . global
9
9
for i in 0 ..< 100 {
10
10
object [ " numberValue \( i) " ] = jsNumber
11
11
}
@@ -14,15 +14,15 @@ serialization.testSuite("Swift Int to JavaScript") {
14
14
let swiftString = " Hello, world "
15
15
serialization. testSuite ( " Swift String to JavaScript " ) {
16
16
let jsString = JSValue . string ( swiftString)
17
- let object = JSObjectRef . global
17
+ let object = JSObject . global
18
18
for i in 0 ..< 100 {
19
19
object [ " stringValue \( i) " ] = jsString
20
20
}
21
21
}
22
22
23
23
let objectHeap = Benchmark ( " Object heap " )
24
24
25
- let global = JSObjectRef . global
25
+ let global = JSObject . global
26
26
let Object = global. Object. function!
27
27
global. objectHeapDummy = . object( Object . new ( ) )
28
28
objectHeap. testSuite ( " Increment and decrement RC " ) {
Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ extension UInt32: TypedArrayElement {
118
118
119
119
// FIXME: Support passing BigInts across the bridge
120
120
//extension Int64: TypedArrayElement {
121
- // public static var typedArrayClass: JSFunctionRef { JSObjectRef .global.BigInt64Array.function! }
121
+ // public static var typedArrayClass: JSFunction { JSObject .global.BigInt64Array.function! }
122
122
// public static var type: JavaScriptTypedArrayKind { .bigInt64 }
123
123
//}
124
124
//extension UInt64: TypedArrayElement {
125
- // public static var typedArrayClass: JSFunctionRef { JSObjectRef .global.BigUint64Array.function! }
125
+ // public static var typedArrayClass: JSFunction { JSObject .global.BigUint64Array.function! }
126
126
// public static var type: JavaScriptTypedArrayKind { .bigUint64 }
127
127
//}
128
128
You can’t perform that action at this time.
0 commit comments