| /wasmtime-44.0.1/crates/fuzzing/src/oracles/ |
| H A D | diff_v8.rs | 55 let global = context.global(&mut scope); in instantiate() 56 let mut scope = v8::ContextScope::new(&mut scope, context); in instantiate() localVariable 174 let mut scope = v8::ContextScope::new(&mut scope, context); in evaluate() localVariable 187 v8::null(&mut scope).into() in evaluate() 237 let mut scope = v8::ContextScope::new(&mut scope, context); in get_global() localVariable 251 let mut scope = v8::ContextScope::new(&mut scope, context); in get_memory() localVariable 274 let mut tc = v8::TryCatch::new(scope); in eval() 278 match script.run(&mut scope) { in eval() 279 Some(val) => Ok(scope.escape(val)), in eval() 281 drop(scope); in eval() [all …]
|
| /wasmtime-44.0.1/crates/fuzzing/src/generators/ |
| H A D | api.rs | 75 let mut scope = Scope { in arbitrary() localVariable 94 choices.push(|input, scope| { in arbitrary() 95 let id = scope.next_id(); in arbitrary() 97 scope.modules.insert(id); in arbitrary() 105 choices.push(|input, scope| { in arbitrary() 108 scope.modules.remove(&id); in arbitrary() 113 choices.push(|input, scope| { in arbitrary() 116 let id = scope.next_id(); in arbitrary() 122 choices.push(|input, scope| { in arbitrary() 130 choices.push(|input, scope| { in arbitrary() [all …]
|
| H A D | component_async.rs | 244 scope in remove() 503 let action = match (scope.caller(), scope.callee()) { in generate() 553 scope, in generate() 689 let action = match (scope.caller(), scope.callee()) { in generate() 763 if scope.is_host() { in generate() 771 scope, in generate() 852 scope, in generate() 866 if scope.is_host() { in generate() 874 scope, in generate() 964 scope, in generate() [all …]
|
| /wasmtime-44.0.1/crates/c-api/src/ |
| H A D | exn.rs | 22 let mut scope = RootScope::new(&mut store); in wasmtime_exn_new() localVariable 25 let tag_ty = tag.ty(&scope); in wasmtime_exn_new() 46 let mut scope = RootScope::new(&mut store); in wasmtime_exn_tag() localVariable 47 let rooted = exn.exn.to_rooted(&mut scope); in wasmtime_exn_tag() 58 let mut scope = RootScope::new(&mut store); in wasmtime_exn_field_count() localVariable 59 let rooted = exn.exn.to_rooted(&mut scope); in wasmtime_exn_field_count() 60 let ty = rooted.ty(&scope).unwrap(); in wasmtime_exn_field_count() 71 let mut scope = RootScope::new(&mut store); in wasmtime_exn_field() localVariable 72 let rooted = exn.exn.to_rooted(&mut scope); in wasmtime_exn_field() 83 let mut scope = RootScope::new(&mut store); in wasmtime_context_set_exception() localVariable [all …]
|
| H A D | ref.rs | 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 405 let mut scope = RootScope::new(cx); in wasmtime_externref_new() localVariable 465 let mut scope = RootScope::new(cx); in wasmtime_externref_from_raw() localVariable 522 let mut scope = RootScope::new(cx); in wasmtime_eqref_from_i31() localVariable 545 let mut scope = RootScope::new(cx); in wasmtime_eqref_i31_get_u() localVariable 561 let mut scope = RootScope::new(cx); in wasmtime_eqref_i31_get_s() localVariable 733 let rust_val = val.to_val(&mut scope); in wasmtime_structref_set_field() 798 let val = elem.to_val(&mut scope); in wasmtime_arrayref_new() [all …]
|
| H A D | global.rs | 87 let mut scope = RootScope::new(&mut store); in wasmtime_global_new() localVariable 88 let val = val.to_val(&mut scope); in wasmtime_global_new() 89 let global = Global::new(scope, gt.ty().ty.clone(), val); in wasmtime_global_new() 109 let mut scope = RootScope::new(store); in wasmtime_global_get() localVariable 110 let gval = global.get(&mut scope); in wasmtime_global_get() 111 crate::initialize(val, wasmtime_val_t::from_val(&mut scope, gval)) in wasmtime_global_get() 120 let mut scope = RootScope::new(&mut store); in wasmtime_global_set() localVariable 121 let val = val.to_val(&mut scope); in wasmtime_global_set() 122 handle_result(global.set(scope, val), |()| {}) in wasmtime_global_set()
|
| H A D | table.rs | 123 let mut scope = RootScope::new(&mut store); in wasmtime_table_new() localVariable 125 init.to_val(&mut scope) in wasmtime_table_new() 128 .and_then(|init| Table::new(scope, tt.ty().ty.clone(), init)), in wasmtime_table_new() 148 let mut scope = RootScope::new(store); in wasmtime_table_get() localVariable 149 match table.get(&mut scope, index) { in wasmtime_table_get() 165 let mut scope = RootScope::new(&mut store); in wasmtime_table_set() localVariable 167 val.to_val(&mut scope) in wasmtime_table_set() 170 .and_then(|val| table.set(scope, index, val)), in wasmtime_table_set() 188 let mut scope = RootScope::new(&mut store); in wasmtime_table_grow() localVariable 190 val.to_val(&mut scope) in wasmtime_table_grow() [all …]
|
| H A D | func.rs | 354 let mut scope = RootScope::new(&mut store); in wasmtime_func_call() localVariable 355 let mut params = mem::take(&mut scope.as_context_mut().data_mut().wasm_val_storage); in wasmtime_func_call() 360 .map(|i| i.to_val(&mut scope)), in wasmtime_func_call() 369 func.call(&mut scope, wt_params, wt_results) in wasmtime_func_call() 375 crate::initialize(slot, wasmtime_val_t::from_val(&mut scope, *val)); in wasmtime_func_call() 378 scope.as_context_mut().data_mut().wasm_val_storage = params; in wasmtime_func_call()
|
| H A D | async.rs | 254 let mut scope = RootScope::new(store); in wasmtime_func_call_async() localVariable 257 .map(|i| i.to_val(&mut scope)) in wasmtime_func_call_async() 261 scope, in wasmtime_func_call_async()
|
| /wasmtime-44.0.1/cranelift/isle/isle/src/ |
| H A D | serialize.rs | 381 scope: ScopedState, field 392 let mut scope = ScopedState::default(); in new() localVariable 396 scope, in new() 408 scope: self.scope.clone(), in new_block() 614 child.scope.equal.merge(a, b); in make_control_flow() 654 let old = &mut self.scope.ready[source.index()]; in set_ready() 665 self.scope.candidates.extend([ in set_ready() 669 self.scope in set_ready() 684 self.scope.candidates.clear(); in best_control_flow() 690 self.scope.candidates.retain_mut(|candidate| { in best_control_flow() [all …]
|
| H A D | codegen.rs | 140 self.is_bound = scope; in end_block() 542 let scope = ctx.enter_scope(); in generate_internal_term_constructors() localVariable 603 scope: StableSet<BindingId>, in emit_block() 615 scope: StableSet<BindingId>, in emit_block_contents() 624 ctx.end_block(last_line, scope)?; in emit_block_contents() 681 let scope = ctx.enter_scope(); in emit_block_contents() localVariable 703 let scope = ctx.enter_scope(); in emit_block_contents() localVariable 715 let scope = ctx.enter_scope(); in emit_block_contents() localVariable 795 ctx.end_block(last_line, scope)?; in emit_block_contents() 802 let scope = ctx.enter_scope(); in emit_block_contents() localVariable [all …]
|
| /wasmtime-44.0.1/tests/all/ |
| H A D | exnrefs.rs | 60 let mut scope = RootScope::new(&mut store); in exn_objects() localVariable 64 &mut scope, in exn_objects() 72 &mut scope, in exn_objects() 78 assert_eq!(obj.fields(&mut scope)?.len(), 2); in exn_objects() 79 assert_eq!(obj.field(&mut scope, 0)?.unwrap_i32(), 42); in exn_objects() 80 assert_eq!(obj.field(&mut scope, 1)?.unwrap_i64(), i64::MIN); in exn_objects() 81 assert!(Tag::eq(&obj.tag(&mut scope)?, &tag, &scope)); in exn_objects()
|
| H A D | gc.rs | 70 scope.as_context_mut().gc(None)?; in smoke_test_gc_impl() 251 scope.as_context_mut().gc(None)?; in drop_externref_via_table_set() 737 scope.as_context_mut().gc(None)?; in rooted_gets_collected_after_scope_exit() 754 ExternRef::new(&mut scope, SetFlagOnDrop(flag.clone()))?.to_owned_rooted(&mut scope)? in owned_rooted_gets_collected_after_unrooting() 819 let raw = x.to_raw(&mut scope)?; in to_raw_from_raw_doesnt_leak() 839 &mut scope, in table_fill_doesnt_leak() 862 &mut scope, in table_copy_doesnt_leak() 889 &mut scope, in table_set_doesnt_leak() 916 &mut scope, in table_grow_doesnt_leak() 1513 r.to_owned_rooted(&mut scope)? in owned_rooted() [all …]
|
| H A D | arrays.rs | 44 let mut scope = RootScope::new(&mut store); in array_new_unrooted_initial_elem() localVariable 45 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in array_new_unrooted_initial_elem() 129 let mut scope = RootScope::new(&mut store); in array_new_fixed_unrooted_initial_elem() localVariable 130 AnyRef::from_i31(&mut scope, I31::new_i32(1234).unwrap()) in array_new_fixed_unrooted_initial_elem() 285 let mut scope = RootScope::new(&mut store); in array_get_on_unrooted() localVariable 286 ArrayRef::new_fixed(&mut scope, &pre, &[Val::I32(11)])? in array_get_on_unrooted() 359 let mut scope = RootScope::new(&mut store); in array_set_on_unrooted() localVariable 360 ArrayRef::new_fixed(&mut scope, &pre, &[Val::I32(11)])? in array_set_on_unrooted() 380 let mut scope = RootScope::new(&mut store); in array_set_given_unrooted() localVariable 469 let mut scope = RootScope::new(&mut store); in array_ty_unrooted() localVariable [all …]
|
| H A D | structs.rs | 46 let mut scope = RootScope::new(&mut store); in struct_new_unrooted_field() localVariable 159 let mut scope = RootScope::new(&mut store); in struct_field_on_unrooted() localVariable 160 StructRef::new(&mut scope, &pre, &[Val::I32(1234)])? in struct_field_on_unrooted() 213 let mut scope = RootScope::new(&mut store); in struct_set_field_on_unrooted() localVariable 214 StructRef::new(&mut scope, &pre, &[Val::I32(1234)])? in struct_set_field_on_unrooted() 234 let mut scope = RootScope::new(&mut store); in struct_set_field_with_unrooted() localVariable 235 AnyRef::from_i31(&mut scope, I31::wrapping_i32(42)) in struct_set_field_with_unrooted() 310 let mut scope = RootScope::new(&mut store); in struct_ty_unrooted() localVariable 311 StructRef::new(&mut scope, &pre, &[])? in struct_ty_unrooted() 356 let mut scope = RootScope::new(&mut store); in struct_fields_unrooted() localVariable [all …]
|
| H A D | i31ref.rs | 13 let mut scope = RootScope::new(&mut store); in always_pop_i31ref_lifo_roots() localVariable 14 AnyRef::from_i31(&mut scope, I31::wrapping_u32(42)) in always_pop_i31ref_lifo_roots()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/store/ |
| H A D | gc.rs | 25 let mut scope = crate::OpaqueRootScope::new(self); in gc() localVariable 26 scope.trim_gc_liveness_flags(true); in gc() 27 let store_id = scope.id(); in gc() 28 let root = root.map(|r| scope.gc_roots_mut().push_lifo_root(store_id, r)); in gc() 30 scope in gc() 36 .get_gc_ref(&scope) in gc() 39 scope.clone_gc_ref(&r) in gc()
|
| /wasmtime-44.0.1/crates/environ/src/ |
| H A D | scopevec.rs | 74 let scope = ScopeVec::new(); in smoke() localVariable 75 let a = scope.push(Vec::new()); in smoke() 76 let b = scope.push(vec![1, 2, 3]); in smoke() 77 let c = scope.push(vec![4, 5, 6]); in smoke()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/component/ |
| H A D | resources.rs | 228 RemovedResource::Borrow { scope } => { in resource_drop() 229 self.task_state.call_context(scope)?.borrow_count -= 1; in resource_drop() 276 let scope = self.task_state.current_call_context_scope_id()?; in resource_lift_borrow() localVariable 277 self.task_state.call_context(scope)?.lenders.push(index); in resource_lift_borrow() 295 let scope = self.task_state.current_call_context_scope_id()?; in resource_lower_borrow() localVariable 296 let cx = self.task_state.call_context(scope)?; in resource_lower_borrow() 299 .resource_borrow_insert(resource, scope) in resource_lower_borrow()
|
| H A D | handle_table.rs | 39 Borrow { scope: u32 }, 71 scope: u32, 198 pub fn resource_borrow_insert(&mut self, resource: TypedResource, scope: u32) -> Result<u32> { in resource_borrow_insert() 199 self.insert(Slot::ResourceBorrow { resource, scope }) in resource_borrow_insert() 267 Slot::ResourceBorrow { resource, scope } => { in remove_resource() 270 RemovedResource::Borrow { scope: *scope } in remove_resource()
|
| /wasmtime-44.0.1/crates/fuzzing/wit/ |
| H A D | fuzz.wit | 97 enum scope { 102 get-commands: func(s: scope) -> stream<command>; 106 use types.{command, scope}; 110 // the `scope` provided here. 112 // This invokes the imported `init` function with the `callee` scope. 113 init: async func(scope: scope);
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/gc/enabled/ |
| H A D | rooting.rs | 488 debug_assert!(self.lifo_roots.len() >= scope); in exit_lifo_scope() 491 if self.lifo_roots.len() > scope { in exit_lifo_scope() 492 self.exit_lifo_scope_slow(gc_store, scope); in exit_lifo_scope() 507 for root in lifo_roots.drain(scope..) { in exit_lifo_scope_slow() 523 let scope = store.gc_roots().enter_lifo_scope(); in with_lifo_scope() localVariable 525 store.exit_gc_lifo_scope(scope); in with_lifo_scope() 1367 scope: usize, field 1414 RootScope { store, scope } in new() 1475 scope: usize, field 1483 self.store.as_store_opaque().exit_gc_lifo_scope(self.scope); in drop() [all …]
|
| /wasmtime-44.0.1/cranelift/object/src/ |
| H A D | backend.rs | 214 let (scope, weak) = translate_linkage(linkage); in declare_function() 218 symbol.scope = scope; in declare_function() 226 scope, in declare_function() 250 scope: SymbolScope::Compilation, in declare_anonymous_function() 280 let (scope, weak) = translate_linkage(linkage); in declare_data() 285 symbol.scope = scope; in declare_data() 293 scope, in declare_data() 323 scope: SymbolScope::Compilation, in declare_anonymous_data() 628 scope: SymbolScope::Unknown, in get_symbol() 956 let scope = match linkage { in translate_linkage() localVariable [all …]
|
| /wasmtime-44.0.1/crates/wast/src/ |
| H A D | wast.rs | 611 thread::scope(|scope| { in run_directives() 616 self.run_directive(directive, filename, &scope, &mut threads) in run_directives() 628 scope: &'a thread::Scope<'a, '_>, in run_directive() 792 let child = scope.spawn(move || child_cx.run_directives(commands, filename)); in run_directive()
|
| /wasmtime-44.0.1/cranelift/filetests/filetests/egraph/ |
| H A D | issue-7891.clif | 62 ; block, introducing a reference to v2, which is not in scope here. 90 ; block, introducing a reference to v1, which is not in scope here.
|