| Index: test/cctest/heap/test-heap.cc
|
| diff --git a/test/cctest/heap/test-heap.cc b/test/cctest/heap/test-heap.cc
|
| index d8c83f3b409d7aa7d861b52c8406461869b0e4d0..b3df49dc072ad9c20dabdaca725d0277c2091682 100644
|
| --- a/test/cctest/heap/test-heap.cc
|
| +++ b/test/cctest/heap/test-heap.cc
|
| @@ -489,7 +489,8 @@ static void TestWeakGlobalHandleCallback(
|
|
|
|
|
| TEST(WeakGlobalHandlesScavenge) {
|
| - i::FLAG_stress_compaction = false;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| @@ -654,6 +655,7 @@ TEST(WeakGlobalApiHandleWithElementsScavenge) {
|
| }
|
|
|
| TEST(WeakGlobalHandlesMark) {
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Heap* heap = isolate->heap();
|
| @@ -700,7 +702,8 @@ TEST(WeakGlobalHandlesMark) {
|
|
|
|
|
| TEST(DeleteWeakGlobalHandle) {
|
| - i::FLAG_stress_compaction = false;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| @@ -739,7 +742,8 @@ TEST(BytecodeArray) {
|
| static const int kFrameSize = 32;
|
| static const int kParameterCount = 2;
|
|
|
| - i::FLAG_manual_evacuation_candidates_selection = true;
|
| + FLAG_manual_evacuation_candidates_selection = true;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Heap* heap = isolate->heap();
|
| @@ -1209,11 +1213,11 @@ TEST(Iteration) {
|
| }
|
|
|
| TEST(TestUseOfIncrementalBarrierOnCompileLazy) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| // Turn off always_opt because it interferes with running the built-in for
|
| // the last call to g().
|
| - i::FLAG_always_opt = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_always_opt = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Factory* factory = isolate->factory();
|
| @@ -1361,7 +1365,9 @@ TEST(TestInternalWeakLists) {
|
|
|
| // Some flags turn Scavenge collections into Mark-sweep collections
|
| // and hence are incompatible with this test case.
|
| - if (FLAG_gc_global || FLAG_stress_compaction) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| FLAG_retain_maps_for_n_gc = 0;
|
|
|
| static const int kNumTestContexts = 10;
|
| @@ -1958,7 +1964,7 @@ static int NumberOfGlobalObjects() {
|
| // Test that we don't embed maps from foreign contexts into
|
| // optimized code.
|
| TEST(LeakNativeContextViaMap) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope outer_scope(isolate);
|
| v8::Persistent<v8::Context> ctx1p;
|
| @@ -2007,7 +2013,7 @@ TEST(LeakNativeContextViaMap) {
|
| // Test that we don't embed functions from foreign contexts into
|
| // optimized code.
|
| TEST(LeakNativeContextViaFunction) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope outer_scope(isolate);
|
| v8::Persistent<v8::Context> ctx1p;
|
| @@ -2054,7 +2060,7 @@ TEST(LeakNativeContextViaFunction) {
|
|
|
|
|
| TEST(LeakNativeContextViaMapKeyed) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope outer_scope(isolate);
|
| v8::Persistent<v8::Context> ctx1p;
|
| @@ -2101,7 +2107,7 @@ TEST(LeakNativeContextViaMapKeyed) {
|
|
|
|
|
| TEST(LeakNativeContextViaMapProto) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| v8::Isolate* isolate = CcTest::isolate();
|
| v8::HandleScope outer_scope(isolate);
|
| v8::Persistent<v8::Context> ctx1p;
|
| @@ -2152,15 +2158,16 @@ TEST(LeakNativeContextViaMapProto) {
|
|
|
|
|
| TEST(InstanceOfStubWriteBarrier) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| #ifdef VERIFY_HEAP
|
| - i::FLAG_verify_heap = true;
|
| + FLAG_verify_heap = true;
|
| #endif
|
|
|
| CcTest::InitializeVM();
|
| if (!CcTest::i_isolate()->use_optimizer()) return;
|
| - if (i::FLAG_force_marking_deque_overflows) return;
|
| + if (FLAG_force_marking_deque_overflows) return;
|
| v8::HandleScope outer_scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
|
|
| @@ -2220,11 +2227,12 @@ int GetProfilerTicks(SharedFunctionInfo* shared) {
|
| } // namespace
|
|
|
| TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| #ifdef VERIFY_HEAP
|
| - i::FLAG_verify_heap = true;
|
| + FLAG_verify_heap = true;
|
| #endif
|
|
|
| CcTest::InitializeVM();
|
| @@ -2266,10 +2274,11 @@ TEST(ResetSharedFunctionInfoCountersDuringIncrementalMarking) {
|
|
|
|
|
| TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| #ifdef VERIFY_HEAP
|
| - i::FLAG_verify_heap = true;
|
| + FLAG_verify_heap = true;
|
| #endif
|
|
|
| CcTest::InitializeVM();
|
| @@ -2308,7 +2317,7 @@ TEST(ResetSharedFunctionInfoCountersDuringMarkSweep) {
|
|
|
|
|
| HEAP_TEST(GCFlags) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| CcTest::InitializeVM();
|
| Heap* heap = CcTest::heap();
|
|
|
| @@ -2341,8 +2350,9 @@ HEAP_TEST(GCFlags) {
|
|
|
|
|
| TEST(IdleNotificationFinishMarking) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| const int initial_gc_count = CcTest::heap()->gc_count();
|
| heap::SimulateFullSpace(CcTest::heap()->old_space());
|
| @@ -2389,10 +2399,12 @@ TEST(IdleNotificationFinishMarking) {
|
|
|
| // Test that HAllocateObject will always return an object in new-space.
|
| TEST(OptimizedAllocationAlwaysInNewSpace) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| heap::SimulateFullSpace(CcTest::heap()->new_space());
|
| @@ -2423,11 +2435,13 @@ TEST(OptimizedAllocationAlwaysInNewSpace) {
|
|
|
|
|
| TEST(OptimizedPretenuringAllocationFolding) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2474,11 +2488,13 @@ TEST(OptimizedPretenuringAllocationFolding) {
|
|
|
|
|
| TEST(OptimizedPretenuringObjectArrayLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2514,11 +2530,13 @@ TEST(OptimizedPretenuringObjectArrayLiterals) {
|
|
|
|
|
| TEST(OptimizedPretenuringMixedInObjectProperties) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2572,11 +2590,13 @@ TEST(OptimizedPretenuringMixedInObjectProperties) {
|
|
|
|
|
| TEST(OptimizedPretenuringDoubleArrayProperties) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2612,11 +2632,13 @@ TEST(OptimizedPretenuringDoubleArrayProperties) {
|
|
|
|
|
| TEST(OptimizedPretenuringdoubleArrayLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2652,11 +2674,13 @@ TEST(OptimizedPretenuringdoubleArrayLiterals) {
|
|
|
|
|
| TEST(OptimizedPretenuringNestedMixedArrayLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2702,11 +2726,13 @@ TEST(OptimizedPretenuringNestedMixedArrayLiterals) {
|
|
|
|
|
| TEST(OptimizedPretenuringNestedObjectLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2753,11 +2779,13 @@ TEST(OptimizedPretenuringNestedObjectLiterals) {
|
|
|
|
|
| TEST(OptimizedPretenuringNestedDoubleLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| // Grow new space unitl maximum capacity reached.
|
| @@ -2805,10 +2833,12 @@ TEST(OptimizedPretenuringNestedDoubleLiterals) {
|
|
|
| // Test regular array literals allocation.
|
| TEST(OptimizedAllocationArrayLiterals) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| - if (!CcTest::i_isolate()->use_optimizer() || i::FLAG_always_opt) return;
|
| - if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
| + if (!CcTest::i_isolate()->use_optimizer() || FLAG_always_opt) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| v8::Local<v8::Value> res = CompileRun(
|
| @@ -2841,11 +2871,12 @@ static int CountMapTransitions(Map* map) {
|
| // Test that map transitions are cleared and maps are collected with
|
| // incremental marking as well.
|
| TEST(Regress1465) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_trace_incremental_marking = true;
|
| - i::FLAG_retain_maps_for_n_gc = 0;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_trace_incremental_marking = true;
|
| + FLAG_retain_maps_for_n_gc = 0;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| @@ -2908,17 +2939,18 @@ static void AddPropertyTo(
|
| Factory* factory = isolate->factory();
|
| Handle<String> prop_name = factory->InternalizeUtf8String(property_name);
|
| Handle<Smi> twenty_three(Smi::FromInt(23), isolate);
|
| - i::FLAG_gc_interval = gc_count;
|
| - i::FLAG_gc_global = true;
|
| - i::FLAG_retain_maps_for_n_gc = 0;
|
| + FLAG_gc_interval = gc_count;
|
| + FLAG_gc_global = true;
|
| + FLAG_retain_maps_for_n_gc = 0;
|
| CcTest::heap()->set_allocation_timeout(gc_count);
|
| JSReceiver::SetProperty(object, prop_name, twenty_three, SLOPPY).Check();
|
| }
|
|
|
|
|
| TEST(TransitionArrayShrinksDuringAllocToZero) {
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| @@ -2947,8 +2979,9 @@ TEST(TransitionArrayShrinksDuringAllocToZero) {
|
|
|
|
|
| TEST(TransitionArrayShrinksDuringAllocToOne) {
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| @@ -2974,8 +3007,9 @@ TEST(TransitionArrayShrinksDuringAllocToOne) {
|
|
|
|
|
| TEST(TransitionArrayShrinksDuringAllocToOnePropertyFound) {
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 10;
|
| @@ -3001,8 +3035,9 @@ TEST(TransitionArrayShrinksDuringAllocToOnePropertyFound) {
|
|
|
|
|
| TEST(TransitionArraySimpleToFull) {
|
| - i::FLAG_stress_compaction = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| static const int transitions_count = 1;
|
| @@ -3031,7 +3066,7 @@ TEST(TransitionArraySimpleToFull) {
|
|
|
|
|
| TEST(Regress2143a) {
|
| - i::FLAG_incremental_marking = true;
|
| + FLAG_incremental_marking = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| @@ -3070,8 +3105,8 @@ TEST(Regress2143a) {
|
|
|
|
|
| TEST(Regress2143b) {
|
| - i::FLAG_incremental_marking = true;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_incremental_marking = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
|
|
| @@ -3114,19 +3149,19 @@ TEST(Regress2143b) {
|
|
|
| TEST(ReleaseOverReservedPages) {
|
| if (FLAG_never_compact) return;
|
| - i::FLAG_trace_gc = true;
|
| + FLAG_trace_gc = true;
|
| // The optimizer can allocate stuff, messing up the test.
|
| - i::FLAG_opt = false;
|
| - i::FLAG_always_opt = false;
|
| + FLAG_opt = false;
|
| + FLAG_always_opt = false;
|
| // Parallel compaction increases fragmentation, depending on how existing
|
| // memory is distributed. Since this is non-deterministic because of
|
| // concurrent sweeping, we disable it for this test.
|
| - i::FLAG_parallel_compaction = false;
|
| + FLAG_parallel_compaction = false;
|
| // Concurrent sweeping adds non determinism, depending on when memory is
|
| // available for further reuse.
|
| - i::FLAG_concurrent_sweeping = false;
|
| + FLAG_concurrent_sweeping = false;
|
| // Fast evacuation of pages may result in a different page count in old space.
|
| - i::FLAG_page_promotion = false;
|
| + FLAG_page_promotion = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| // If there's snapshot available, we don't know whether 20 small arrays will
|
| @@ -3183,7 +3218,7 @@ void MockUseCounterCallback(v8::Isolate* isolate,
|
|
|
|
|
| TEST(CountForcedGC) {
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::HandleScope scope(CcTest::isolate());
|
| @@ -3218,7 +3253,7 @@ TEST(PrintSharedFunctionInfo) {
|
|
|
| TEST(IncrementalMarkingPreservesMonomorphicCallIC) {
|
| if (!FLAG_incremental_marking) return;
|
| - if (i::FLAG_always_opt) return;
|
| + if (FLAG_always_opt) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Value> fun1, fun2;
|
| @@ -3292,8 +3327,8 @@ static void CheckVectorIC(Handle<JSFunction> f, int slot_index,
|
| }
|
|
|
| TEST(IncrementalMarkingPreservesMonomorphicConstructor) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - if (i::FLAG_always_opt) return;
|
| + if (!FLAG_incremental_marking) return;
|
| + if (FLAG_always_opt) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| @@ -3316,8 +3351,8 @@ TEST(IncrementalMarkingPreservesMonomorphicConstructor) {
|
| }
|
|
|
| TEST(IncrementalMarkingPreservesMonomorphicIC) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - if (i::FLAG_always_opt) return;
|
| + if (!FLAG_incremental_marking) return;
|
| + if (FLAG_always_opt) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Context> ctx = CcTest::isolate()->GetCurrentContext();
|
| @@ -3338,8 +3373,8 @@ TEST(IncrementalMarkingPreservesMonomorphicIC) {
|
| }
|
|
|
| TEST(IncrementalMarkingPreservesPolymorphicIC) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - if (i::FLAG_always_opt) return;
|
| + if (!FLAG_incremental_marking) return;
|
| + if (FLAG_always_opt) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Value> obj1, obj2;
|
| @@ -3376,8 +3411,8 @@ TEST(IncrementalMarkingPreservesPolymorphicIC) {
|
| }
|
|
|
| TEST(ContextDisposeDoesntClearPolymorphicIC) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - if (i::FLAG_always_opt) return;
|
| + if (!FLAG_incremental_marking) return;
|
| + if (FLAG_always_opt) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| v8::Local<v8::Value> obj1, obj2;
|
| @@ -3473,7 +3508,7 @@ void ReleaseStackTraceDataTest(v8::Isolate* isolate, const char* source,
|
|
|
|
|
| UNINITIALIZED_TEST(ReleaseStackTraceData) {
|
| - if (i::FLAG_always_opt) {
|
| + if (FLAG_always_opt) {
|
| // TODO(ulan): Remove this once the memory leak via code_next_link is fixed.
|
| // See: https://codereview.chromium.org/181833004/
|
| return;
|
| @@ -3532,8 +3567,8 @@ UNINITIALIZED_TEST(ReleaseStackTraceData) {
|
|
|
|
|
| TEST(Regress159140) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| LocalContext env;
|
| @@ -3593,8 +3628,8 @@ TEST(Regress159140) {
|
|
|
|
|
| TEST(Regress165495) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Heap* heap = isolate->heap();
|
| @@ -3639,8 +3674,8 @@ TEST(Regress165495) {
|
| }
|
|
|
| TEST(Regress169928) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_opt = false;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_opt = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| LocalContext env;
|
| @@ -3649,7 +3684,9 @@ TEST(Regress169928) {
|
|
|
| // Some flags turn Scavenge collections into Mark-sweep collections
|
| // and hence are incompatible with this test case.
|
| - if (FLAG_gc_global || FLAG_stress_compaction) return;
|
| + if (FLAG_gc_global || FLAG_stress_compaction ||
|
| + FLAG_stress_incremental_marking)
|
| + return;
|
|
|
| // Prepare the environment
|
| CompileRun("function fastliteralcase(literal, value) {"
|
| @@ -3719,8 +3756,8 @@ TEST(Regress169928) {
|
|
|
| #ifdef DEBUG
|
| TEST(Regress513507) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_gc_global = true;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_gc_global = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| LocalContext env;
|
| @@ -3769,7 +3806,7 @@ TEST(Regress513507) {
|
| #endif // DEBUG
|
|
|
| TEST(Regress513496) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| HandleScope scope(isolate);
|
| @@ -3829,8 +3866,9 @@ TEST(Regress513496) {
|
|
|
|
|
| TEST(LargeObjectSlotRecording) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| FLAG_manual_evacuation_candidates_selection = true;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| Heap* heap = isolate->heap();
|
| @@ -3923,7 +3961,7 @@ TEST(IncrementalMarkingStepMakesBigProgressWithLargeObjects) {
|
|
|
|
|
| TEST(DisableInlineAllocation) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| CompileRun("function test() {"
|
| @@ -3963,8 +4001,8 @@ static int AllocationSitesCount(Heap* heap) {
|
|
|
|
|
| TEST(EnsureAllocationSiteDependentCodesProcessed) {
|
| - if (i::FLAG_always_opt || !i::FLAG_opt) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (FLAG_always_opt || !FLAG_opt) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4034,8 +4072,8 @@ TEST(EnsureAllocationSiteDependentCodesProcessed) {
|
|
|
|
|
| TEST(CellsInOptimizedCodeAreWeak) {
|
| - if (i::FLAG_always_opt || !i::FLAG_opt) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (FLAG_always_opt || !FLAG_opt) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4078,8 +4116,8 @@ TEST(CellsInOptimizedCodeAreWeak) {
|
|
|
|
|
| TEST(ObjectsInOptimizedCodeAreWeak) {
|
| - if (i::FLAG_always_opt || !i::FLAG_opt) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (FLAG_always_opt || !FLAG_opt) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4119,8 +4157,8 @@ TEST(ObjectsInOptimizedCodeAreWeak) {
|
| }
|
|
|
| TEST(NewSpaceObjectsInOptimizedCode) {
|
| - if (i::FLAG_always_opt || !i::FLAG_opt || i::FLAG_turbo) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + if (FLAG_always_opt || !FLAG_opt || FLAG_turbo) return;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4180,11 +4218,11 @@ TEST(NewSpaceObjectsInOptimizedCode) {
|
| }
|
|
|
| TEST(NoWeakHashTableLeakWithIncrementalMarking) {
|
| - if (i::FLAG_always_opt || !i::FLAG_opt) return;
|
| - if (!i::FLAG_incremental_marking) return;
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_compilation_cache = false;
|
| - i::FLAG_retain_maps_for_n_gc = 0;
|
| + if (FLAG_always_opt || !FLAG_opt) return;
|
| + if (!FLAG_incremental_marking) return;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_compilation_cache = false;
|
| + FLAG_retain_maps_for_n_gc = 0;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
|
|
| @@ -4259,8 +4297,8 @@ static int GetCodeChainLength(Code* code) {
|
|
|
|
|
| TEST(NextCodeLinkIsWeak) {
|
| - i::FLAG_always_opt = false;
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_always_opt = false;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4306,7 +4344,7 @@ static Handle<Code> DummyOptimizedCode(Isolate* isolate) {
|
|
|
|
|
| TEST(NextCodeLinkIsWeak2) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| Isolate* isolate = CcTest::i_isolate();
|
| v8::internal::Heap* heap = CcTest::heap();
|
| @@ -4343,8 +4381,9 @@ static void ClearWeakIC(
|
|
|
|
|
| TEST(WeakFunctionInConstructor) {
|
| - if (i::FLAG_always_opt) return;
|
| - i::FLAG_stress_compaction = false;
|
| + if (FLAG_always_opt) return;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| v8::Isolate* isolate = CcTest::isolate();
|
| LocalContext env;
|
| @@ -4403,7 +4442,8 @@ TEST(WeakFunctionInConstructor) {
|
|
|
| // Checks that the value returned by execution of the source is weak.
|
| void CheckWeakness(const char* source) {
|
| - i::FLAG_stress_compaction = false;
|
| + FLAG_stress_compaction = false;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| v8::Isolate* isolate = CcTest::isolate();
|
| LocalContext env;
|
| @@ -4745,12 +4785,12 @@ TEST(WeakCellsWithIncrementalMarking) {
|
|
|
| #ifdef DEBUG
|
| TEST(AddInstructionChangesNewSpacePromotion) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| - i::FLAG_expose_gc = true;
|
| - i::FLAG_stress_compaction = true;
|
| - i::FLAG_gc_interval = 1000;
|
| + FLAG_allow_natives_syntax = true;
|
| + FLAG_expose_gc = true;
|
| + FLAG_stress_compaction = true;
|
| + FLAG_gc_interval = 1000;
|
| CcTest::InitializeVM();
|
| - if (!i::FLAG_allocation_site_pretenuring) return;
|
| + if (!FLAG_allocation_site_pretenuring) return;
|
| v8::HandleScope scope(CcTest::isolate());
|
| Isolate* isolate = CcTest::i_isolate();
|
| Heap* heap = isolate->heap();
|
| @@ -4793,7 +4833,7 @@ void OnFatalErrorExpectOOM(const char* location, const char* message) {
|
|
|
|
|
| TEST(CEntryStubOOM) {
|
| - i::FLAG_allow_natives_syntax = true;
|
| + FLAG_allow_natives_syntax = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| CcTest::isolate()->SetFatalErrorHandler(OnFatalErrorExpectOOM);
|
| @@ -4818,7 +4858,7 @@ static void RequestInterrupt(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
| }
|
|
|
| HEAP_TEST(Regress538257) {
|
| - i::FLAG_manual_evacuation_candidates_selection = true;
|
| + FLAG_manual_evacuation_candidates_selection = true;
|
| v8::Isolate::CreateParams create_params;
|
| // Set heap limits.
|
| create_params.constraints.set_max_semi_space_size(1);
|
| @@ -4900,9 +4940,9 @@ TEST(Regress507979) {
|
|
|
|
|
| UNINITIALIZED_TEST(PromotionQueue) {
|
| - i::FLAG_expose_gc = true;
|
| - i::FLAG_max_semi_space_size = 2 * Page::kPageSize / MB;
|
| - i::FLAG_min_semi_space_size = i::FLAG_max_semi_space_size;
|
| + FLAG_expose_gc = true;
|
| + FLAG_max_semi_space_size = 2 * Page::kPageSize / MB;
|
| + FLAG_min_semi_space_size = FLAG_max_semi_space_size;
|
| v8::Isolate::CreateParams create_params;
|
| create_params.array_buffer_allocator = CcTest::array_buffer_allocator();
|
| v8::Isolate* isolate = v8::Isolate::New(create_params);
|
| @@ -4935,7 +4975,7 @@ UNINITIALIZED_TEST(PromotionQueue) {
|
|
|
|
|
| CHECK(new_space->IsAtMaximumCapacity());
|
| - CHECK_EQ(static_cast<size_t>(i::FLAG_min_semi_space_size * MB),
|
| + CHECK_EQ(static_cast<size_t>(FLAG_min_semi_space_size * MB),
|
| new_space->TotalCapacity());
|
|
|
| // Call the scavenger two times to get an empty new space
|
| @@ -4952,7 +4992,7 @@ UNINITIALIZED_TEST(PromotionQueue) {
|
| }
|
|
|
| heap->CollectGarbage(NEW_SPACE, i::GarbageCollectionReason::kTesting);
|
| - CHECK_EQ(static_cast<size_t>(i::FLAG_min_semi_space_size * MB),
|
| + CHECK_EQ(static_cast<size_t>(FLAG_min_semi_space_size * MB),
|
| new_space->TotalCapacity());
|
|
|
| // Fill-up the first semi-space page.
|
| @@ -4977,7 +5017,8 @@ UNINITIALIZED_TEST(PromotionQueue) {
|
|
|
| TEST(Regress388880) {
|
| if (!FLAG_incremental_marking) return;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_stress_incremental_marking = false;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| Isolate* isolate = CcTest::i_isolate();
|
| @@ -5025,7 +5066,7 @@ TEST(Regress388880) {
|
|
|
| TEST(Regress3631) {
|
| if (!FLAG_incremental_marking) return;
|
| - i::FLAG_expose_gc = true;
|
| + FLAG_expose_gc = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| Isolate* isolate = CcTest::i_isolate();
|
| @@ -5160,6 +5201,7 @@ void CheckMapRetainingFor(int n) {
|
|
|
| TEST(MapRetaining) {
|
| if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| CheckMapRetainingFor(FLAG_retain_maps_for_n_gc);
|
| @@ -5845,7 +5887,7 @@ TEST(Regress609761) {
|
| }
|
|
|
| TEST(Regress615489) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| FLAG_black_allocation = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| @@ -5946,7 +5988,7 @@ TEST(Regress631969) {
|
| }
|
|
|
| TEST(LeftTrimFixedArrayInBlackArea) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| FLAG_black_allocation = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| @@ -5985,7 +6027,7 @@ TEST(LeftTrimFixedArrayInBlackArea) {
|
| }
|
|
|
| TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| FLAG_black_allocation = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| @@ -6051,7 +6093,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
|
| }
|
|
|
| TEST(ContinuousRightTrimFixedArrayInBlackArea) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| FLAG_black_allocation = true;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| @@ -6111,7 +6153,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
|
| }
|
|
|
| TEST(Regress618958) {
|
| - if (!i::FLAG_incremental_marking) return;
|
| + if (!FLAG_incremental_marking) return;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| Heap* heap = CcTest::heap();
|
| @@ -6221,6 +6263,7 @@ TEST(RememberedSetRemoveRange) {
|
|
|
| HEAP_TEST(Regress670675) {
|
| if (!FLAG_incremental_marking) return;
|
| + FLAG_stress_incremental_marking = false;
|
| CcTest::InitializeVM();
|
| v8::HandleScope scope(CcTest::isolate());
|
| Heap* heap = CcTest::heap();
|
|
|