@@ -4,7 +4,7 @@ import _CWasmKit
44///
55/// Each new invocation through exported function has a separate ``Execution``
66/// even though the invocation happens during another invocation.
7- struct Execution : ~ Copyable {
7+ struct Execution {
88 /// The reference to the ``Store`` associated with the execution.
99 let store : StoreRef
1010 /// The end of the VM stack space.
@@ -14,13 +14,6 @@ struct Execution: ~Copyable {
1414 /// - Note: If the trap is set, it must be released manually.
1515 private var trap : ( error: UnsafeRawPointer , sp: Sp ) ? = nil
1616
17- #if WasmDebuggingSupport
18- package init ( store: StoreRef , stackEnd: UnsafeMutablePointer < StackSlot > ) {
19- self . store = store
20- self . stackEnd = stackEnd
21- }
22- #endif
23-
2417 /// Executes the given closure with a new execution state associated with
2518 /// the given ``Store`` instance.
2619 static func with< T> (
@@ -68,15 +61,18 @@ struct Execution: ~Copyable {
6861
6962 static func captureBacktrace( sp: Sp , store: Store ) -> Backtrace {
7063 var frames = FrameIterator ( sp: sp)
71- var symbols : [ Backtrace . Symbol ] = [ ]
72-
64+ var symbols : [ Backtrace . Symbol ? ] = [ ]
7365 while let frame = frames. next ( ) {
7466 guard let function = frame. function else {
75- symbols. append ( . init ( name : nil , address : frame . pc ) )
67+ symbols. append ( nil )
7668 continue
7769 }
7870 let symbolName = store. nameRegistry. symbolicate ( . wasm( function) )
79- symbols. append ( . init( name: symbolName, address: frame. pc) )
71+ symbols. append (
72+ Backtrace . Symbol (
73+ name: symbolName
74+ )
75+ )
8076 }
8177 return Backtrace ( symbols: symbols)
8278 }
@@ -252,7 +248,7 @@ extension Sp {
252248 nonmutating set { self [ - 1 ] = UInt64 ( UInt ( bitPattern: newValue) ) }
253249 }
254250
255- var currentInstance : InternalInstance ? {
251+ fileprivate var currentInstance : InternalInstance ? {
256252 currentFunction? . instance
257253 }
258254}
0 commit comments