| Index: test/cctest/test-heap.cc
|
| diff --git a/test/cctest/test-heap.cc b/test/cctest/test-heap.cc
|
| index eec5264eb8c4b9c46c600d9f617087eeb8cbbd69..339768b95fc188342ec2536c8b1f0eef58e5894d 100644
|
| --- a/test/cctest/test-heap.cc
|
| +++ b/test/cctest/test-heap.cc
|
| @@ -2637,14 +2637,15 @@ TEST(Regress1465) {
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 256;
|
|
|
| + CompileRun("function F() {}");
|
| {
|
| AlwaysAllocateScope always_allocate(CcTest::i_isolate());
|
| for (int i = 0; i < transitions_count; i++) {
|
| EmbeddedVector<char, 64> buffer;
|
| - OS::SNPrintF(buffer, "var o = new Object; o.prop%d = %d;", i, i);
|
| + OS::SNPrintF(buffer, "var o = new F; o.prop%d = %d;", i, i);
|
| CompileRun(buffer.start());
|
| }
|
| - CompileRun("var root = new Object;");
|
| + CompileRun("var root = new F;");
|
| }
|
|
|
| Handle<JSObject> root =
|
| @@ -2673,7 +2674,7 @@ static void AddTransitions(int transitions_count) {
|
| AlwaysAllocateScope always_allocate(CcTest::i_isolate());
|
| for (int i = 0; i < transitions_count; i++) {
|
| EmbeddedVector<char, 64> buffer;
|
| - OS::SNPrintF(buffer, "var o = new Object; o.prop%d = %d;", i, i);
|
| + OS::SNPrintF(buffer, "var o = new F; o.prop%d = %d;", i, i);
|
| CompileRun(buffer.start());
|
| }
|
| }
|
| @@ -2706,8 +2707,9 @@ TEST(TransitionArrayShrinksDuringAllocToZero) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| + CompileRun("function F() { }");
|
| AddTransitions(transitions_count);
|
| - CompileRun("var root = new Object;");
|
| + CompileRun("var root = new F;");
|
| Handle<JSObject> root = GetByName("root");
|
|
|
| // Count number of live transitions before marking.
|
| @@ -2715,8 +2717,8 @@ TEST(TransitionArrayShrinksDuringAllocToZero) {
|
| CHECK_EQ(transitions_count, transitions_before);
|
|
|
| // Get rid of o
|
| - CompileRun("o = new Object;"
|
| - "root = new Object");
|
| + CompileRun("o = new F;"
|
| + "root = new F");
|
| root = GetByName("root");
|
| AddPropertyTo(2, root, "funny");
|
|
|
| @@ -2734,8 +2736,9 @@ TEST(TransitionArrayShrinksDuringAllocToOne) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| + CompileRun("function F() {}");
|
| AddTransitions(transitions_count);
|
| - CompileRun("var root = new Object;");
|
| + CompileRun("var root = new F;");
|
| Handle<JSObject> root = GetByName("root");
|
|
|
| // Count number of live transitions before marking.
|
| @@ -2759,8 +2762,9 @@ TEST(TransitionArrayShrinksDuringAllocToOnePropertyFound) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| + CompileRun("function F() {}");
|
| AddTransitions(transitions_count);
|
| - CompileRun("var root = new Object;");
|
| + CompileRun("var root = new F;");
|
| Handle<JSObject> root = GetByName("root");
|
|
|
| // Count number of live transitions before marking.
|
| @@ -2784,16 +2788,17 @@ TEST(TransitionArraySimpleToFull) {
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 1;
|
| + CompileRun("function F() {}");
|
| AddTransitions(transitions_count);
|
| - CompileRun("var root = new Object;");
|
| + CompileRun("var root = new F;");
|
| Handle<JSObject> root = GetByName("root");
|
|
|
| // Count number of live transitions before marking.
|
| int transitions_before = CountMapTransitions(root->map());
|
| CHECK_EQ(transitions_count, transitions_before);
|
|
|
| - CompileRun("o = new Object;"
|
| - "root = new Object");
|
| + CompileRun("o = new F;"
|
| + "root = new F");
|
| root = GetByName("root");
|
| ASSERT(root->map()->transitions()->IsSimpleTransition());
|
| AddPropertyTo(2, root, "happy");
|
|
|