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

Side by Side Diff: src/heap.cc

Issue 178463007: Moved type feedback vector to SharedFunctionInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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/full-codegen.cc ('k') | src/heap-snapshot-generator.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 2666 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 return accessors; 2677 return accessors;
2678 } 2678 }
2679 2679
2680 2680
2681 MaybeObject* Heap::AllocateTypeFeedbackInfo() { 2681 MaybeObject* Heap::AllocateTypeFeedbackInfo() {
2682 TypeFeedbackInfo* info; 2682 TypeFeedbackInfo* info;
2683 { MaybeObject* maybe_info = AllocateStruct(TYPE_FEEDBACK_INFO_TYPE); 2683 { MaybeObject* maybe_info = AllocateStruct(TYPE_FEEDBACK_INFO_TYPE);
2684 if (!maybe_info->To(&info)) return maybe_info; 2684 if (!maybe_info->To(&info)) return maybe_info;
2685 } 2685 }
2686 info->initialize_storage(); 2686 info->initialize_storage();
2687 info->set_feedback_vector(empty_fixed_array(), SKIP_WRITE_BARRIER);
2688 return info; 2687 return info;
2689 } 2688 }
2690 2689
2691 2690
2692 MaybeObject* Heap::AllocateAliasedArgumentsEntry(int aliased_context_slot) { 2691 MaybeObject* Heap::AllocateAliasedArgumentsEntry(int aliased_context_slot) {
2693 AliasedArgumentsEntry* entry; 2692 AliasedArgumentsEntry* entry;
2694 { MaybeObject* maybe_entry = AllocateStruct(ALIASED_ARGUMENTS_ENTRY_TYPE); 2693 { MaybeObject* maybe_entry = AllocateStruct(ALIASED_ARGUMENTS_ENTRY_TYPE);
2695 if (!maybe_entry->To(&entry)) return maybe_entry; 2694 if (!maybe_entry->To(&entry)) return maybe_entry;
2696 } 2695 }
2697 entry->set_aliased_context_slot(aliased_context_slot); 2696 entry->set_aliased_context_slot(aliased_context_slot);
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3799 share->set_optimized_code_map(Smi::FromInt(0)); 3798 share->set_optimized_code_map(Smi::FromInt(0));
3800 share->set_scope_info(ScopeInfo::Empty(isolate_)); 3799 share->set_scope_info(ScopeInfo::Empty(isolate_));
3801 Code* construct_stub = 3800 Code* construct_stub =
3802 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); 3801 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric);
3803 share->set_construct_stub(construct_stub); 3802 share->set_construct_stub(construct_stub);
3804 share->set_instance_class_name(Object_string()); 3803 share->set_instance_class_name(Object_string());
3805 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); 3804 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER);
3806 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); 3805 share->set_script(undefined_value(), SKIP_WRITE_BARRIER);
3807 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); 3806 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
3808 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); 3807 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
3808 share->set_feedback_vector(empty_fixed_array(), SKIP_WRITE_BARRIER);
3809 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); 3809 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
3810 share->set_ast_node_count(0); 3810 share->set_ast_node_count(0);
3811 share->set_counters(0); 3811 share->set_counters(0);
3812 3812
3813 // Set integer fields (smi or int, depending on the architecture). 3813 // Set integer fields (smi or int, depending on the architecture).
3814 share->set_length(0); 3814 share->set_length(0);
3815 share->set_formal_parameter_count(0); 3815 share->set_formal_parameter_count(0);
3816 share->set_expected_nof_properties(0); 3816 share->set_expected_nof_properties(0);
3817 share->set_num_literals(0); 3817 share->set_num_literals(0);
3818 share->set_start_position_and_type(0); 3818 share->set_start_position_and_type(0);
(...skipping 3879 matching lines...) Expand 10 before | Expand all | Expand 10 after
7698 static_cast<int>(object_sizes_last_time_[index])); 7698 static_cast<int>(object_sizes_last_time_[index]));
7699 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7699 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7700 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7700 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7701 7701
7702 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7702 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7703 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7703 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7704 ClearObjectStats(); 7704 ClearObjectStats();
7705 } 7705 }
7706 7706
7707 } } // namespace v8::internal 7707 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698