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

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

Issue 283383006: Inobject slack tracking is done on a per-closure basis instead of per-shared info basis. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review comments Created 6 years, 7 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/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-mementos.cc
diff --git a/test/cctest/test-mementos.cc b/test/cctest/test-mementos.cc
index a377b4a4c6f31c0a8139f3dc9d1ae95ee37de817..4aee57c53e6257ced4f57b62b5be3bff9eab6cfd 100644
--- a/test/cctest/test-mementos.cc
+++ b/test/cctest/test-mementos.cc
@@ -89,10 +89,7 @@ TEST(PretenuringCallNew) {
Isolate* isolate = CcTest::i_isolate();
Heap* heap = isolate->heap();
- // We need to create several instances to get past the slack-tracking
- // phase, where mementos aren't emitted.
int call_count = 10;
- CHECK_GE(call_count, SharedFunctionInfo::kGenerousAllocationCount);
i::ScopedVector<char> test_buf(1024);
const char* program =
"function f() {"
@@ -117,8 +114,8 @@ TEST(PretenuringCallNew) {
CHECK_EQ(memento->map(), heap->allocation_memento_map());
// Furthermore, how many mementos did we create? The count should match
- // call_count - SharedFunctionInfo::kGenerousAllocationCount.
+ // call_count. Note, that mementos are allocated during the inobject slack
+ // tracking phase.
AllocationSite* site = memento->GetAllocationSite();
- CHECK_EQ(call_count - SharedFunctionInfo::kGenerousAllocationCount,
- site->pretenure_create_count()->value());
+ CHECK_EQ(call_count, site->pretenure_create_count()->value());
}
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698