0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-04 09:57:11 -05:00
deno/tests
snek 6206343b54
fix: handle all values for buffers in turbocall codegen (#28170)
Now that ArrayBuffer/ArrayBufferView is a generic Value type, we have to
handle it being passed any value. To do this, thread
FastApiCallbackOptions through the function, and add error raising
logic.

If we run conversion and the value is not valid, we return `isize::MAX`,
and then in cranelift we use this value to know that we should branch to
the error logic.

An example compilation looks like this:
```rust
extern "C" fn print_buffer(ptr: *const u8, len: usize);
```

```clif
function %print_buffer_wrapper(i64, i64, i64, i64) system_v {
    sig0 = (i64, i64) system_v
    sig1 = (i64) -> i64 system_v
    sig2 = (i64) system_v

block0(v0: i64, v1: i64, v2: i64, v3: i64):
    v4 = iconst.i64 0x6525_9198_2d00 ; turbocall_ab_contents
    v5 = call_indirect sig1, v4(v1)
    v6 = iconst.i64 0x7fff_ffff_ffff_ffff
    v7 = icmp eq v5, v6
    brif v7, block1, block2

block2:
    v8 = iconst.i64 0x7558_4c0c_0700 ; sym.ptr
    call_indirect sig0, v8(v5, v2)
    return

block1 cold:
    v9 = iconst.i64 0x6525_9198_2d70 ; turbocall_raise
    call_indirect sig2, v9(v3)
    return
}
```

Also cleaned up all the `unwrap`s and added some logging.
2025-02-18 16:24:25 +00:00
..
config
ffi fix: handle all values for buffers in turbocall codegen (#28170) 2025-02-18 16:24:25 +00:00
integration fix(lsp): include description for auto-import completions (#28088) 2025-02-12 15:59:18 +00:00
napi fix(ext/napi): napi_is_buffer tests for ArrayBufferView (#27956) 2025-02-04 14:30:40 +00:00
node_compat test: clean up node_compat test runner (#28028) 2025-02-11 14:00:38 +09:00
registry feat: TypeScript 5.7 (#27857) 2025-01-31 16:07:42 -05:00
specs fix(lint): don't mark plugin diagnostic as fixable, if it's not (#28147) 2025-02-17 14:46:55 +00:00
testdata refactor: object wrap WebGPU (#27665) 2025-02-12 13:45:41 +00:00
unit feat(jupyter): make GPUTexture and GPUBuffer displayable (#28117) 2025-02-18 00:29:45 -08:00
unit_node fix(ext/node): implement StatementSync#iterate (#28168) 2025-02-18 21:26:17 +05:30
util fix: cache bust http cache on lockfile integrity mismatch (#28087) 2025-02-13 13:23:24 +01:00
wpt fix(ext/crypto): export private x25519 JWK key (#27828) 2025-01-27 22:25:00 +05:30
Cargo.toml ci(lsp): timeout tests after 5 minutes (#28036) 2025-02-10 16:15:43 +00:00
lib.rs chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00
README.md

Deno Integration Tests