| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2805 MarkCompactCollector* collector = heap->mark_compact_collector(); | 2805 MarkCompactCollector* collector = heap->mark_compact_collector(); |
| 2806 if (collector->sweeping_in_progress()) { | 2806 if (collector->sweeping_in_progress()) { |
| 2807 collector->EnsureSweepingCompleted(); | 2807 collector->EnsureSweepingCompleted(); |
| 2808 } | 2808 } |
| 2809 | 2809 |
| 2810 IncrementalMarking* marking = heap->incremental_marking(); | 2810 IncrementalMarking* marking = heap->incremental_marking(); |
| 2811 marking->Stop(); | 2811 marking->Stop(); |
| 2812 marking->Start(Heap::kReduceMemoryFootprintMask); | 2812 marking->Start(Heap::kReduceMemoryFootprintMask); |
| 2813 CHECK_NE(0, heap->current_gc_flags() & Heap::kReduceMemoryFootprintMask); | 2813 CHECK_NE(0, heap->current_gc_flags() & Heap::kReduceMemoryFootprintMask); |
| 2814 | 2814 |
| 2815 heap->Scavenge(); | 2815 heap->CollectGarbage(NEW_SPACE); |
| 2816 // NewSpace scavenges should not overwrite the flags. |
| 2816 CHECK_NE(0, heap->current_gc_flags() & Heap::kReduceMemoryFootprintMask); | 2817 CHECK_NE(0, heap->current_gc_flags() & Heap::kReduceMemoryFootprintMask); |
| 2817 | 2818 |
| 2818 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); | 2819 heap->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask); |
| 2819 CHECK_EQ(Heap::kNoGCFlags, heap->current_gc_flags()); | 2820 CHECK_EQ(Heap::kNoGCFlags, heap->current_gc_flags()); |
| 2820 } | 2821 } |
| 2821 | 2822 |
| 2822 | 2823 |
| 2823 TEST(IdleNotificationFinishMarking) { | 2824 TEST(IdleNotificationFinishMarking) { |
| 2824 i::FLAG_allow_natives_syntax = true; | 2825 i::FLAG_allow_natives_syntax = true; |
| 2825 CcTest::InitializeVM(); | 2826 CcTest::InitializeVM(); |
| (...skipping 3671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6497 { | 6498 { |
| 6498 SharedFunctionInfo::Iterator iterator(isolate); | 6499 SharedFunctionInfo::Iterator iterator(isolate); |
| 6499 while (iterator.Next()) sfi_count--; | 6500 while (iterator.Next()) sfi_count--; |
| 6500 } | 6501 } |
| 6501 | 6502 |
| 6502 CHECK_EQ(0, sfi_count); | 6503 CHECK_EQ(0, sfi_count); |
| 6503 } | 6504 } |
| 6504 | 6505 |
| 6505 } // namespace internal | 6506 } // namespace internal |
| 6506 } // namespace v8 | 6507 } // namespace v8 |
| OLD | NEW |