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

Side by Side Diff: src/heap/heap.cc

Issue 941503003: Revert "Remove IC age from Code." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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/factory.cc ('k') | src/heap/objects-visiting-inl.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 3673 matching lines...) Expand 10 before | Expand all | Expand 10 after
3684 if (!allocation.To(&result)) return allocation; 3684 if (!allocation.To(&result)) return allocation;
3685 OnAllocationEvent(result, object_size); 3685 OnAllocationEvent(result, object_size);
3686 } 3686 }
3687 } 3687 }
3688 3688
3689 result->set_map_no_write_barrier(code_map()); 3689 result->set_map_no_write_barrier(code_map());
3690 Code* code = Code::cast(result); 3690 Code* code = Code::cast(result);
3691 DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() || 3691 DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() ||
3692 isolate_->code_range()->contains(code->address())); 3692 isolate_->code_range()->contains(code->address()));
3693 code->set_gc_metadata(Smi::FromInt(0)); 3693 code->set_gc_metadata(Smi::FromInt(0));
3694 code->set_ic_age(global_ic_age_);
3694 return code; 3695 return code;
3695 } 3696 }
3696 3697
3697 3698
3698 AllocationResult Heap::CopyCode(Code* code) { 3699 AllocationResult Heap::CopyCode(Code* code) {
3699 AllocationResult allocation; 3700 AllocationResult allocation;
3700 HeapObject* new_constant_pool; 3701 HeapObject* new_constant_pool;
3701 if (FLAG_enable_ool_constant_pool && 3702 if (FLAG_enable_ool_constant_pool &&
3702 code->constant_pool() != empty_constant_pool_array()) { 3703 code->constant_pool() != empty_constant_pool_array()) {
3703 // Copy the constant pool, since edits to the copied code may modify 3704 // Copy the constant pool, since edits to the copied code may modify
(...skipping 2817 matching lines...) Expand 10 before | Expand all | Expand 10 after
6521 static_cast<int>(object_sizes_last_time_[index])); 6522 static_cast<int>(object_sizes_last_time_[index]));
6522 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6523 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6523 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6524 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6524 6525
6525 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6526 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6526 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6527 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6527 ClearObjectStats(); 6528 ClearObjectStats();
6528 } 6529 }
6529 } 6530 }
6530 } // namespace v8::internal 6531 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698