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

Unified Diff: test/cctest/interpreter/test-bytecode-generator.cc

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 | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/interpreter/test-bytecode-generator.cc
diff --git a/test/cctest/interpreter/test-bytecode-generator.cc b/test/cctest/interpreter/test-bytecode-generator.cc
index acd91182104ae49eee27df6ef17e305a669a90dd..b730fa63ebe15a0ff2f637a3da14b19dda0cc968 100644
--- a/test/cctest/interpreter/test-bytecode-generator.cc
+++ b/test/cctest/interpreter/test-bytecode-generator.cc
@@ -212,19 +212,12 @@ static void CheckBytecodeArrayEqual(const ExpectedSnippet<T, C>& expected,
if (expected.handler_count == 0) {
CHECK_EQ(CcTest::heap()->empty_fixed_array(), actual->handler_table());
} else {
- static const int kHTSize = 4; // see HandlerTable::kRangeEntrySize
- static const int kHTStart = 0; // see HandlerTable::kRangeStartIndex
- static const int kHTEnd = 1; // see HandlerTable::kRangeEndIndex
- static const int kHTHandler = 2; // see HandlerTable::kRangeHandlerIndex
HandlerTable* table = HandlerTable::cast(actual->handler_table());
- CHECK_EQ(expected.handler_count * kHTSize, table->length());
+ CHECK_EQ(expected.handler_count, table->NumberOfRangeEntries());
for (int i = 0; i < expected.handler_count; i++) {
- int start = Smi::cast(table->get(i * kHTSize + kHTStart))->value();
- int end = Smi::cast(table->get(i * kHTSize + kHTEnd))->value();
- int handler = Smi::cast(table->get(i * kHTSize + kHTHandler))->value();
- CHECK_EQ(expected.handlers[i].start, start);
- CHECK_EQ(expected.handlers[i].end, end);
- CHECK_EQ(expected.handlers[i].handler, handler >> 1);
+ CHECK_EQ(expected.handlers[i].start, table->GetRangeStart(i));
+ CHECK_EQ(expected.handlers[i].end, table->GetRangeEnd(i));
+ CHECK_EQ(expected.handlers[i].handler, table->GetRangeHandler(i));
}
}
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698