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

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

Issue 879693004: Remove IC age from Code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove tests 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 3635 matching lines...) Expand 10 before | Expand all | Expand 10 after
3646 if (!allocation.To(&result)) return allocation; 3646 if (!allocation.To(&result)) return allocation;
3647 OnAllocationEvent(result, object_size); 3647 OnAllocationEvent(result, object_size);
3648 } 3648 }
3649 } 3649 }
3650 3650
3651 result->set_map_no_write_barrier(code_map()); 3651 result->set_map_no_write_barrier(code_map());
3652 Code* code = Code::cast(result); 3652 Code* code = Code::cast(result);
3653 DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() || 3653 DCHECK(isolate_->code_range() == NULL || !isolate_->code_range()->valid() ||
3654 isolate_->code_range()->contains(code->address())); 3654 isolate_->code_range()->contains(code->address()));
3655 code->set_gc_metadata(Smi::FromInt(0)); 3655 code->set_gc_metadata(Smi::FromInt(0));
3656 code->set_ic_age(global_ic_age_);
3657 return code; 3656 return code;
3658 } 3657 }
3659 3658
3660 3659
3661 AllocationResult Heap::CopyCode(Code* code) { 3660 AllocationResult Heap::CopyCode(Code* code) {
3662 AllocationResult allocation; 3661 AllocationResult allocation;
3663 HeapObject* new_constant_pool; 3662 HeapObject* new_constant_pool;
3664 if (FLAG_enable_ool_constant_pool && 3663 if (FLAG_enable_ool_constant_pool &&
3665 code->constant_pool() != empty_constant_pool_array()) { 3664 code->constant_pool() != empty_constant_pool_array()) {
3666 // Copy the constant pool, since edits to the copied code may modify 3665 // Copy the constant pool, since edits to the copied code may modify
(...skipping 2821 matching lines...) Expand 10 before | Expand all | Expand 10 after
6488 static_cast<int>(object_sizes_last_time_[index])); 6487 static_cast<int>(object_sizes_last_time_[index]));
6489 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6488 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6490 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6489 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6491 6490
6492 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6491 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6493 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6492 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6494 ClearObjectStats(); 6493 ClearObjectStats();
6495 } 6494 }
6496 } 6495 }
6497 } // namespace v8::internal 6496 } // 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