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

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

Issue 1202173002: Remove --pretenuring-call-new (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 64 bit release build break. Created 5 years, 3 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/test-heap.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 a97666384bf245d3f7c1b840d93ddc9673cbb0f4..b26aad03a54354633c5fca254e0d0de41529374f 100644
--- a/test/cctest/test-mementos.cc
+++ b/test/cctest/test-mementos.cc
@@ -95,45 +95,3 @@ TEST(BadMementoAfterTopForceScavenge) {
// Force GC to test the poisoned memento handling
CcTest::i_isolate()->heap()->CollectGarbage(i::NEW_SPACE);
}
-
-
-TEST(PretenuringCallNew) {
- CcTest::InitializeVM();
- if (!i::FLAG_allocation_site_pretenuring) return;
- if (!i::FLAG_pretenuring_call_new) return;
- if (i::FLAG_always_opt) return;
-
- v8::HandleScope scope(CcTest::isolate());
- Isolate* isolate = CcTest::i_isolate();
- Heap* heap = isolate->heap();
-
- int call_count = 10;
- i::ScopedVector<char> test_buf(1024);
- const char* program =
- "function f() {"
- " this.a = 3;"
- " this.b = {};"
- " return this;"
- "};"
- "var a;"
- "for(var i = 0; i < %d; i++) {"
- " a = new f();"
- "}"
- "a;";
- i::SNPrintF(test_buf, program, call_count);
- v8::Local<v8::Value> res = CompileRun(test_buf.start());
- Handle<JSObject> o =
- v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(res));
-
- // The object of class f should have a memento secreted behind it.
- Address memento_address = o->address() + o->map()->instance_size();
- AllocationMemento* memento =
- reinterpret_cast<AllocationMemento*>(memento_address + kHeapObjectTag);
- CHECK_EQ(memento->map(), heap->allocation_memento_map());
-
- // Furthermore, how many mementos did we create? The count should match
- // call_count. Note, that mementos are allocated during the inobject slack
- // tracking phase.
- AllocationSite* site = memento->GetAllocationSite();
- CHECK_EQ(call_count, site->pretenure_create_count()->value());
-}
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698