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

Unified Diff: src/deoptimizer.cc

Issue 2536673002: Revert of [deoptimizer] Remove dead Code::LookupRangeInHandlerTable. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 31147dd2002af2b97db93d82d4eaedc5634f58a8..77ac4d8fbda23f294c4802657a4df043398f72a9 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -627,23 +627,28 @@
int LookupCatchHandler(TranslatedFrame* translated_frame, int* data_out) {
switch (translated_frame->kind()) {
case TranslatedFrame::kFunction: {
-#ifdef DEBUG
+ BailoutId node_id = translated_frame->node_id();
JSFunction* function =
JSFunction::cast(translated_frame->begin()->GetRawValue());
Code* non_optimized_code = function->shared()->code();
+ FixedArray* raw_data = non_optimized_code->deoptimization_data();
+ DeoptimizationOutputData* data = DeoptimizationOutputData::cast(raw_data);
+ unsigned pc_and_state =
+ Deoptimizer::GetOutputInfo(data, node_id, function->shared());
+ unsigned pc_offset = FullCodeGenerator::PcField::decode(pc_and_state);
HandlerTable* table =
HandlerTable::cast(non_optimized_code->handler_table());
- DCHECK_EQ(0, table->NumberOfRangeEntries());
-#endif
- break;
+ HandlerTable::CatchPrediction prediction;
+ return table->LookupRange(pc_offset, data_out, &prediction);
}
case TranslatedFrame::kInterpretedFunction: {
int bytecode_offset = translated_frame->node_id().ToInt();
JSFunction* function =
JSFunction::cast(translated_frame->begin()->GetRawValue());
BytecodeArray* bytecode = function->shared()->bytecode_array();
+ HandlerTable::CatchPrediction prediction;
return bytecode->LookupRangeInHandlerTable(bytecode_offset, data_out,
- nullptr);
+ &prediction);
}
default:
break;
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698