1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-24 08:09:08 -05:00
denoland-deno/ops/op2
Matt Mastracci 8fe9b8a4cc
refactor(ops): ops2 supports result in fast path (#19603)
Implements `Result` in fast-calls. Note that the approach here is
slightly different. Rather than store the last result in the `OpState`,
we put it into the `OpCtx` which saves us a lookup and lock in the error
case. We do not have to lock this field as it's guaranteed only one
runtime and thread can ever access it.

The fastcall path for many ops can avoid doing a great deal of work,
even for `Result` return values. In the previous iteration of `ops`, all
`Result`-returning functions would fetch and lock the `OpState`,
regardless of whether it was used or not.
2023-06-25 16:36:09 +02:00
..
test_cases/sync refactor(ops): ops2 supports result in fast path (#19603) 2023-06-25 16:36:09 +02:00
dispatch_fast.rs refactor(ops): ops2 supports result in fast path (#19603) 2023-06-25 16:36:09 +02:00
dispatch_slow.rs refactor(ops): ops2 supports result in fast path (#19603) 2023-06-25 16:36:09 +02:00
generator_state.rs refactor(ops): ops2 supports result in fast path (#19603) 2023-06-25 16:36:09 +02:00
mod.rs refactor(ops): ops2 supports result in fast path (#19603) 2023-06-25 16:36:09 +02:00
signature.rs refactor(ops): Adding op2 macro and implementing in a couple of places (#19534) 2023-06-24 13:54:10 +02:00