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

Unified Diff: src/objects.cc

Issue 2197183002: [debugger] use handler table on unoptimized code for exception prediction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: address comments and rebase Created 4 years, 4 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
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 38deeb825d4b291c707d5e76c1f3cffbf4f1b94a..56cf5b30bf6ebdb20e5301359ef2c6c37acd9ff4 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10229,14 +10229,11 @@ int HandlerTable::LookupRange(int pc_offset, int* data_out,
// TODO(turbofan): Make sure table is sorted and use binary search.
-int HandlerTable::LookupReturn(int pc_offset, CatchPrediction* prediction_out) {
+int HandlerTable::LookupReturn(int pc_offset) {
for (int i = 0; i < length(); i += kReturnEntrySize) {
int return_offset = Smi::cast(get(i + kReturnOffsetIndex))->value();
int handler_field = Smi::cast(get(i + kReturnHandlerIndex))->value();
if (pc_offset == return_offset) {
- if (prediction_out) {
- *prediction_out = HandlerPredictionField::decode(handler_field);
- }
return HandlerOffsetField::decode(handler_field);
}
}
@@ -13723,6 +13720,12 @@ uint32_t Code::TranslateAstIdToPcOffset(BailoutId ast_id) {
return 0;
}
+int Code::LookupRangeInHandlerTable(int code_offset, int* data,
+ HandlerTable::CatchPrediction* prediction) {
+ DCHECK(!is_optimized_code());
+ HandlerTable* table = HandlerTable::cast(handler_table());
+ return table->LookupRange(code_offset, data, prediction);
+}
void Code::MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate) {
PatchPlatformCodeAge(isolate, sequence, kNoAgeCodeAge, NO_MARKING_PARITY);
@@ -14477,6 +14480,13 @@ void BytecodeArray::CopyBytecodesTo(BytecodeArray* to) {
from->length());
}
+int BytecodeArray::LookupRangeInHandlerTable(
+ int code_offset, int* data, HandlerTable::CatchPrediction* prediction) {
+ HandlerTable* table = HandlerTable::cast(handler_table());
+ code_offset++; // Point after current bytecode.
+ return table->LookupRange(code_offset, data, prediction);
+}
+
// static
void JSArray::Initialize(Handle<JSArray> array, int capacity, int length) {
DCHECK(capacity >= 0);
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698