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()); |
-} |