Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 2028503003: Revert of Reland "[heap] Fine-grained JSArrayBuffer tracking" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/array-buffer-tracker.h" 8 #include "src/heap/array-buffer-tracker.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/ic/ic-state.h" 10 #include "src/ic/ic-state.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 table_.template RegisterSpecializations<StructVisitor, kVisitStruct, 98 table_.template RegisterSpecializations<StructVisitor, kVisitStruct,
99 kVisitStructGeneric>(); 99 kVisitStructGeneric>();
100 } 100 }
101 101
102 102
103 template <typename StaticVisitor> 103 template <typename StaticVisitor>
104 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( 104 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer(
105 Map* map, HeapObject* object) { 105 Map* map, HeapObject* object) {
106 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, int> 106 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, int>
107 JSArrayBufferBodyVisitor; 107 JSArrayBufferBodyVisitor;
108
109 if (!JSArrayBuffer::cast(object)->is_external()) {
110 Heap* heap = map->GetHeap();
111 heap->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(object));
112 }
108 return JSArrayBufferBodyVisitor::Visit(map, object); 113 return JSArrayBufferBodyVisitor::Visit(map, object);
109 } 114 }
110 115
111 116
112 template <typename StaticVisitor> 117 template <typename StaticVisitor>
113 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( 118 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray(
114 Map* map, HeapObject* object) { 119 Map* map, HeapObject* object) {
115 VisitPointers( 120 VisitPointers(
116 map->GetHeap(), object, 121 map->GetHeap(), object,
117 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), 122 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset),
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 Map* map, HeapObject* object) { 526 Map* map, HeapObject* object) {
522 Heap* heap = map->GetHeap(); 527 Heap* heap = map->GetHeap();
523 528
524 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor, 529 typedef FlexibleBodyVisitor<StaticVisitor, JSArrayBuffer::BodyDescriptor,
525 void> JSArrayBufferBodyVisitor; 530 void> JSArrayBufferBodyVisitor;
526 531
527 JSArrayBufferBodyVisitor::Visit(map, object); 532 JSArrayBufferBodyVisitor::Visit(map, object);
528 533
529 if (!JSArrayBuffer::cast(object)->is_external() && 534 if (!JSArrayBuffer::cast(object)->is_external() &&
530 !heap->InNewSpace(object)) { 535 !heap->InNewSpace(object)) {
531 ArrayBufferTracker::MarkLive(heap, JSArrayBuffer::cast(object)); 536 heap->array_buffer_tracker()->MarkLive(JSArrayBuffer::cast(object));
532 } 537 }
533 } 538 }
534 539
535 540
536 template <typename StaticVisitor> 541 template <typename StaticVisitor>
537 void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray( 542 void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray(
538 Map* map, HeapObject* object) { 543 Map* map, HeapObject* object) {
539 StaticVisitor::VisitPointers( 544 StaticVisitor::VisitPointers(
540 map->GetHeap(), object, 545 map->GetHeap(), object,
541 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), 546 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset),
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
728 void> JSFunctionWeakCodeBodyVisitor; 733 void> JSFunctionWeakCodeBodyVisitor;
729 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
730 } 735 }
731 736
732 737
733 } // namespace internal 738 } // namespace internal
734 } // namespace v8 739 } // namespace v8
735 740
736 #endif // V8_OBJECTS_VISITING_INL_H_ 741 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698