| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[wasmfx] Implement resume_throw
The resume_throw instruction creates an exception using the current
stack's operands, resumes the target continuation and immediately throws
the exception from the top of that stack.
Like other stack switching instructions, this is implemented with a
builtin that saves the current register state and restores the target
state. But instead of restoring the saved PC, the builtin throws the
exception.
The builtin also handles the special case where the target continuation
was just created with cont.new and has not been started yet. The
corresponding stack is empty and should only be entered with the stack
entry wrapper. Do not switch in this case, and throw the exception from
the current stack instead which has the same observable behavior.
R=clem...@chromium.org
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Auto-Submit | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[riscv] [wasmfx] Implement resume_throw
Port commit 4522793ec3278e1af5581adf8f4b8a255ada03ec
Bug: 388533754
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
struct WasmFXResumeThrow : public Descriptor<WasmFXResumeThrow> {
static constexpr auto kFunction = Builtin::kWasmFXResumeThrow;
// Target stack, tag, exception array and instance.
using arguments_t = std::tuple<V<WordPtr>, V<WasmTagObject>, V<FixedArray>,
V<WasmTrustedInstanceData>>;
// Return values buffer.
using results_t = std::tuple<V<WordPtr>>;
static constexpr bool kNeedsFrameState = false;
static constexpr bool kNeedsContext = false;
static constexpr Operator::Properties kProperties = Operator::kNoProperties;
static constexpr OpEffects kEffects = base_effects.CanCallAnything();
};Try to use the "new" descriptors when possible (cf earlier in this file, the ones that use the ARG macro)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[loong64][wasmfx] Implement resume_throw
Port commit 4522793ec3278e1af5581adf8f4b8a255ada03ec
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
struct WasmFXResumeThrow : public Descriptor<WasmFXResumeThrow> {
static constexpr auto kFunction = Builtin::kWasmFXResumeThrow;
// Target stack, tag, exception array and instance.
using arguments_t = std::tuple<V<WordPtr>, V<WasmTagObject>, V<FixedArray>,
V<WasmTrustedInstanceData>>;
// Return values buffer.
using results_t = std::tuple<V<WordPtr>>;
static constexpr bool kNeedsFrameState = false;
static constexpr bool kNeedsContext = false;
static constexpr Operator::Properties kProperties = Operator::kNoProperties;
static constexpr OpEffects kEffects = base_effects.CanCallAnything();
};Try to use the "new" descriptors when possible (cf earlier in this file, the ones that use the ARG macro)
I gave it a quick try for this new descriptor, but I'm hitting a compilation error because we build the call using `CallBuiltinThroughJumptable()` (in src/wasm/turboshaft-graph-interface.cc) which relies on the old format. The problem is that this helper function is used by other wasm builtins, so it's starting to look simpler to migrate all the wasm descriptors in a separate change.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |