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

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: Ports and comment response. 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
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 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
3772 share->set_optimized_code_map(Smi::FromInt(0)); 3771 share->set_optimized_code_map(Smi::FromInt(0));
3773 share->set_scope_info(ScopeInfo::Empty(isolate_)); 3772 share->set_scope_info(ScopeInfo::Empty(isolate_));
3774 Code* construct_stub = 3773 Code* construct_stub =
3775 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric); 3774 isolate_->builtins()->builtin(Builtins::kJSConstructStubGeneric);
3776 share->set_construct_stub(construct_stub); 3775 share->set_construct_stub(construct_stub);
3777 share->set_instance_class_name(Object_string()); 3776 share->set_instance_class_name(Object_string());
3778 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER); 3777 share->set_function_data(undefined_value(), SKIP_WRITE_BARRIER);
3779 share->set_script(undefined_value(), SKIP_WRITE_BARRIER); 3778 share->set_script(undefined_value(), SKIP_WRITE_BARRIER);
3780 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER); 3779 share->set_debug_info(undefined_value(), SKIP_WRITE_BARRIER);
3781 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER); 3780 share->set_inferred_name(empty_string(), SKIP_WRITE_BARRIER);
3781 share->set_feedback_vector(empty_fixed_array(), SKIP_WRITE_BARRIER);
3782 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER); 3782 share->set_initial_map(undefined_value(), SKIP_WRITE_BARRIER);
3783 share->set_ast_node_count(0); 3783 share->set_ast_node_count(0);
3784 share->set_counters(0); 3784 share->set_counters(0);
3785 3785
3786 // Set integer fields (smi or int, depending on the architecture). 3786 // Set integer fields (smi or int, depending on the architecture).
3787 share->set_length(0); 3787 share->set_length(0);
3788 share->set_formal_parameter_count(0); 3788 share->set_formal_parameter_count(0);
3789 share->set_expected_nof_properties(0); 3789 share->set_expected_nof_properties(0);
3790 share->set_num_literals(0); 3790 share->set_num_literals(0);
3791 share->set_start_position_and_type(0); 3791 share->set_start_position_and_type(0);
(...skipping 3951 matching lines...) Expand 10 before | Expand all | Expand 10 after
7743 static_cast<int>(object_sizes_last_time_[index])); 7743 static_cast<int>(object_sizes_last_time_[index]));
7744 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7744 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7745 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7745 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7746 7746
7747 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7747 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7748 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7748 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7749 ClearObjectStats(); 7749 ClearObjectStats();
7750 } 7750 }
7751 7751
7752 } } // namespace v8::internal 7752 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698