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

Unified Diff: src/objects-inl.h

Issue 1641723002: [interpreter] Translate exception handlers into graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments. Created 4 years, 11 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') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index f6f3287bfbe388c3782756d1ca99b1057e42310f..9b08ab1d9bbdfa21ec6f3f3708952d823979cf92 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3413,6 +3413,18 @@ int LiteralsArray::literals_count() const {
return length() - kFirstLiteralIndex;
}
+int HandlerTable::GetRangeStart(int index) const {
+ return Smi::cast(get(index * kRangeEntrySize + kRangeStartIndex))->value();
+}
+
+int HandlerTable::GetRangeEnd(int index) const {
+ return Smi::cast(get(index * kRangeEntrySize + kRangeEndIndex))->value();
+}
+
+int HandlerTable::GetRangeHandler(int index) const {
+ return HandlerOffsetField::decode(
+ Smi::cast(get(index * kRangeEntrySize + kRangeHandlerIndex))->value());
+}
void HandlerTable::SetRangeStart(int index, int value) {
set(index * kRangeEntrySize + kRangeStartIndex, Smi::FromInt(value));
@@ -3449,6 +3461,9 @@ void HandlerTable::SetReturnHandler(int index, int offset,
set(index * kReturnEntrySize + kReturnHandlerIndex, Smi::FromInt(value));
}
+int HandlerTable::NumberOfRangeEntries() const {
+ return length() / kRangeEntrySize;
+}
#define MAKE_STRUCT_CAST(NAME, Name, name) CAST_ACCESSOR(Name)
STRUCT_LIST(MAKE_STRUCT_CAST)
« no previous file with comments | « src/objects.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698