Commit 6e856b5e authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][interpreter] Remove RaiseException

This method was there to turn a trap into an exception. It's not used
any more, so can be removed.

R=ahaas@chromium.org

Bug: v8:10389
Change-Id: I39bb3141722ddf1e09271348016c1d6f6d72b928
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264103Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68534}
parent f2cb2028
......@@ -1184,18 +1184,6 @@ class WasmInterpreterInternals {
uint64_t NumInterpretedCalls() { return num_interpreted_calls_; }
WasmInterpreter::ExceptionHandlingResult RaiseException(
Isolate* isolate, Handle<Object> exception) {
DCHECK_EQ(WasmInterpreter::TRAPPED, state_);
isolate->Throw(*exception); // Will check that none is pending.
if (HandleException(isolate) == WasmInterpreter::UNWOUND) {
DCHECK_EQ(WasmInterpreter::STOPPED, state_);
return WasmInterpreter::UNWOUND;
}
state_ = WasmInterpreter::PAUSED;
return WasmInterpreter::HANDLED;
}
CodeMap* codemap() { return &codemap_; }
private:
......
......@@ -49,10 +49,9 @@ class WasmInterpreter {
// | +--------Run()/Step()---------+ |
// V V | |
// STOPPED ---Run()--> RUNNING ------Pause()-----+-> PAUSED <--+
// ^ | | | | / |
// +--- Exception ---+ | | +--- Breakpoint ---+ RaiseException() <--+
// | | |
// | +---------- Trap --------------> TRAPPED --------+
// ^ | | | | /
// +--- Exception ---+ | | +--- Breakpoint ---+
// | +---------- Trap --------------> TRAPPED
// +----------- Finish -------------> FINISHED
enum State { STOPPED, RUNNING, PAUSED, FINISHED, TRAPPED };
......@@ -75,12 +74,6 @@ class WasmInterpreter {
void Pause();
void Reset();
// Raise an exception in the current activation and unwind the stack
// accordingly. Return whether the exception was handled inside wasm:
// - HANDLED: Activation at handler position and in {PAUSED} state.
// - UNWOUND: Frames unwound, exception pending, and in {STOPPED} state.
ExceptionHandlingResult RaiseException(Isolate*, Handle<Object> exception);
// Stack inspection and modification.
WasmValue GetReturnValue(int index = 0);
TrapReason GetTrapReason();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment