mirror of
https://github.com/denoland/deno.git
synced 2024-12-27 17:49:08 -05:00
ca66978a5a
This PR introduces Wasm ops. These calls are optimized for entry from Wasm land. The `#[op(wasm)]` attribute is opt-in. Last parameter `Option<&mut [u8]>` is the memory slice of the Wasm module *when entered from a Fast API call*. Otherwise, the user is expected to implement logic to obtain the memory if `None` ```rust #[op(wasm)] pub fn op_args_get( offset: i32, buffer_offset: i32, memory: Option<&mut [u8]>, ) { // ... } ```
11 lines
302 B
Text
11 lines
302 B
Text
=== Optimizer Dump ===
|
|
returns_result: false
|
|
has_ref_opstate: false
|
|
has_rc_opstate: false
|
|
has_fast_callback_option: false
|
|
needs_fast_callback_option: true
|
|
fast_result: Some(Void)
|
|
fast_parameters: [V8Value]
|
|
transforms: {0: Transform { kind: WasmMemory, index: 0 }}
|
|
is_async: false
|
|
fast_compatible: true
|