| /wasmtime-44.0.1/crates/wasmtime/src/runtime/module/ |
| H A D | registry.rs | 80 code: StoreCode, field 102 assert!(code.code.text_range().end <= range.start); in assert_no_overlap() 136 let (_, code) = self in module_and_code_by_pc() 140 let offset = StoreCodePC::offset_of(code.code.text_range(), pc)?; in module_and_code_by_pc() 143 Some((ModuleWithCode::from_raw(module, &code.code), offset)) in module_and_code_by_pc() 150 Some(&code.code) in store_code() 176 assert_eq!(code.code.text_range().start, store_code_base); in store_code_mut() 177 Some(&mut code.code) in store_code_mut() 283 let (_, code) = self in lookup_frame_info() 287 let text_offset = StoreCodePC::offset_of(code.code.text_range(), pc)?; in lookup_frame_info() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/compile/ |
| H A D | runtime.rs | 44 let (code, info_and_types) = in compile_cached() 66 Ok((code, info)) in compile_cached() 70 Some(code.mmap().to_vec()) in compile_cached() 80 Some((code, None)) in compile_cached() 83 return Ok((code, info_and_types)); in compile_cached() 102 return Ok((code, info_and_types)); in compile_cached() 124 let (code, info_and_types) = self.compile_cached( in compile_module() 139 let (code, artifacts) = self.compile_cached( in compile_component() 166 let mut code = CodeMemory::new(engine, mmap)?; in publish_mmap() localVariable 167 code.publish()?; in publish_mmap() [all …]
|
| /wasmtime-44.0.1/crates/wasmtime/src/profiling_agent/ |
| H A D | vtune.rs | 50 fn notify_code(&mut self, module_name: &str, method_name: &str, code: &[u8]) { in notify_code() 53 MethodLoadBuilder::new(method_name.to_owned(), code.as_ptr(), code.len()) in notify_code() 68 fn register_function(&self, name: &str, code: &[u8]) { in register_function() 69 self.state.lock().unwrap().register_function(name, code); in register_function() 74 fn register_function(&mut self, name: &str, code: &[u8]) { in register_function() 75 self.notify_code("wasmtime", name, code); in register_function()
|
| H A D | perfmap.rs | 34 fn make_line(writer: &mut File, name: &str, code: &[u8]) -> io::Result<()> { in make_line() 38 let line = format!("{:p} {:x} {sanitized_name}\n", code.as_ptr(), code.len()); in make_line() 56 fn register_function(&self, name: &str, code: &[u8]) { in register_function() 59 if let Err(err) = Self::make_line(file, name, code) { in register_function()
|
| /wasmtime-44.0.1/cranelift/codegen/src/ir/ |
| H A D | trapcode.rs | 25 if let Some(code) = byte.checked_add(Self::RESERVED_START) { in reserved() 26 if let Some(nz) = NonZeroU8::new(code) { in reserved() 54 pub const fn user(code: u8) -> Option<TrapCode> { in user() 55 if code >= Self::RESERVED_START { in user() 58 match NonZeroU8::new(code) { in user() 65 pub const fn unwrap_user(code: u8) -> TrapCode { in unwrap_user() 66 match TrapCode::user(code) { in unwrap_user() 67 Some(code) => code, in unwrap_user()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/ |
| H A D | module.rs | 8 code::EngineCode, 147 code: Arc<EngineCode>, field 409 Module::from_parts(engine, code, None) in deserialize() 429 Module::from_parts(engine, code, None) in deserialize_raw() 533 code: Arc<EngineCode>, in from_parts_raw() 552 code, in from_parts_raw() 647 &self.inner.code in engine_code() 655 self.inner.code.module_types() in types() 660 self.inner.code.signatures() in signatures() 1136 .code in wasm_to_array_trampoline() [all …]
|
| /wasmtime-44.0.1/cranelift/isle/isle/src/ |
| H A D | codegen.rs | 183 code in generate_rust() 190 code, in generate_header() 200 code, in generate_header() 205 code, in generate_header() 210 code, in generate_header() 235 code, in generate_trait_sig() 251 code, in generate_trait_sig() 275 code, in generate_ctx_trait() 280 code, in generate_ctx_trait() 285 code, in generate_ctx_trait() [all …]
|
| /wasmtime-44.0.1/crates/wasi-preview1-component-adapter/ |
| H A D | build.rs | 119 let mut code = Vec::new(); in build_raw_intrinsics() localVariable 120 4u32.encode(&mut code); // number of functions in build_raw_intrinsics() 125 let encode = |code: &mut _, global, instruction| { in build_raw_intrinsics() 137 body.len().encode(code); // length of the function in build_raw_intrinsics() 138 let offset = code.len() + global_offset; in build_raw_intrinsics() 139 code.extend_from_slice(&body); // the function itself in build_raw_intrinsics() 143 let internal_state_ptr_ref1 = encode(&mut code, 0, global_get); // get_state_ptr in build_raw_intrinsics() 144 let internal_state_ptr_ref2 = encode(&mut code, 0, global_set); // set_state_ptr in build_raw_intrinsics() 145 let allocation_state_ref1 = encode(&mut code, 1, global_get); // get_allocation_state in build_raw_intrinsics() 146 let allocation_state_ref2 = encode(&mut code, 1, global_set); // set_allocation_state in build_raw_intrinsics() [all …]
|
| /wasmtime-44.0.1/cranelift/interpreter/src/ |
| H A D | interpreter.rs | 642 let code = " in function_references() localVariable 713 let code = " in stack_slots_multi_functions() localVariable 769 let code = " in out_of_slot_write_traps() localVariable 795 let code = " in partial_out_of_slot_write_traps() localVariable 821 let code = " in out_of_slot_read_traps() localVariable 846 let code = " in partial_out_of_slot_read_traps() localVariable 871 let code = " in partial_out_of_slot_read_by_addr_traps() localVariable 899 let code = " in partial_out_of_slot_write_by_addr_traps() localVariable 979 let code = " in misaligned_store_traps() localVariable 1001 let code = " in misaligned_load_traps() localVariable [all …]
|
| /wasmtime-44.0.1/cranelift/filetests/filetests/isa/pulley32/ |
| H A D | trap.clif | 26 ; trap_if_xeq64_i32 x0, 42 // code = TrapCode(1) 44 ; trap_if_xneq64_i32 x0, 42 // code = TrapCode(1) 62 ; trap_if_xeq64_i32 x0, 42 // code = TrapCode(1) 80 ; trap_if_xneq64_i32 x0, 42 // code = TrapCode(1) 108 ; trap_if_xneq64_i32 x4, 0 // code = TrapCode(1) 112 ; trap_if_xneq64_i32 x6, 0 // code = TrapCode(1) 146 ; trap_if_xeq64_i32 x4, 0 // code = TrapCode(1) 150 ; trap_if_xeq64_i32 x6, 0 // code = TrapCode(1)
|
| /wasmtime-44.0.1/cranelift/filetests/filetests/isa/pulley64/ |
| H A D | trap.clif | 26 ; trap_if_xeq64_i32 x0, 42 // code = TrapCode(1) 44 ; trap_if_xneq64_i32 x0, 42 // code = TrapCode(1) 62 ; trap_if_xeq64_i32 x0, 42 // code = TrapCode(1) 80 ; trap_if_xneq64_i32 x0, 42 // code = TrapCode(1) 108 ; trap_if_xneq64_i32 x4, 0 // code = TrapCode(1) 112 ; trap_if_xneq64_i32 x6, 0 // code = TrapCode(1) 146 ; trap_if_xeq64_i32 x4, 0 // code = TrapCode(1) 150 ; trap_if_xeq64_i32 x6, 0 // code = TrapCode(1)
|
| /wasmtime-44.0.1/cranelift/codegen/src/legalizer/ |
| H A D | branch_to_trap.rs | 48 InstructionData::Trap { code, .. } => code, in just_trap_block_code() 76 let code = self.just_trap_block_code(pos.func, consequent); localVariable 77 pos.ins().trapnz(arg, code); 91 let code = self.just_trap_block_code(pos.func, alternative); localVariable 92 pos.ins().trapz(arg, code);
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/ |
| H A D | component.rs | 84 code: Arc<EngineCode>, field 217 Component::from_parts(engine, code, None) in deserialize() 236 Component::from_parts(engine, code, None) in deserialize_raw() 256 let code = engine in deserialize_file() localVariable 259 Component::from_parts(engine, code, None) in deserialize_file() 464 code, in from_parts() 492 match self.inner.code.types() { in types() 493 crate::code::Types::Component(types) => types, in types() 501 self.inner.code.signatures() in signatures() 558 &self.inner.code in engine_code() [all …]
|
| /wasmtime-44.0.1/cranelift/codegen/src/opts/ |
| H A D | skeleton.isle | 24 ;; (rule (simplify_skeleton (trapz (iconst_u _ 0) code)) 25 ;; (trap code)) 26 ;; (rule (simplify_skeleton (trapnz (iconst_u _ (u64_when_non_zero)) code)) 27 ;; (trap code)) 29 ;; (rule (simplify_skeleton (uadd_overflow_trap (iconst_u ty a) (iconst_u ty b) code)) 31 ;; (trap code))
|
| /wasmtime-44.0.1/crates/fuzzing/ |
| H A D | build.rs | 22 let mut code = format!("static FILES: &[fn() -> wasmtime_test_util::wast::WastTest] = &[\n"); in main() localVariable 31 code.push_str(&format!( in main() 42 code.push_str("];\n"); in main() 43 std::fs::write(out_dir.join("wasttests.rs"), code).unwrap(); in main()
|
| /wasmtime-44.0.1/cranelift/isle/fuzz/fuzz_targets/ |
| H A D | compile.rs | 30 let code = cranelift_isle::compile::compile(files, &defs, &Default::default()); localVariable 32 let code = match code { localVariable 39 drop(code);
|
| /wasmtime-44.0.1/crates/c-api/include/wasmtime/ |
| H A D | trap.hh | 121 Trap(wasmtime_trap_code_enum code) : Trap(wasmtime_trap_new_code(code)) {} in Trap() argument 143 std::optional<wasmtime_trap_code_t> code() const { in code() function in wasmtime::Trap 144 wasmtime_trap_code_t code; in code() local 145 bool present = wasmtime_trap_code(ptr.get(), &code); in code() 147 return code; in code()
|
| /wasmtime-44.0.1/crates/wasi/src/p3/wit/deps/ |
| H A D | cli.wit | 33 /// specified status code to the host. 40 @unstable(feature = cli-exit-with-code) 41 exit-with-code: func(status-code: u8); 54 enum error-code { 66 use types.{error-code}; 87 use types.{error-code}; 93 /// error-code representing a failure. 96 /// dropped and this function will return an error-code. 103 use types.{error-code}; 109 /// error-code representing a failure. [all …]
|
| H A D | filesystem.wit | 195 variant error-code { 270 /// breaking existing code. 325 /// resolves to `err` with an `error-code`. 366 sync-data: async func() -> result<_, error-code>; 421 sync: async func() -> result<_, error-code>; 437 stat: async func() -> result<descriptor-stat, error-code>; 468 /// `open-at` fails with `error-code::read-only`. 473 /// `error-code::read-only`. 501 /// `error-code::not-permitted`. 513 /// `error-code::is-directory` may be returned instead of the [all …]
|
| /wasmtime-44.0.1/crates/wasi-http/src/p3/wit/deps/ |
| H A D | cli.wit | 33 /// specified status code to the host. 40 @unstable(feature = cli-exit-with-code) 41 exit-with-code: func(status-code: u8); 54 enum error-code { 66 use types.{error-code}; 87 use types.{error-code}; 93 /// error-code representing a failure. 96 /// dropped and this function will return an error-code. 103 use types.{error-code}; 109 /// error-code representing a failure. [all …]
|
| H A D | filesystem.wit | 195 variant error-code { 270 /// breaking existing code. 325 /// resolves to `err` with an `error-code`. 366 sync-data: async func() -> result<_, error-code>; 421 sync: async func() -> result<_, error-code>; 437 stat: async func() -> result<descriptor-stat, error-code>; 468 /// `open-at` fails with `error-code::read-only`. 473 /// `error-code::read-only`. 501 /// `error-code::not-permitted`. 513 /// `error-code::is-directory` may be returned instead of the [all …]
|
| /wasmtime-44.0.1/crates/debugger/wit/deps/ |
| H A D | filesystem.wit | 184 enum error-code { 337 sync-data: func() -> result<_, error-code>; 345 get-flags: func() -> result<descriptor-flags, error-code>; 357 get-type: func() -> result<descriptor-type, error-code>; 363 set-size: func(size: filesize) -> result<_, error-code>; 413 sync: func() -> result<_, error-code>; 429 stat: func() -> result<descriptor-stat, error-code>; 460 /// `open-at` fails with `error-code::read-only`. 465 /// `error-code::read-only`. 493 /// `error-code::not-permitted`. [all …]
|
| /wasmtime-44.0.1/crates/wasi/src/p2/wit/deps/ |
| H A D | filesystem.wit | 184 enum error-code { 337 sync-data: func() -> result<_, error-code>; 345 get-flags: func() -> result<descriptor-flags, error-code>; 357 get-type: func() -> result<descriptor-type, error-code>; 363 set-size: func(size: filesize) -> result<_, error-code>; 413 sync: func() -> result<_, error-code>; 429 stat: func() -> result<descriptor-stat, error-code>; 460 /// `open-at` fails with `error-code::read-only`. 465 /// `error-code::read-only`. 493 /// `error-code::not-permitted`. [all …]
|
| /wasmtime-44.0.1/crates/wasi-http/wit/deps/ |
| H A D | filesystem.wit | 184 enum error-code { 337 sync-data: func() -> result<_, error-code>; 345 get-flags: func() -> result<descriptor-flags, error-code>; 357 get-type: func() -> result<descriptor-type, error-code>; 363 set-size: func(size: filesize) -> result<_, error-code>; 413 sync: func() -> result<_, error-code>; 429 stat: func() -> result<descriptor-stat, error-code>; 460 /// `open-at` fails with `error-code::read-only`. 465 /// `error-code::read-only`. 493 /// `error-code::not-permitted`. [all …]
|
| /wasmtime-44.0.1/cranelift/codegen/ |
| H A D | README.md | 1 This crate contains the core Cranelift code generator. It translates code from an 2 intermediate representation into executable machine code.
|