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 /test_ffi/tests/integration_tests.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 'test_ffi/tests/integration_tests.rs')
-rw-r--r-- | test_ffi/tests/integration_tests.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test_ffi/tests/integration_tests.rs b/test_ffi/tests/integration_tests.rs index a4f233e45..ad00465e6 100644 --- a/test_ffi/tests/integration_tests.rs +++ b/test_ffi/tests/integration_tests.rs @@ -1,5 +1,6 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +use pretty_assertions::assert_eq; use std::process::Command; use test_util::deno_cmd; @@ -54,11 +55,11 @@ fn basic() { [ 4, 5, 6 ]\n\ Hello from pointer!\n\ pointer!\n\ - false\n\ - true\n\ - false\n\ - true\n\ - false\n\ + false false\n\ + true true\n\ + false false\n\ + true true\n\ + false false\n\ 579\n\ true\n\ 579\n\ |