| Index: test/cctest/heap/test-heap.cc
|
| diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
|
| index c4bf0f2f475c9928d67ce7dbce7b56be05bd90b5..ada4869feaf8ef21c88d9c4ee5ac2adcd5fc41c7 100644
|
| --- a/test/cctest/heap/test-heap.cc
|
| +++ b/test/cctest/heap/test-heap.cc
|
| @@ -2613,70 +2613,6 @@ TEST(InstanceOfStubWriteBarrier) {
|
| }
|
|
|
|
|
| -TEST(PrototypeTransitionClearing) {
|
| - if (FLAG_never_compact) return;
|
| - CcTest::InitializeVM();
|
| - Isolate* isolate = CcTest::i_isolate();
|
| - Factory* factory = isolate->factory();
|
| - v8::HandleScope scope(CcTest::isolate());
|
| - v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| -
|
| - CompileRun("var base = {};");
|
| - i::Handle<JSReceiver> baseObject =
|
| - v8::Utils::OpenHandle(*v8::Local<v8::Object>::Cast(
|
| - CcTest::global()->Get(ctx, v8_str("base")).ToLocalChecked()));
|
| -
|
| - int initialTransitions =
|
| - TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map());
|
| -
|
| - CompileRun(
|
| - "var live = [];"
|
| - "for (var i = 0; i < 10; i++) {"
|
| - " var object = {};"
|
| - " var prototype = {};"
|
| - " object.__proto__ = prototype;"
|
| - " if (i >= 3) live.push(object, prototype);"
|
| - "}");
|
| -
|
| - // Verify that only dead prototype transitions are cleared.
|
| - CHECK_EQ(
|
| - initialTransitions + 10,
|
| - TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map()));
|
| - CcTest::heap()->CollectAllGarbage();
|
| - const int transitions = 10 - 3;
|
| - CHECK_EQ(
|
| - initialTransitions + transitions,
|
| - TransitionArray::NumberOfPrototypeTransitionsForTest(baseObject->map()));
|
| -
|
| - // Verify that prototype transitions array was compacted.
|
| - FixedArray* trans =
|
| - TransitionArray::GetPrototypeTransitions(baseObject->map());
|
| - for (int i = initialTransitions; i < initialTransitions + transitions; i++) {
|
| - int j = TransitionArray::kProtoTransitionHeaderSize + i;
|
| - CHECK(trans->get(j)->IsWeakCell());
|
| - CHECK(WeakCell::cast(trans->get(j))->value()->IsMap());
|
| - }
|
| -
|
| - // Make sure next prototype is placed on an old-space evacuation candidate.
|
| - Handle<JSObject> prototype;
|
| - PagedSpace* space = CcTest::heap()->old_space();
|
| - {
|
| - AlwaysAllocateScope always_allocate(isolate);
|
| - SimulateFullSpace(space);
|
| - prototype = factory->NewJSArray(32 * KB, FAST_HOLEY_ELEMENTS,
|
| - Strength::WEAK, TENURED);
|
| - }
|
| -
|
| - // Add a prototype on an evacuation candidate and verify that transition
|
| - // clearing correctly records slots in prototype transition array.
|
| - i::FLAG_always_compact = true;
|
| - Handle<Map> map(baseObject->map());
|
| - CHECK(!space->LastPage()->Contains(
|
| - TransitionArray::GetPrototypeTransitions(*map)->address()));
|
| - CHECK(space->LastPage()->Contains(prototype->address()));
|
| -}
|
| -
|
| -
|
| TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
| i::FLAG_stress_compaction = false;
|
| i::FLAG_allow_natives_syntax = true;
|
|
|