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

Unified Diff: vm/dart_api_impl_test.cc

Issue 8827016: Add a flags field to RawObject so that we can tag objects with certain (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « tests/vm/vm.status ('k') | vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/dart_api_impl_test.cc
===================================================================
--- vm/dart_api_impl_test.cc (revision 2210)
+++ vm/dart_api_impl_test.cc (working copy)
@@ -1082,10 +1082,11 @@
// We expect the newly created "NativeFields" object to have
// 2 dart instance fields (fld1, fld2) and kNumNativeFields native fields.
// Hence the size of an instance of "NativeFields" should be
- // (kNumNativeFields + 2) * kWordSize + sizeof the header word.
+ // (kNumNativeFields + 2) * kWordSize + size of object header.
// We check to make sure the instance size computed by the VM matches
// our expectations.
- EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + kWordSize,
+ intptr_t header_size = sizeof(RawObject);
+ EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + header_size,
kObjectAlignment),
cls.instance_size());
}
@@ -1168,10 +1169,11 @@
// We expect the newly created "NativeFields" object to have
// 2 dart instance fields (fld1, fld2) and kNumNativeFields native fields.
// Hence the size of an instance of "NativeFields" should be
- // (kNumNativeFields + 2) * kWordSize + sizeof the header word.
+ // (kNumNativeFields + 2) * kWordSize + size of object header.
// We check to make sure the instance size computed by the VM matches
// our expectations.
- EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + kWordSize,
+ intptr_t header_size = sizeof(RawObject);
+ EXPECT_EQ(Utils::RoundUp(((kNumNativeFields + 2) * kWordSize) + header_size,
kObjectAlignment),
cls.instance_size());
}
« no previous file with comments | « tests/vm/vm.status ('k') | vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698