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

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

Issue 2534763003: [Interpreter] Add bytecode aging and use it enable CompilationCache for bytecode (Closed)
Patch Set: Rebase Created 4 years 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/objects-visiting.h ('k') | src/objects.h » ('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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 table_.Register(kVisitNativeContext, &VisitNativeContext); 142 table_.Register(kVisitNativeContext, &VisitNativeContext);
143 143
144 table_.Register( 144 table_.Register(
145 kVisitAllocationSite, 145 kVisitAllocationSite,
146 &FixedBodyVisitor<StaticVisitor, AllocationSite::MarkingBodyDescriptor, 146 &FixedBodyVisitor<StaticVisitor, AllocationSite::MarkingBodyDescriptor,
147 void>::Visit); 147 void>::Visit);
148 148
149 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit); 149 table_.Register(kVisitByteArray, &DataObjectVisitor::Visit);
150 150
151 table_.Register( 151 table_.Register(kVisitBytecodeArray, &VisitBytecodeArray);
152 kVisitBytecodeArray,
153 &FixedBodyVisitor<StaticVisitor, BytecodeArray::MarkingBodyDescriptor,
154 void>::Visit);
155 152
156 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit); 153 table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit);
157 154
158 table_.Register(kVisitSeqOneByteString, &DataObjectVisitor::Visit); 155 table_.Register(kVisitSeqOneByteString, &DataObjectVisitor::Visit);
159 156
160 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit); 157 table_.Register(kVisitSeqTwoByteString, &DataObjectVisitor::Visit);
161 158
162 table_.Register(kVisitJSWeakCollection, &VisitWeakCollection); 159 table_.Register(kVisitJSWeakCollection, &VisitWeakCollection);
163 160
164 table_.Register( 161 table_.Register(
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 target->ic_age() != heap->global_ic_age())) { 267 target->ic_age() != heap->global_ic_age())) {
271 ICUtility::Clear(heap->isolate(), rinfo->pc(), 268 ICUtility::Clear(heap->isolate(), rinfo->pc(),
272 rinfo->host()->constant_pool()); 269 rinfo->host()->constant_pool());
273 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 270 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
274 } 271 }
275 Code* host = rinfo->host(); 272 Code* host = rinfo->host();
276 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target); 273 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target);
277 StaticVisitor::MarkObject(heap, target); 274 StaticVisitor::MarkObject(heap, target);
278 } 275 }
279 276
280
281 template <typename StaticVisitor> 277 template <typename StaticVisitor>
282 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence( 278 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence(
283 Heap* heap, RelocInfo* rinfo) { 279 Heap* heap, RelocInfo* rinfo) {
284 DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode())); 280 DCHECK(RelocInfo::IsCodeAgeSequence(rinfo->rmode()));
285 Code* target = rinfo->code_age_stub(); 281 Code* target = rinfo->code_age_stub();
286 DCHECK(target != NULL); 282 DCHECK(target != NULL);
287 Code* host = rinfo->host(); 283 Code* host = rinfo->host();
288 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target); 284 heap->mark_compact_collector()->RecordRelocSlot(host, rinfo, target);
289 StaticVisitor::MarkObject(heap, target); 285 StaticVisitor::MarkObject(heap, target);
290 } 286 }
291 287
288 template <typename StaticVisitor>
289 void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray(
290 Map* map, HeapObject* object) {
291 FixedBodyVisitor<StaticVisitor, BytecodeArray::MarkingBodyDescriptor,
292 void>::Visit(map, object);
293 BytecodeArray::cast(object)->MakeOlder();
294 }
292 295
293 template <typename StaticVisitor> 296 template <typename StaticVisitor>
294 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext( 297 void StaticMarkingVisitor<StaticVisitor>::VisitNativeContext(
295 Map* map, HeapObject* object) { 298 Map* map, HeapObject* object) {
296 FixedBodyVisitor<StaticVisitor, Context::MarkCompactBodyDescriptor, 299 FixedBodyVisitor<StaticVisitor, Context::MarkCompactBodyDescriptor,
297 void>::Visit(map, object); 300 void>::Visit(map, object);
298 } 301 }
299 302
300 303
301 template <typename StaticVisitor> 304 template <typename StaticVisitor>
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 651 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
649 void> JSFunctionWeakCodeBodyVisitor; 652 void> JSFunctionWeakCodeBodyVisitor;
650 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 653 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
651 } 654 }
652 655
653 656
654 } // namespace internal 657 } // namespace internal
655 } // namespace v8 658 } // namespace v8
656 659
657 #endif // V8_OBJECTS_VISITING_INL_H_ 660 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698