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

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

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased. Feedback. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/platform.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 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget( 282 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(
283 Heap* heap, RelocInfo* rinfo) { 283 Heap* heap, RelocInfo* rinfo) {
284 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); 284 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
285 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 285 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
286 // Monomorphic ICs are preserved when possible, but need to be flushed 286 // Monomorphic ICs are preserved when possible, but need to be flushed
287 // when they might be keeping a Context alive, or when the heap is about 287 // when they might be keeping a Context alive, or when the heap is about
288 // to be serialized. 288 // to be serialized.
289 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() 289 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
290 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC || 290 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC ||
291 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() || 291 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() ||
292 Serializer::enabled() || target->ic_age() != heap->global_ic_age() || 292 Serializer::enabled(heap->isolate()) ||
293 target->ic_age() != heap->global_ic_age() ||
293 target->is_invalidated_weak_stub())) { 294 target->is_invalidated_weak_stub())) {
294 IC::Clear(target->GetIsolate(), rinfo->pc(), 295 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool());
295 rinfo->host()->constant_pool());
296 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 296 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
297 } 297 }
298 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 298 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
299 StaticVisitor::MarkObject(heap, target); 299 StaticVisitor::MarkObject(heap, target);
300 } 300 }
301 301
302 302
303 template<typename StaticVisitor> 303 template<typename StaticVisitor>
304 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence( 304 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence(
305 Heap* heap, RelocInfo* rinfo) { 305 Heap* heap, RelocInfo* rinfo) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 402
403 template<typename StaticVisitor> 403 template<typename StaticVisitor>
404 void StaticMarkingVisitor<StaticVisitor>::VisitCode( 404 void StaticMarkingVisitor<StaticVisitor>::VisitCode(
405 Map* map, HeapObject* object) { 405 Map* map, HeapObject* object) {
406 Heap* heap = map->GetHeap(); 406 Heap* heap = map->GetHeap();
407 Code* code = Code::cast(object); 407 Code* code = Code::cast(object);
408 if (FLAG_cleanup_code_caches_at_gc) { 408 if (FLAG_cleanup_code_caches_at_gc) {
409 code->ClearTypeFeedbackInfo(heap); 409 code->ClearTypeFeedbackInfo(heap);
410 } 410 }
411 if (FLAG_age_code && !Serializer::enabled()) { 411 if (FLAG_age_code && !Serializer::enabled(heap->isolate())) {
412 code->MakeOlder(heap->mark_compact_collector()->marking_parity()); 412 code->MakeOlder(heap->mark_compact_collector()->marking_parity());
413 } 413 }
414 code->CodeIterateBody<StaticVisitor>(heap); 414 code->CodeIterateBody<StaticVisitor>(heap);
415 } 415 }
416 416
417 417
418 template<typename StaticVisitor> 418 template<typename StaticVisitor>
419 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 419 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
420 Map* map, HeapObject* object) { 420 Map* map, HeapObject* object) {
421 Heap* heap = map->GetHeap(); 421 Heap* heap = map->GetHeap();
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 RelocIterator it(this, mode_mask); 931 RelocIterator it(this, mode_mask);
932 for (; !it.done(); it.next()) { 932 for (; !it.done(); it.next()) {
933 it.rinfo()->template Visit<StaticVisitor>(heap); 933 it.rinfo()->template Visit<StaticVisitor>(heap);
934 } 934 }
935 } 935 }
936 936
937 937
938 } } // namespace v8::internal 938 } } // namespace v8::internal
939 939
940 #endif // V8_OBJECTS_VISITING_INL_H_ 940 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698