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 #ifndef V8_OBJECTS_VISITING_INL_H_ | 5 #ifndef V8_OBJECTS_VISITING_INL_H_ |
6 #define V8_OBJECTS_VISITING_INL_H_ | 6 #define V8_OBJECTS_VISITING_INL_H_ |
7 | 7 |
8 #include "src/heap/objects-visiting.h" | 8 #include "src/heap/objects-visiting.h" |
9 #include "src/ic/ic-state.h" | 9 #include "src/ic/ic-state.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 | 525 |
526 template <typename StaticVisitor> | 526 template <typename StaticVisitor> |
527 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( | 527 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( |
528 Map* map, HeapObject* object) { | 528 Map* map, HeapObject* object) { |
529 Heap* heap = map->GetHeap(); | 529 Heap* heap = map->GetHeap(); |
530 | 530 |
531 StaticVisitor::VisitPointers( | 531 StaticVisitor::VisitPointers( |
532 heap, object, | 532 heap, object, |
533 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), | 533 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
534 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); | 534 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
535 if (!JSArrayBuffer::cast(object)->is_external()) { | 535 if (!JSArrayBuffer::cast(object)->is_external() && |
| 536 !heap->InNewSpace(object)) { |
536 heap->RegisterLiveArrayBuffer(false, | 537 heap->RegisterLiveArrayBuffer(false, |
537 JSArrayBuffer::cast(object)->backing_store()); | 538 JSArrayBuffer::cast(object)->backing_store()); |
538 } | 539 } |
539 } | 540 } |
540 | 541 |
541 | 542 |
542 template <typename StaticVisitor> | 543 template <typename StaticVisitor> |
543 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( | 544 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( |
544 Map* map, HeapObject* object) { | 545 Map* map, HeapObject* object) { |
545 StaticVisitor::VisitPointers( | 546 StaticVisitor::VisitPointers( |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 893 |
893 RelocIterator it(this, mode_mask); | 894 RelocIterator it(this, mode_mask); |
894 for (; !it.done(); it.next()) { | 895 for (; !it.done(); it.next()) { |
895 it.rinfo()->template Visit<StaticVisitor>(heap); | 896 it.rinfo()->template Visit<StaticVisitor>(heap); |
896 } | 897 } |
897 } | 898 } |
898 } | 899 } |
899 } // namespace v8::internal | 900 } // namespace v8::internal |
900 | 901 |
901 #endif // V8_OBJECTS_VISITING_INL_H_ | 902 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |