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 5626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5637 "gc();" | 5637 "gc();" |
5638 "gc();" | 5638 "gc();" |
5639 "array.shift();" | 5639 "array.shift();" |
5640 "array;"); | 5640 "array;"); |
5641 | 5641 |
5642 Handle<JSObject> o = | 5642 Handle<JSObject> o = |
5643 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); | 5643 v8::Utils::OpenHandle(*v8::Handle<v8::Object>::Cast(result)); |
5644 CHECK(heap->InOldSpace(o->elements())); | 5644 CHECK(heap->InOldSpace(o->elements())); |
5645 CHECK(heap->InOldSpace(*o)); | 5645 CHECK(heap->InOldSpace(*o)); |
5646 Page* page = Page::FromAddress(o->elements()->address()); | 5646 Page* page = Page::FromAddress(o->elements()->address()); |
5647 CHECK(page->parallel_sweeping() <= MemoryChunk::SWEEPING_FINALIZE || | 5647 CHECK(page->parallel_sweeping_state().Value() <= |
| 5648 MemoryChunk::kSweepingFinalize || |
5648 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); | 5649 Marking::IsBlack(Marking::MarkBitFrom(o->elements()))); |
5649 } | 5650 } |
5650 | 5651 |
5651 | 5652 |
5652 UNINITIALIZED_TEST(PromotionQueue) { | 5653 UNINITIALIZED_TEST(PromotionQueue) { |
5653 i::FLAG_expose_gc = true; | 5654 i::FLAG_expose_gc = true; |
5654 i::FLAG_max_semi_space_size = 2 * (Page::kPageSize / MB); | 5655 i::FLAG_max_semi_space_size = 2 * (Page::kPageSize / MB); |
5655 v8::Isolate::CreateParams create_params; | 5656 v8::Isolate::CreateParams create_params; |
5656 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); | 5657 create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); |
5657 v8::Isolate* isolate = v8::Isolate::New(create_params); | 5658 v8::Isolate* isolate = v8::Isolate::New(create_params); |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6512 // The CollectGarbage call above starts sweeper threads. | 6513 // The CollectGarbage call above starts sweeper threads. |
6513 // The crash will happen if the following two functions | 6514 // The crash will happen if the following two functions |
6514 // are called before sweeping finishes. | 6515 // are called before sweeping finishes. |
6515 heap->StartIncrementalMarking(); | 6516 heap->StartIncrementalMarking(); |
6516 heap->FinalizeIncrementalMarkingIfComplete("test"); | 6517 heap->FinalizeIncrementalMarkingIfComplete("test"); |
6517 } | 6518 } |
6518 | 6519 |
6519 | 6520 |
6520 } // namespace internal | 6521 } // namespace internal |
6521 } // namespace v8 | 6522 } // namespace v8 |
OLD | NEW |