summaryrefslogtreecommitdiff
path: root/ops/optimizer_tests
diff options
context:
space:
mode:
Diffstat (limited to 'ops/optimizer_tests')
-rw-r--r--ops/optimizer_tests/op_state_with_transforms.expected2
-rw-r--r--ops/optimizer_tests/op_state_with_transforms.out8
-rw-r--r--ops/optimizer_tests/raw_ptr.out8
-rw-r--r--ops/optimizer_tests/uint8array.expected2
-rw-r--r--ops/optimizer_tests/uint8array.out19
-rw-r--r--ops/optimizer_tests/wasm_op.expected2
6 files changed, 8 insertions, 33 deletions
diff --git a/ops/optimizer_tests/op_state_with_transforms.expected b/ops/optimizer_tests/op_state_with_transforms.expected
index d6757801e..f5f236b7d 100644
--- a/ops/optimizer_tests/op_state_with_transforms.expected
+++ b/ops/optimizer_tests/op_state_with_transforms.expected
@@ -3,7 +3,7 @@ returns_result: false
has_ref_opstate: true
has_rc_opstate: false
has_fast_callback_option: false
-needs_fast_callback_option: true
+needs_fast_callback_option: false
fast_result: Some(Void)
fast_parameters: [V8Value, Uint8Array]
transforms: {1: Transform { kind: SliceU8(true), index: 1 }}
diff --git a/ops/optimizer_tests/op_state_with_transforms.out b/ops/optimizer_tests/op_state_with_transforms.out
index 541a4fd36..b2ded3c5a 100644
--- a/ops/optimizer_tests/op_state_with_transforms.out
+++ b/ops/optimizer_tests/op_state_with_transforms.out
@@ -142,13 +142,7 @@ where
as *const _ops::OpCtx)
};
let state = &mut ::std::cell::RefCell::borrow_mut(&__ctx.state);
- let buf = match unsafe { &*buf }.get_storage_if_aligned() {
- Some(v) => v,
- None => {
- unsafe { &mut *fast_api_callback_options }.fallback = true;
- return Default::default();
- }
- };
+ let buf = unsafe { (&*buf).get_storage_if_aligned().unwrap_unchecked() };
let result = op_now::call::<TP>(state, buf);
result
}
diff --git a/ops/optimizer_tests/raw_ptr.out b/ops/optimizer_tests/raw_ptr.out
index f9f467ad9..cf678ddb9 100644
--- a/ops/optimizer_tests/raw_ptr.out
+++ b/ops/optimizer_tests/raw_ptr.out
@@ -169,13 +169,7 @@ where
as *const _ops::OpCtx)
};
let state = &mut ::std::cell::RefCell::borrow_mut(&__ctx.state);
- let buf = match unsafe { &*buf }.get_storage_if_aligned() {
- Some(v) => v.as_ptr(),
- None => {
- unsafe { &mut *fast_api_callback_options }.fallback = true;
- return Default::default();
- }
- };
+ let buf = unsafe { (&*buf).get_storage_if_aligned().unwrap_unchecked() }.as_ptr();
let out = match unsafe { &*out }.get_storage_if_aligned() {
Some(v) => v,
None => {
diff --git a/ops/optimizer_tests/uint8array.expected b/ops/optimizer_tests/uint8array.expected
index 0e5667a63..49554a2e8 100644
--- a/ops/optimizer_tests/uint8array.expected
+++ b/ops/optimizer_tests/uint8array.expected
@@ -3,7 +3,7 @@ returns_result: false
has_ref_opstate: false
has_rc_opstate: false
has_fast_callback_option: false
-needs_fast_callback_option: true
+needs_fast_callback_option: false
fast_result: Some(Bool)
fast_parameters: [V8Value, Uint8Array, Uint8Array]
transforms: {0: Transform { kind: SliceU8(false), index: 0 }, 1: Transform { kind: SliceU8(true), index: 1 }}
diff --git a/ops/optimizer_tests/uint8array.out b/ops/optimizer_tests/uint8array.out
index 90d420fa0..bd7fa4d87 100644
--- a/ops/optimizer_tests/uint8array.out
+++ b/ops/optimizer_tests/uint8array.out
@@ -158,7 +158,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_import_spki_x25519_fas
fn args(&self) -> &'static [deno_core::v8::fast_api::Type] {
use deno_core::v8::fast_api::Type::*;
use deno_core::v8::fast_api::CType;
- &[V8Value, TypedArray(CType::Uint8), TypedArray(CType::Uint8), CallbackOptions]
+ &[V8Value, TypedArray(CType::Uint8), TypedArray(CType::Uint8)]
}
fn return_type(&self) -> deno_core::v8::fast_api::CType {
deno_core::v8::fast_api::CType::Bool
@@ -168,24 +168,11 @@ fn op_import_spki_x25519_fast_fn<'scope>(
_: deno_core::v8::Local<deno_core::v8::Object>,
key_data: *const deno_core::v8::fast_api::FastApiTypedArray<u8>,
out: *const deno_core::v8::fast_api::FastApiTypedArray<u8>,
- fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
) -> bool {
use deno_core::v8;
use deno_core::_ops;
- let key_data = match unsafe { &*key_data }.get_storage_if_aligned() {
- Some(v) => v,
- None => {
- unsafe { &mut *fast_api_callback_options }.fallback = true;
- return Default::default();
- }
- };
- let out = match unsafe { &*out }.get_storage_if_aligned() {
- Some(v) => v,
- None => {
- unsafe { &mut *fast_api_callback_options }.fallback = true;
- return Default::default();
- }
- };
+ let key_data = unsafe { (&*key_data).get_storage_if_aligned().unwrap_unchecked() };
+ let out = unsafe { (&*out).get_storage_if_aligned().unwrap_unchecked() };
let result = op_import_spki_x25519::call(key_data, out);
result
}
diff --git a/ops/optimizer_tests/wasm_op.expected b/ops/optimizer_tests/wasm_op.expected
index 98cfb4e7d..8d3719cf7 100644
--- a/ops/optimizer_tests/wasm_op.expected
+++ b/ops/optimizer_tests/wasm_op.expected
@@ -3,7 +3,7 @@ returns_result: false
has_ref_opstate: false
has_rc_opstate: false
has_fast_callback_option: false
-needs_fast_callback_option: true
+needs_fast_callback_option: false
fast_result: Some(Void)
fast_parameters: [V8Value]
transforms: {0: Transform { kind: WasmMemory, index: 0 }}