diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-10-05 07:35:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-05 15:35:21 +0200 |
commit | 1619932a651a189d590bd579f334faac3c6b4397 (patch) | |
tree | 8f3771655e44ee5bf661ece398895c22d557e977 /ext/ffi/lib.rs | |
parent | 5d98a544b421e2b0bc3f99318fe44d1fed6d95d9 (diff) |
chore(ext/ffi): migrate from op -> op2 for ffi (#20509)
Migrate to op2. Making a few decisions to get this across the line:
- Empty slices, no matter where the come from, are null pointers. The v8
bugs (https://bugs.chromium.org/p/v8/issues/detail?id=13489) and
(https://bugs.chromium.org/p/v8/issues/detail?id=13488) make passing
around zero-length slice pointers too dangerous as they might be
uninitialized or null data.
- Offsets and lengths are `#[number] isize` and `#[number] usize`
respectively -- 53 bits should be enough for anyone
- Pointers are bigints. This is a u64 in the fastcall world, and can
accept Integer/Int32/Number/BigInt v8 types in the slow world.
Diffstat (limited to 'ext/ffi/lib.rs')
-rw-r--r-- | ext/ffi/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs index 1ca921119..a3cd0ebda 100644 --- a/ext/ffi/lib.rs +++ b/ext/ffi/lib.rs @@ -74,6 +74,7 @@ deno_core::extension!(deno_ffi, op_ffi_ptr_create<P>, op_ffi_ptr_equals<P>, op_ffi_ptr_of<P>, + op_ffi_ptr_of_exact<P>, op_ffi_ptr_offset<P>, op_ffi_ptr_value<P>, op_ffi_get_buf<P>, |