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

Unified Diff: test/cctest/test-heap.cc

Issue 1254873002: [interpreter] A couple of minor tweaks to BytecodeArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap.cc
diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
index e0f758df2b90721ff579a0632d5f655d9b65e14f..3729917eedfce16b4cdbcb67017c044bba7d2fa0 100644
--- a/test/cctest/test-heap.cc
+++ b/test/cctest/test-heap.cc
@@ -571,7 +571,6 @@ TEST(BytecodeArray) {
static const uint8_t kRawBytes[] = {0xc3, 0x7e, 0xa5, 0x5a};
static const int kRawBytesSize = sizeof(kRawBytes);
static const int kFrameSize = 32;
- static const int kNumberOfLocals = 20;
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
@@ -581,13 +580,11 @@ TEST(BytecodeArray) {
// Allocate and initialize BytecodeArray
Handle<BytecodeArray> array =
- factory->NewBytecodeArray(kRawBytesSize, kRawBytes);
-
- array->set_frame_size(kFrameSize);
- array->set_number_of_locals(kNumberOfLocals);
+ factory->NewBytecodeArray(kRawBytesSize, kRawBytes, kFrameSize);
CHECK(array->IsBytecodeArray());
CHECK_EQ(array->length(), (int)sizeof(kRawBytes));
+ CHECK_EQ(array->frame_size(), kFrameSize);
CHECK_LE(array->address(), array->GetFirstBytecodeAddress());
CHECK_GE(array->address() + array->BytecodeArraySize(),
array->GetFirstBytecodeAddress() + array->length());
@@ -601,7 +598,6 @@ TEST(BytecodeArray) {
// BytecodeArray should survive
CHECK_EQ(array->length(), kRawBytesSize);
- CHECK_EQ(array->number_of_locals(), kNumberOfLocals);
CHECK_EQ(array->frame_size(), kFrameSize);
for (int i = 0; i < kRawBytesSize; i++) {
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698