Home
last modified time | relevance | path

Searched refs:context (Results 1 – 25 of 334) sorted by relevance

12345678910>>...14

/wasmtime-44.0.1/examples/
H A Dmultimemory.c222 check_call0(context, &size0, 2); in main()
223 check_call1(context, &load0, 0, 0); in main()
224 check_call1(context, &load0, 0x1000, 1); in main()
229 check_trap1(context, &load0, 0x20000); in main()
239 check_call0(context, &size1, 2); in main()
240 check_call1(context, &load1, 0, 0); in main()
246 check_trap1(context, &load1, 0x20000); in main()
251 check_ok2(context, &store0, 0x1002, 6); in main()
260 check_ok2(context, &store1, 0x1002, 8); in main()
279 check_trap1(context, &load0, 0x30000); in main()
[all …]
H A Dmemory.c201 check_call0(context, &size_func, 2); in main()
202 check_call1(context, &load_func, 0, 0); in main()
203 check_call1(context, &load_func, 0x1000, 1); in main()
204 check_call1(context, &load_func, 0x1003, 4); in main()
205 check_call1(context, &load_func, 0x1ffff, 0); in main()
206 check_trap1(context, &load_func, 0x20000); in main()
211 check_ok2(context, &store_func, 0x1002, 6); in main()
216 check_call1(context, &load_func, 0x1002, 6); in main()
217 check_call1(context, &load_func, 0x1003, 5); in main()
229 check_ok2(context, &store_func, 0x20000, 0); in main()
[all …]
H A Dexternref.c37 wasmtime_context_t *context = wasmtime_store_context(store); in main() local
83 ok = wasmtime_externref_new(context, "Hello, World!", NULL, &externref); in main()
87 void *data = wasmtime_externref_data(context, &externref); in main()
98 ok = wasmtime_instance_export_get(context, &instance, "table", in main()
110 ok = wasmtime_table_get(context, &item.of.table, 3, &elem); in main()
122 ok = wasmtime_instance_export_get(context, &instance, "global", in main()
134 wasmtime_global_get(context, &item.of.global, &global_val); in main()
136 assert(strcmp((char *)wasmtime_externref_data(context, in main()
146 ok = wasmtime_instance_export_get(context, &instance, "func", in main()
161 assert(strcmp((char *)wasmtime_externref_data(context, in main()
[all …]
H A Danyref.c39 wasmtime_context_t *context = wasmtime_store_context(store); in main() local
83 wasmtime_anyref_from_i31(context, 1234, &anyref); in main()
88 bool is_i31 = wasmtime_anyref_i31_get_u(context, &anyref, &i31val); in main()
97 ok = wasmtime_instance_export_get(context, &instance, "table", in main()
106 error = wasmtime_table_set(context, &item.of.table, 3, &anyref_val); in main()
112 ok = wasmtime_table_get(context, &item.of.table, 3, &elem); in main()
125 ok = wasmtime_instance_export_get(context, &instance, "global", in main()
131 error = wasmtime_global_set(context, &item.of.global, &anyref_val); in main()
137 wasmtime_global_get(context, &item.of.global, &global_val); in main()
149 ok = wasmtime_instance_export_get(context, &instance, "take_anyref", in main()
[all …]
/wasmtime-44.0.1/tests/misc_testsuite/component-model/
H A Derror-context-trap-in-post-return.wast10 (core func $error-context.new (canon error-context.new (memory $memory "mem")))
11 (core func $error-context.debug-message
12 (canon error-context.debug-message
15 (core func $error-context.drop (canon error-context.drop))
19 (import "" "error-context.new" (func $error-context.new (param i32 i32) (result i32)))
20 (import "" "error-context.debug-message" (func $error-context.debug-message (param i32 i32)))
21 (import "" "error-context.drop" (func $error-context.drop (param i32)))
26 (func (export "trap-calling-error-context-drop") (call $error-context.drop (i32.const 0)))
30 (export "error-context.new" (func $error-context.new))
31 (export "error-context.debug-message" (func $error-context.debug-message))
[all …]
/wasmtime-44.0.1/tests/misc_testsuite/component-model/async/
H A Derror-context.wast4 ;; error-context.new
9 (import "" "error-context.new" (func $error-context-new (param i32 i32) (result i32)))
11 (core func $error-context-new (canon error-context.new (memory $libc "memory")))
29 ;; error-context.drop
32 (import "" "error-context.drop" (func $error-context-drop (param i32)))
34 (core func $error-context-drop (canon error-context.drop))
59 (import "" "error-context.drop" (func $error-context.drop (param i32)))
72 (core func $error-context.drop (canon error-context.drop))
76 (export "error-context.new" (func $error-context.new))
77 (export "error-context.debug-message" (func $error-context.debug-message))
[all …]
H A Dtask-builtins.wast116 (export "context.get" (func $context.get))
117 (export "context.set" (func $context.set))
164 (export "context.get" (func $context.get))
165 (export "context.set" (func $context.set))
189 (export "context.get" (func $context.get))
190 (export "context.set" (func $context.set))
287 (export "context.get" (func $context.get))
431 (export "context.get" (func $context.get))
432 (export "context.set" (func $context.set))
458 (export "context.set" (func $context.set))
[all …]
/wasmtime-44.0.1/cranelift/filetests/src/
H A Dsubtest.rs92 let context = Context { in run_target() localVariable
102 .context(self.name())?; in run_target()
120 let checker = build_filechecker(context)?; in run_filecheck()
123 .context("filecheck failed")? in run_filecheck()
133 context.details.location.line_number, in run_filecheck()
144 for comment in context.preamble_comments { in build_filechecker()
149 for comment in &context.details.comments { in build_filechecker()
159 let expected = context in check_precise_output()
179 return update_test(&actual, context); in check_precise_output()
192 context.details.location.line_number, in check_precise_output()
[all …]
/wasmtime-44.0.1/winch/codegen/src/codegen/
H A Dmod.rs31 mod context; module
32 pub(crate) use context::*;
136 context, in new()
197 context: self.context.for_emission(), in emit_prologue()
329 &mut self.context, in emit_body()
598 self.context in emit_lazy_init_funcref()
623 .context in emit_lazy_init_funcref()
873 .context in emit_check_align()
923 this.context in emit_wasm_load()
1492 self.context in emit_atomic_wait()
[all …]
H A Dcontrol.rs273 control.emit(masm, context)?;
290 control.emit(masm, context)?; in block()
306 control.emit(masm, context)?;
345 context, in init()
378 context.spill(masm)?; in calculate_stack_state()
448 if !context.reachable { in emit()
471 context.free_reg(top); in emit()
726 context.free_reg(reg); in pop_abi_results_impl()
745 context.free_reg(retptr); in pop_abi_results_impl()
803 Self::pop_abi_results_impl::<M, _>(results, context, masm, |r, context, masm| { in top_abi_results_impl()
[all …]
H A Dcall.rs93 let (kind, callee_context) = Self::lower(env, context.vmoffsets, &callee, context, masm)?; in emit()
96 context.spill(masm)?; in emit()
111 context, in emit()
201 context.without::<Result<(Reg, Reg)>, M, _>(&sig.regs, masm, |context, masm| { in lower_import()
202 Ok((context.any_gpr(masm)?, context.any_gpr(masm)?)) in lower_import()
252 context.free_reg(funcref_ptr); in lower_funcref()
263 context: &ContextArgs, in assign_context_args()
270 for (context_arg, operand) in context in assign_context_args()
314 let stack = &context.stack; in assign()
401 context.drop_last( in cleanup()
[all …]
/wasmtime-44.0.1/crates/c-api/include/wasmtime/
H A Dgc.h90 WASM_API_EXTERN void wasmtime_eqref_from_i31(wasmtime_context_t *context,
100 WASM_API_EXTERN bool wasmtime_eqref_is_i31(wasmtime_context_t *context,
212 wasmtime_struct_ref_pre_new(wasmtime_context_t *context,
266 wasmtime_context_t *context, const wasmtime_struct_ref_pre_t *pre,
306 wasmtime_structref_field(wasmtime_context_t *context,
322 wasmtime_structref_set_field(wasmtime_context_t *context,
391 wasmtime_array_ref_pre_new(wasmtime_context_t *context,
447 wasmtime_context_t *context, const wasmtime_array_ref_pre_t *pre,
486 wasmtime_arrayref_len(wasmtime_context_t *context,
500 wasmtime_arrayref_get(wasmtime_context_t *context,
[all …]
H A Dstore.h126 wasmtime_context_get_data(const wasmtime_context_t *context);
135 WASM_API_EXTERN void wasmtime_context_set_data(wasmtime_context_t *context,
148 wasmtime_context_gc(wasmtime_context_t *context);
178 wasmtime_context_get_fuel(const wasmtime_context_t *context, uint64_t *fuel);
194 wasmtime_context_set_wasi(wasmtime_context_t *context, wasi_config_t *wasi);
207 wasmtime_context_set_wasi_http(wasmtime_context_t *context);
222 wasmtime_context_set_epoch_deadline(wasmtime_context_t *context,
254 wasmtime_error_t *(*func)(wasmtime_context_t *context, void *data,
H A Dval.h93 WASM_API_EXTERN bool wasmtime_anyref_to_eqref(wasmtime_context_t *context,
119 WASM_API_EXTERN void wasmtime_anyref_from_raw(wasmtime_context_t *context,
133 WASM_API_EXTERN uint32_t wasmtime_anyref_to_raw(wasmtime_context_t *context,
144 WASM_API_EXTERN void wasmtime_anyref_from_i31(wasmtime_context_t *context,
154 WASM_API_EXTERN bool wasmtime_anyref_is_i31(wasmtime_context_t *context,
166 WASM_API_EXTERN bool wasmtime_anyref_i31_get_u(wasmtime_context_t *context,
179 WASM_API_EXTERN bool wasmtime_anyref_i31_get_s(wasmtime_context_t *context,
254 WASM_API_EXTERN bool wasmtime_externref_new(wasmtime_context_t *context,
265 WASM_API_EXTERN void *wasmtime_externref_data(wasmtime_context_t *context,
300 WASM_API_EXTERN void wasmtime_externref_from_raw(wasmtime_context_t *context,
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/sys/windows/
H A Dvectored_exceptions.rs212 pc: context.Rip as usize, in exception_handler()
213 fp: context.Rbp as usize, in exception_handler()
217 pc: context.Pc as usize, in exception_handler()
242 context.Rip = handler.pc as _; in exception_handler()
243 context.Rbp = handler.fp as _; in exception_handler()
245 context.Rax = 0; in exception_handler()
246 context.Rdx = 0; in exception_handler()
248 context.Pc = handler.pc as _; in exception_handler()
249 context.Sp = handler.sp as _; in exception_handler()
276 let context_pc = context.Rip as usize; in continue_handler()
[all …]
/wasmtime-44.0.1/winch/codegen/src/
H A Dvisitor.rs1017 self.context in visit_f32_convert_i32_s()
1035 self.context in visit_f32_convert_i64_s()
1053 self.context in visit_f64_convert_i32_s()
1071 self.context in visit_f64_convert_i64_s()
1089 self.context in visit_f32_reinterpret_i32()
1096 self.context in visit_f64_reinterpret_i64()
1529 self.context in visit_i32_trunc_f32_s()
1545 self.context in visit_i32_trunc_f64_s()
1560 self.context in visit_i64_trunc_f32_s()
1576 self.context in visit_i64_trunc_f64_s()
[all …]
/wasmtime-44.0.1/crates/core/src/error/
H A Dcontext.rs113 fn context<C>(self, context: C) -> Result<T, Error> in context() method
132 fn context<C>(self, context: C) -> Result<T> in context() function
138 Err(e) => Err(Error::new(e).context(context)), in context()
156 fn context<C>(self, context: C) -> Result<T, Error> in context() method
162 Err(e) => Err(e.context(context)), in context()
179 fn context<C>(self, context: C) -> Result<T> in context() method
186 context, in context()
200 context: f(), in with_context()
215 pub(crate) context: C, field
234 self.context.fmt(f) in fmt()
[all …]
/wasmtime-44.0.1/crates/core/tests/
H A Dtests.rs187 let e = e.context(TestError(36)).context("another str"); in is()
437 .context("yikes") in downcast()
444 .context("yikes") in downcast()
570 let result = result.context("uh oh").context(TestError(1337)); in context_on_ok_result()
589 let result = option.context("uh oh").context(TestError(1337)); in context_on_some_option()
596 let result = option.context(TestError(42)).context("uh oh"); in context_on_none_option()
652 let error = Error::msg("whoops").context("uh oh").context("yikes"); in fmt_debug()
779 let error = Error::msg("whoops").context("uh oh").context("yikes"); in fmt_display()
821 let error = Error::new(error).context("ouch").context("oof"); in chain_on_error_with_source()
848 let error = Error::new(error).context("ouch").context("oof"); in root_cause()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/instance/
H A Dallocator.rs502 context: &mut ConstEvalContext, in check_table_init_bounds()
531 context: &mut ConstEvalContext, in initialize_tables()
571 context.asyncness, in initialize_tables()
572 context.instance, in initialize_tables()
597 context: &mut ConstEvalContext, in get_memory_init_start()
615 context: &mut ConstEvalContext, in check_memory_init_bounds()
640 context: &mut ConstEvalContext, in initialize_memories()
728 context, in initialize_memories()
741 context: &mut ConstEvalContext, in check_init_bounds()
836 &mut context, in initialize_instance()
[all …]
/wasmtime-44.0.1/crates/c-api/tests/component/
H A Dcall_func.cc28 auto context = store.context(); in TEST() local
34 auto instance = linker.instantiate(context, component).unwrap(); in TEST()
35 auto func = *instance.get_func(context, f); in TEST()
44 func.call(context, params, results).unwrap(); in TEST()
46 func.post_return(context).unwrap(); in TEST()
H A Dlookup_func.cc23 auto context = store.context(); in TEST() local
35 auto instance = linker.instantiate(context, component).unwrap(); in TEST()
37 *instance.get_func(context, *f); in TEST()
39 auto f2 = instance.get_export_index(context, nullptr, "f"); in TEST()
/wasmtime-44.0.1/cranelift/src/
H A Dcompile.rs99 let mut context = Context::new(); in handle_module() localVariable
100 context.func = func; in handle_module()
103 let compiled_code = context in handle_module()
109 let name = context.func.name.to_string(); in handle_module()
113 &context.func.signature, in handle_module()
117 &mut context, in handle_module()
123 println!("{}", context.func.display()); in handle_module()
127 let result = context.compiled_code().unwrap(); in handle_module()
130 &context.func, in handle_module()
131 context.compiled_code().unwrap().code_buffer(), in handle_module()
/wasmtime-44.0.1/cranelift/codegen/src/verifier/
H A Dmod.rs95 pub context: Option<String>, field
106 match &self.context { in fmt()
108 Some(context) => write!(f, "{} ({}): {}", self.location, context, self.message), in fmt()
133 context: Some(context.into()), in from()
151 context: None, in from()
435 self.context(inst), in block_integrity()
448 self.context(inst), in block_integrity()
478 self.context(inst), in instruction_integrity()
490 self.context(inst), in instruction_integrity()
751 self.context(inst), in verify_sig_ref()
[all …]
/wasmtime-44.0.1/crates/fuzzing/src/oracles/
H A Ddiff_v8.rs55 let global = context.global(&mut scope); in instantiate()
56 let mut scope = v8::ContextScope::new(&mut scope, context); in instantiate()
75 context: v8::Global::new(&mut scope, context), in instantiate()
154 context: v8::Global<v8::Context>, field
172 let context = v8::Local::new(&mut scope, &self.context); in evaluate() localVariable
173 let global = context.global(&mut scope); in evaluate()
174 let mut scope = v8::ContextScope::new(&mut scope, context); in evaluate()
235 let context = v8::Local::new(&mut scope, &self.context); in get_global() localVariable
236 let global = context.global(&mut scope); in get_global()
249 let context = v8::Local::new(&mut scope, &self.context); in get_memory() localVariable
[all …]
/wasmtime-44.0.1/crates/wasi-nn/examples/classification-example-named/src/
H A Dmain.rs10 let mut context = graph.init_execution_context().unwrap(); in main() localVariable
11 println!("Created an execution context: {:?}", context); in main()
17 context in main()
22 context.compute().unwrap(); in main()
27 context.get_output(0, &mut output_buffer[..]).unwrap(); in main()

12345678910>>...14