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

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

Issue 196283015: Revert "Moved type feedback vector to SharedFunctionInfo." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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-printer.cc ('k') | src/runtime.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset), 420 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset),
421 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset)); 421 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset));
422 } 422 }
423 423
424 424
425 template<typename StaticVisitor> 425 template<typename StaticVisitor>
426 void StaticMarkingVisitor<StaticVisitor>::VisitCode( 426 void StaticMarkingVisitor<StaticVisitor>::VisitCode(
427 Map* map, HeapObject* object) { 427 Map* map, HeapObject* object) {
428 Heap* heap = map->GetHeap(); 428 Heap* heap = map->GetHeap();
429 Code* code = Code::cast(object); 429 Code* code = Code::cast(object);
430 if (FLAG_cleanup_code_caches_at_gc) {
431 code->ClearTypeFeedbackInfo(heap);
432 }
430 if (FLAG_age_code && !Serializer::enabled()) { 433 if (FLAG_age_code && !Serializer::enabled()) {
431 code->MakeOlder(heap->mark_compact_collector()->marking_parity()); 434 code->MakeOlder(heap->mark_compact_collector()->marking_parity());
432 } 435 }
433 code->CodeIterateBody<StaticVisitor>(heap); 436 code->CodeIterateBody<StaticVisitor>(heap);
434 } 437 }
435 438
436 439
437 template<typename StaticVisitor> 440 template<typename StaticVisitor>
438 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 441 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
439 Map* map, HeapObject* object) { 442 Map* map, HeapObject* object) {
440 Heap* heap = map->GetHeap(); 443 Heap* heap = map->GetHeap();
441 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 444 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
442 if (shared->ic_age() != heap->global_ic_age()) { 445 if (shared->ic_age() != heap->global_ic_age()) {
443 shared->ResetForNewContext(heap->global_ic_age()); 446 shared->ResetForNewContext(heap->global_ic_age());
444 } 447 }
445 if (FLAG_cleanup_code_caches_at_gc) {
446 shared->ClearTypeFeedbackInfo(heap);
447 }
448 if (FLAG_cache_optimized_code && 448 if (FLAG_cache_optimized_code &&
449 FLAG_flush_optimized_code_cache && 449 FLAG_flush_optimized_code_cache &&
450 !shared->optimized_code_map()->IsSmi()) { 450 !shared->optimized_code_map()->IsSmi()) {
451 // Always flush the optimized code map if requested by flag. 451 // Always flush the optimized code map if requested by flag.
452 shared->ClearOptimizedCodeMap(); 452 shared->ClearOptimizedCodeMap();
453 } 453 }
454 MarkCompactCollector* collector = heap->mark_compact_collector(); 454 MarkCompactCollector* collector = heap->mark_compact_collector();
455 if (collector->is_code_flushing_enabled()) { 455 if (collector->is_code_flushing_enabled()) {
456 if (FLAG_cache_optimized_code && !shared->optimized_code_map()->IsSmi()) { 456 if (FLAG_cache_optimized_code && !shared->optimized_code_map()->IsSmi()) {
457 // Add the shared function info holding an optimized code map to 457 // Add the shared function info holding an optimized code map to
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 RelocIterator it(this, mode_mask); 941 RelocIterator it(this, mode_mask);
942 for (; !it.done(); it.next()) { 942 for (; !it.done(); it.next()) {
943 it.rinfo()->template Visit<StaticVisitor>(heap); 943 it.rinfo()->template Visit<StaticVisitor>(heap);
944 } 944 }
945 } 945 }
946 946
947 947
948 } } // namespace v8::internal 948 } } // namespace v8::internal
949 949
950 #endif // V8_OBJECTS_VISITING_INL_H_ 950 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/objects-printer.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698