Lines Matching refs:scope
331 let mut scope = RootScope::new(cx); in wasmtime_anyref_from_raw() localVariable
333 AnyRef::from_raw(&mut scope, raw).map(|a| a.to_owned_rooted(&mut scope).expect("in scope")); in wasmtime_anyref_from_raw()
343 let mut scope = RootScope::new(cx); in wasmtime_anyref_from_i31() localVariable
344 let anyref = AnyRef::from_i31(&mut scope, I31::wrapping_u32(val)); in wasmtime_anyref_from_i31()
345 let anyref = anyref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_anyref_from_i31()
405 let mut scope = RootScope::new(cx); in wasmtime_externref_new() localVariable
406 let e = match ExternRef::new(&mut scope, crate::ForeignData { data, finalizer }) { in wasmtime_externref_new()
410 let e = e.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_externref_new()
465 let mut scope = RootScope::new(cx); in wasmtime_externref_from_raw() localVariable
466 let rooted = ExternRef::from_raw(&mut scope, raw) in wasmtime_externref_from_raw()
467 .map(|e| e.to_owned_rooted(&mut scope).expect("in scope")); in wasmtime_externref_from_raw()
522 let mut scope = RootScope::new(cx); in wasmtime_eqref_from_i31() localVariable
523 let eqref = EqRef::from_i31(&mut scope, I31::wrapping_u32(val)); in wasmtime_eqref_from_i31()
524 let eqref = eqref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_eqref_from_i31()
545 let mut scope = RootScope::new(cx); in wasmtime_eqref_i31_get_u() localVariable
547 if let Some(val) = eqref.as_i31(&mut scope).expect("in scope") { in wasmtime_eqref_i31_get_u()
561 let mut scope = RootScope::new(cx); in wasmtime_eqref_i31_get_s() localVariable
563 if let Some(val) = eqref.as_i31(&mut scope).expect("in scope") { in wasmtime_eqref_i31_get_s()
642 let mut scope = RootScope::new(&mut cx); in wasmtime_structref_new() localVariable
643 let vals: Vec<Val> = c_fields.iter().map(|v| v.to_val(&mut scope)).collect(); in wasmtime_structref_new()
644 match StructRef::new(&mut scope, &pre.pre, &vals) { in wasmtime_structref_new()
647 .to_owned_rooted(&mut scope) in wasmtime_structref_new()
709 let mut scope = RootScope::new(&mut cx); in wasmtime_structref_field() localVariable
710 let rooted = structref.to_rooted(&mut scope); in wasmtime_structref_field()
711 match rooted.field(&mut scope, index) { in wasmtime_structref_field()
713 let c_val = crate::wasmtime_val_t::from_val(&mut scope, val); in wasmtime_structref_field()
731 let mut scope = RootScope::new(&mut cx); in wasmtime_structref_set_field() localVariable
732 let rooted = structref.to_rooted(&mut scope); in wasmtime_structref_set_field()
733 let rust_val = val.to_val(&mut scope); in wasmtime_structref_set_field()
734 match rooted.set_field(&mut scope, index, rust_val) { in wasmtime_structref_set_field()
758 let mut scope = RootScope::new(&mut cx); in wasmtime_eqref_as_struct() localVariable
759 let rooted = eqref.to_rooted(&mut scope); in wasmtime_eqref_as_struct()
760 if let Ok(Some(structref)) = rooted.as_struct(&scope) { in wasmtime_eqref_as_struct()
761 let owned = structref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_eqref_as_struct()
797 let mut scope = RootScope::new(&mut cx); in wasmtime_arrayref_new() localVariable
798 let val = elem.to_val(&mut scope); in wasmtime_arrayref_new()
799 match ArrayRef::new(&mut scope, &pre.pre, &val, len) { in wasmtime_arrayref_new()
802 .to_owned_rooted(&mut scope) in wasmtime_arrayref_new()
880 let mut scope = RootScope::new(&mut cx); in wasmtime_arrayref_get() localVariable
881 let rooted = arrayref.to_rooted(&mut scope); in wasmtime_arrayref_get()
882 match rooted.get(&mut scope, index) { in wasmtime_arrayref_get()
884 let c_val = crate::wasmtime_val_t::from_val(&mut scope, val); in wasmtime_arrayref_get()
902 let mut scope = RootScope::new(&mut cx); in wasmtime_arrayref_set() localVariable
903 let rooted = arrayref.to_rooted(&mut scope); in wasmtime_arrayref_set()
904 let rust_val = val.to_val(&mut scope); in wasmtime_arrayref_set()
905 match rooted.set(&mut scope, index, rust_val) { in wasmtime_arrayref_set()
929 let mut scope = RootScope::new(&mut cx); in wasmtime_eqref_as_array() localVariable
930 let rooted = eqref.to_rooted(&mut scope); in wasmtime_eqref_as_array()
931 if let Ok(Some(arrayref)) = rooted.as_array(&scope) { in wasmtime_eqref_as_array()
932 let owned = arrayref.to_owned_rooted(&mut scope).expect("just created"); in wasmtime_eqref_as_array()
959 let mut scope = RootScope::new(&mut cx); in wasmtime_anyref_as_eqref() localVariable
960 let rooted = anyref.to_rooted(&mut scope); in wasmtime_anyref_as_eqref()
961 if let Ok(Some(eqref)) = rooted.as_eqref(&mut scope) { in wasmtime_anyref_as_eqref()
962 let owned = eqref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_anyref_as_eqref()
989 let mut scope = RootScope::new(&mut cx); in wasmtime_anyref_as_struct() localVariable
990 let rooted = anyref.to_rooted(&mut scope); in wasmtime_anyref_as_struct()
991 if let Ok(Some(structref)) = rooted.as_struct(&scope) { in wasmtime_anyref_as_struct()
992 let owned = structref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_anyref_as_struct()
1019 let mut scope = RootScope::new(&mut cx); in wasmtime_anyref_as_array() localVariable
1020 let rooted = anyref.to_rooted(&mut scope); in wasmtime_anyref_as_array()
1021 if let Ok(Some(arrayref)) = rooted.as_array(&scope) { in wasmtime_anyref_as_array()
1022 let owned = arrayref.to_owned_rooted(&mut scope).expect("in scope"); in wasmtime_anyref_as_array()