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

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

Issue 2007253002: Reland of "[heap] Fine-grained JSArrayBuffer tracking" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed coment 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 }
113 return JSArrayBufferBodyVisitor::Visit(map, object); 108 return JSArrayBufferBodyVisitor::Visit(map, object);
114 } 109 }
115 110
116 111
117 template <typename StaticVisitor> 112 template <typename StaticVisitor>
118 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( 113 int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray(
119 Map* map, HeapObject* object) { 114 Map* map, HeapObject* object) {
120 VisitPointers( 115 VisitPointers(
121 map->GetHeap(), object, 116 map->GetHeap(), object,
122 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), 117 HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset),
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 727 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
733 void> JSFunctionWeakCodeBodyVisitor; 728 void> JSFunctionWeakCodeBodyVisitor;
734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 729 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
735 } 730 }
736 731
737 732
738 } // namespace internal 733 } // namespace internal
739 } // namespace v8 734 } // namespace v8
740 735
741 #endif // V8_OBJECTS_VISITING_INL_H_ 736 #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