From c425ed1415d234961b668924d65a27d90683efc4 Mon Sep 17 00:00:00 2001 From: Tsahi Zidenberg Date: Thu, 5 Oct 2023 20:45:02 -0600 Subject: [PATCH] stub-out js_finalize_ref --- arbitrator/jit/src/syscall.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/arbitrator/jit/src/syscall.rs b/arbitrator/jit/src/syscall.rs index 6918d093a..ed1166ed9 100644 --- a/arbitrator/jit/src/syscall.rs +++ b/arbitrator/jit/src/syscall.rs @@ -261,18 +261,13 @@ fn get_field(env: &mut WasmEnv, source: u32, field: &[u8]) -> GoValue { } /// go side: λ(v value) +// TODO: implement ref counting pub fn js_finalize_ref(mut env: WasmEnvMut, sp: u32) { - let (mut sp, env) = GoStack::new(sp, &mut env); - let pool = &mut env.js_state.pool; + let (mut sp, _) = GoStack::new(sp, &mut env); let val = JsValue::new(sp.read_u64()); match val { - JsValue::Ref(x) if x < DYNAMIC_OBJECT_ID_BASE => {} - JsValue::Ref(x) => { - if pool.remove(x).is_none() { - eprintln!("Go trying to finalize unknown ref {}", x); - } - } + JsValue::Ref(_) => {} val => eprintln!("Go trying to finalize {:?}", val), } }