OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/context-slot-cache.h" | 9 #include "src/ast/context-slot-cache.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 5534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5545 for (Page* p : *s) { | 5545 for (Page* p : *s) { |
5546 CHECK(p->NeverEvacuate()); | 5546 CHECK(p->NeverEvacuate()); |
5547 } | 5547 } |
5548 #endif // DEBUG | 5548 #endif // DEBUG |
5549 } | 5549 } |
5550 | 5550 |
5551 deserialization_complete_ = true; | 5551 deserialization_complete_ = true; |
5552 } | 5552 } |
5553 | 5553 |
5554 void Heap::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { | 5554 void Heap::SetEmbedderHeapTracer(EmbedderHeapTracer* tracer) { |
5555 DCHECK_NOT_NULL(tracer); | 5555 DCHECK_EQ(gc_state_, HeapState::NOT_IN_GC); |
5556 CHECK_NULL(embedder_heap_tracer_); | |
5557 embedder_heap_tracer_ = tracer; | 5556 embedder_heap_tracer_ = tracer; |
5558 } | 5557 } |
5559 | 5558 |
5560 void Heap::RegisterWrappersWithEmbedderHeapTracer() { | 5559 void Heap::RegisterWrappersWithEmbedderHeapTracer() { |
5561 DCHECK(UsingEmbedderHeapTracer()); | 5560 DCHECK(UsingEmbedderHeapTracer()); |
5562 if (wrappers_to_trace_.empty()) { | 5561 if (wrappers_to_trace_.empty()) { |
5563 return; | 5562 return; |
5564 } | 5563 } |
5565 embedder_heap_tracer()->RegisterV8References(wrappers_to_trace_); | 5564 embedder_heap_tracer()->RegisterV8References(wrappers_to_trace_); |
5566 wrappers_to_trace_.clear(); | 5565 wrappers_to_trace_.clear(); |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6487 } | 6486 } |
6488 | 6487 |
6489 | 6488 |
6490 // static | 6489 // static |
6491 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6490 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6492 return StaticVisitorBase::GetVisitorId(map); | 6491 return StaticVisitorBase::GetVisitorId(map); |
6493 } | 6492 } |
6494 | 6493 |
6495 } // namespace internal | 6494 } // namespace internal |
6496 } // namespace v8 | 6495 } // namespace v8 |
OLD | NEW |