Don't store Arc<VMInterrupts> in instances

Similar to other data structures owned by the `Store` there's no need
for `Instance` to have a strong `Arc` reference, instead it's sufficient
for `Store` to have the owning reference.
This commit is contained in:
Alex Crichton
2020-10-20 22:23:35 -07:00
parent 76998f0404
commit 04e85b044e
6 changed files with 9 additions and 14 deletions

View File

@@ -453,8 +453,8 @@ impl<'a> CallThreadState<'a> {
UnwindReason::JitTrap { backtrace, pc } => {
debug_assert_eq!(ret, 0);
let maybe_interrupted = unsafe {
(*self.vmctx).instance().interrupts.stack_limit.load(SeqCst)
== wasmtime_environ::INTERRUPTED
let interrupts = (*self.vmctx).instance().interrupts();
(**interrupts).stack_limit.load(SeqCst) == wasmtime_environ::INTERRUPTED
};
Err(Trap::Jit {
pc,