Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: src/frames.cc

Issue 2378773013: [WASM] Implements catch for the wasm low level exception mechanism. (Closed)
Patch Set: updates effect dependencies. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 117f63ce3f471ee777b933f236e24b6fb1eb9a85..470601e5b4b407bb6b05e4c377b2d458728684ac 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1477,6 +1477,15 @@ Script* WasmFrame::script() const {
return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index());
}
+int WasmFrame::LookupExceptionHandlerInTable(int* stack_slots) {
+ DCHECK_NOT_NULL(stack_slots);
+ Code* code = LookupCode();
+ HandlerTable* table = HandlerTable::cast(code->handler_table());
+ int pc_offset = static_cast<int>(pc() - code->entry());
+ *stack_slots = code->stack_slots();
+ return table->LookupReturn(pc_offset);
+}
+
namespace {

Powered by Google App Engine
This is Rietveld 408576698