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

Side by Side Diff: src/heap.cc

Issue 11316218: Simplify and fix code aging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed comment and rebased. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/codegen-ia32.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 // 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 3777 matching lines...) Expand 10 before | Expand all | Expand 10 after
3788 code->set_relocation_info(reloc_info); 3788 code->set_relocation_info(reloc_info);
3789 code->set_flags(flags); 3789 code->set_flags(flags);
3790 if (code->is_call_stub() || code->is_keyed_call_stub()) { 3790 if (code->is_call_stub() || code->is_keyed_call_stub()) {
3791 code->set_check_type(RECEIVER_MAP_CHECK); 3791 code->set_check_type(RECEIVER_MAP_CHECK);
3792 } 3792 }
3793 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER); 3793 code->set_deoptimization_data(empty_fixed_array(), SKIP_WRITE_BARRIER);
3794 code->InitializeTypeFeedbackInfoNoWriteBarrier(undefined_value()); 3794 code->InitializeTypeFeedbackInfoNoWriteBarrier(undefined_value());
3795 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER); 3795 code->set_handler_table(empty_fixed_array(), SKIP_WRITE_BARRIER);
3796 code->set_gc_metadata(Smi::FromInt(0)); 3796 code->set_gc_metadata(Smi::FromInt(0));
3797 code->set_ic_age(global_ic_age_); 3797 code->set_ic_age(global_ic_age_);
3798 code->set_prologue_offset(kPrologueOffsetNotSet);
3798 // Allow self references to created code object by patching the handle to 3799 // Allow self references to created code object by patching the handle to
3799 // point to the newly allocated Code object. 3800 // point to the newly allocated Code object.
3800 if (!self_reference.is_null()) { 3801 if (!self_reference.is_null()) {
3801 *(self_reference.location()) = code; 3802 *(self_reference.location()) = code;
3802 } 3803 }
3803 // Migrate generated code. 3804 // Migrate generated code.
3804 // The generated code can contain Object** values (typically from handles) 3805 // The generated code can contain Object** values (typically from handles)
3805 // that are dereferenced during the copy to point directly to the actual heap 3806 // that are dereferenced during the copy to point directly to the actual heap
3806 // objects. These pointers can include references to the code object itself, 3807 // objects. These pointers can include references to the code object itself,
3807 // through the self_reference parameter. 3808 // through the self_reference parameter.
(...skipping 3520 matching lines...) Expand 10 before | Expand all | Expand 10 after
7328 static_cast<int>(object_sizes_last_time_[index])); 7329 static_cast<int>(object_sizes_last_time_[index]));
7329 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) 7330 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT)
7330 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7331 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7331 7332
7332 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7333 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7333 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7334 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7334 ClearObjectStats(); 7335 ClearObjectStats();
7335 } 7336 }
7336 7337
7337 } } // namespace v8::internal 7338 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698