Commit 13d2feef authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Remove catch prediction from handler table API.

This removes the ability to specify a catch prediction for exception
handler tables that are based on return addresses. The encoding for
handlers still looks the same to keep it in sync with tables based on
ranges, just no payload is stored in the respective bits.

R=yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2205893002
Cr-Commit-Position: refs/heads/master@{#38327}
parent c088aea9
......@@ -228,10 +228,8 @@ Handle<Code> CodeGenerator::GenerateCode() {
HandlerTable::LengthForReturn(static_cast<int>(handlers_.size())),
TENURED));
for (size_t i = 0; i < handlers_.size(); ++i) {
int position = handlers_[i].handler->pos();
HandlerTable::CatchPrediction prediction = HandlerTable::UNCAUGHT;
table->SetReturnOffset(static_cast<int>(i), handlers_[i].pc_offset);
table->SetReturnHandler(static_cast<int>(i), position, prediction);
table->SetReturnHandler(static_cast<int>(i), handlers_[i].handler->pos());
}
result->set_handler_table(*table);
}
......
......@@ -3464,12 +3464,6 @@ int HandlerTable::GetRangeData(int index) const {
return Smi::cast(get(index * kRangeEntrySize + kRangeDataIndex))->value();
}
HandlerTable::CatchPrediction HandlerTable::GetRangePrediction(
int index) const {
return HandlerPredictionField::decode(
Smi::cast(get(index * kRangeEntrySize + kRangeHandlerIndex))->value());
}
void HandlerTable::SetRangeStart(int index, int value) {
set(index * kRangeEntrySize + kRangeStartIndex, Smi::FromInt(value));
}
......@@ -3496,11 +3490,8 @@ void HandlerTable::SetReturnOffset(int index, int value) {
set(index * kReturnEntrySize + kReturnOffsetIndex, Smi::FromInt(value));
}
void HandlerTable::SetReturnHandler(int index, int offset,
CatchPrediction prediction) {
int value = HandlerOffsetField::encode(offset) |
HandlerPredictionField::encode(prediction);
void HandlerTable::SetReturnHandler(int index, int offset) {
int value = HandlerOffsetField::encode(offset);
set(index * kReturnEntrySize + kReturnHandlerIndex, Smi::FromInt(value));
}
......
......@@ -4492,7 +4492,7 @@ class HandlerTable : public FixedArray {
// Setters for handler table based on return addresses.
inline void SetReturnOffset(int index, int value);
inline void SetReturnHandler(int index, int offset, CatchPrediction pred);
inline void SetReturnHandler(int index, int offset);
// Lookup handler in a table based on ranges.
int LookupRange(int pc_offset, int* data, CatchPrediction* prediction);
......@@ -4500,9 +4500,6 @@ class HandlerTable : public FixedArray {
// Lookup handler in a table based on return addresses.
int LookupReturn(int pc_offset);
// Returns the conservative catch predication.
inline CatchPrediction GetRangePrediction(int index) const;
// Returns the number of entries in the table.
inline int NumberOfRangeEntries() const;
......
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