| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compilation-cache.h" | 9 #include "src/compilation-cache.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 void VisitPointers(Object** start, Object** end) { | 61 void VisitPointers(Object** start, Object** end) { |
| 62 for (Object** current = start; current < end; current++) { | 62 for (Object** current = start; current < end; current++) { |
| 63 if ((*current)->IsHeapObject()) { | 63 if ((*current)->IsHeapObject()) { |
| 64 HeapObject* object = HeapObject::cast(*current); | 64 HeapObject* object = HeapObject::cast(*current); |
| 65 CHECK(heap_->mark_compact_collector()->IsMarked(object)); | 65 CHECK(heap_->mark_compact_collector()->IsMarked(object)); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 void VisitConstantPoolEmbeddedPointer( |
| 71 Object** p, |
| 72 ConstantPoolArray::WeakObjectState state) { |
| 73 bool is_weak_object = |
| 74 (state == ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE && |
| 75 Code::IsWeakObjectInOptimizedCode(*p)) || |
| 76 (state == ConstantPoolArray::WEAK_OBJECTS_IN_IC && |
| 77 Code::IsWeakObjectInIC(*p)); |
| 78 if (!is_weak_object) |
| 79 VisitPointer(p); |
| 80 } |
| 81 |
| 70 void VisitEmbeddedPointer(RelocInfo* rinfo) { | 82 void VisitEmbeddedPointer(RelocInfo* rinfo) { |
| 71 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); | 83 ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT); |
| 72 if (!rinfo->host()->IsWeakObject(rinfo->target_object())) { | 84 if (!rinfo->host()->IsWeakObject(rinfo->target_object())) { |
| 73 Object* p = rinfo->target_object(); | 85 Object* p = rinfo->target_object(); |
| 74 VisitPointer(&p); | 86 VisitPointer(&p); |
| 75 } | 87 } |
| 76 } | 88 } |
| 77 | 89 |
| 78 void VisitCell(RelocInfo* rinfo) { | 90 void VisitCell(RelocInfo* rinfo) { |
| 79 Code* code = rinfo->host(); | 91 Code* code = rinfo->host(); |
| (...skipping 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4589 while (buffer != NULL) { | 4601 while (buffer != NULL) { |
| 4590 SlotsBuffer* next_buffer = buffer->next(); | 4602 SlotsBuffer* next_buffer = buffer->next(); |
| 4591 DeallocateBuffer(buffer); | 4603 DeallocateBuffer(buffer); |
| 4592 buffer = next_buffer; | 4604 buffer = next_buffer; |
| 4593 } | 4605 } |
| 4594 *buffer_address = NULL; | 4606 *buffer_address = NULL; |
| 4595 } | 4607 } |
| 4596 | 4608 |
| 4597 | 4609 |
| 4598 } } // namespace v8::internal | 4610 } } // namespace v8::internal |
| OLD | NEW |