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

Unified Diff: src/interpreter/handler-table-builder.cc

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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/interpreter/handler-table-builder.cc
diff --git a/src/interpreter/handler-table-builder.cc b/src/interpreter/handler-table-builder.cc
index e3cb20b34dcab102593dd58cfca70f2608f8648d..20ceba3b6bbeeacaef0101ba36389cc9c87216be 100644
--- a/src/interpreter/handler-table-builder.cc
+++ b/src/interpreter/handler-table-builder.cc
@@ -23,8 +23,7 @@ Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable() {
HandlerTable::LengthForRange(handler_table_size), TENURED));
for (int i = 0; i < handler_table_size; ++i) {
Entry& entry = entries_[i];
- HandlerTable::CatchPrediction pred =
- entry.will_catch ? HandlerTable::CAUGHT : HandlerTable::UNCAUGHT;
+ HandlerTable::CatchPrediction pred = entry.catch_prediction_;
table->SetRangeStart(i, static_cast<int>(entry.offset_start));
table->SetRangeEnd(i, static_cast<int>(entry.offset_end));
table->SetRangeHandler(i, static_cast<int>(entry.offset_target), pred);
@@ -36,7 +35,7 @@ Handle<HandlerTable> HandlerTableBuilder::ToHandlerTable() {
int HandlerTableBuilder::NewHandlerEntry() {
int handler_id = static_cast<int>(entries_.size());
- Entry entry = {0, 0, 0, Register(), false};
+ Entry entry = {0, 0, 0, Register(), HandlerTable::UNCAUGHT};
entries_.push_back(entry);
return handler_id;
}
@@ -59,9 +58,9 @@ void HandlerTableBuilder::SetHandlerTarget(int handler_id, size_t offset) {
entries_[handler_id].offset_target = offset;
}
-
-void HandlerTableBuilder::SetPrediction(int handler_id, bool will_catch) {
- entries_[handler_id].will_catch = will_catch;
+void HandlerTableBuilder::SetPrediction(
+ int handler_id, HandlerTable::CatchPrediction prediction) {
+ entries_[handler_id].catch_prediction_ = prediction;
}

Powered by Google App Engine
This is Rietveld 408576698