Commit 9a5650ac authored by Hannes Payer's avatar Hannes Payer

Remove obsolete PrototypeTransitionClearing cctest.

BUG=

Review URL: https://codereview.chromium.org/1520793003 .

Cr-Commit-Position: refs/heads/master@{#32795}
parent 4c5b3609
......@@ -101,7 +101,6 @@
# BUG(2340). Preprocessing stack traces is disabled at the moment.
'test-heap/PreprocessStackTrace': [FAIL],
'test-heap/PrototypeTransitionClearing': [FAIL],
# BUG(4333). Function name inferrer does not work for ES6 clases.
'test-func-name-inference/UpperCaseClass': [FAIL],
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment