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

Side by Side Diff: src/heap.cc

Issue 239993003: Handlify Heap::AllocateAllocationSite. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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/heap.h ('k') | no next file » | 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 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER); 2417 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER);
2418 return code_cache; 2418 return code_cache;
2419 } 2419 }
2420 2420
2421 2421
2422 MaybeObject* Heap::AllocatePolymorphicCodeCache() { 2422 MaybeObject* Heap::AllocatePolymorphicCodeCache() {
2423 return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE); 2423 return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE);
2424 } 2424 }
2425 2425
2426 2426
2427 MaybeObject* Heap::AllocateAliasedArgumentsEntry(int aliased_context_slot) {
2428 AliasedArgumentsEntry* entry;
2429 { MaybeObject* maybe_entry = AllocateStruct(ALIASED_ARGUMENTS_ENTRY_TYPE);
2430 if (!maybe_entry->To(&entry)) return maybe_entry;
2431 }
2432 entry->set_aliased_context_slot(aliased_context_slot);
2433 return entry;
2434 }
2435
2436
2437 const Heap::StringTypeTable Heap::string_type_table[] = { 2427 const Heap::StringTypeTable Heap::string_type_table[] = {
2438 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ 2428 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \
2439 {type, size, k##camel_name##MapRootIndex}, 2429 {type, size, k##camel_name##MapRootIndex},
2440 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) 2430 STRING_TYPE_LIST(STRING_TYPE_ELEMENT)
2441 #undef STRING_TYPE_ELEMENT 2431 #undef STRING_TYPE_ELEMENT
2442 }; 2432 };
2443 2433
2444 2434
2445 const Heap::ConstantStringTable Heap::constant_string_table[] = { 2435 const Heap::ConstantStringTable Heap::constant_string_table[] = {
2446 #define CONSTANT_STRING_ELEMENT(name, contents) \ 2436 #define CONSTANT_STRING_ELEMENT(name, contents) \
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
2738 global_property_cell_map()); 2728 global_property_cell_map());
2739 PropertyCell* cell = PropertyCell::cast(result); 2729 PropertyCell* cell = PropertyCell::cast(result);
2740 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), 2730 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()),
2741 SKIP_WRITE_BARRIER); 2731 SKIP_WRITE_BARRIER);
2742 cell->set_value(the_hole_value()); 2732 cell->set_value(the_hole_value());
2743 cell->set_type(HeapType::None()); 2733 cell->set_type(HeapType::None());
2744 return result; 2734 return result;
2745 } 2735 }
2746 2736
2747 2737
2748 MaybeObject* Heap::AllocateAllocationSite() {
2749 AllocationSite* site;
2750 MaybeObject* maybe_result = Allocate(allocation_site_map(),
2751 OLD_POINTER_SPACE);
2752 if (!maybe_result->To(&site)) return maybe_result;
2753 site->Initialize();
2754
2755 // Link the site
2756 site->set_weak_next(allocation_sites_list());
2757 set_allocation_sites_list(site);
2758 return site;
2759 }
2760
2761
2762 MaybeObject* Heap::CreateOddball(Map* map, 2738 MaybeObject* Heap::CreateOddball(Map* map,
2763 const char* to_string, 2739 const char* to_string,
2764 Object* to_number, 2740 Object* to_number,
2765 byte kind) { 2741 byte kind) {
2766 Object* result; 2742 Object* result;
2767 { MaybeObject* maybe_result = Allocate(map, OLD_POINTER_SPACE); 2743 { MaybeObject* maybe_result = Allocate(map, OLD_POINTER_SPACE);
2768 if (!maybe_result->ToObject(&result)) return maybe_result; 2744 if (!maybe_result->ToObject(&result)) return maybe_result;
2769 } 2745 }
2770 return Oddball::cast(result)->Initialize(this, to_string, to_number, kind); 2746 return Oddball::cast(result)->Initialize(this, to_string, to_number, kind);
2771 } 2747 }
(...skipping 4386 matching lines...) Expand 10 before | Expand all | Expand 10 after
7158 static_cast<int>(object_sizes_last_time_[index])); 7134 static_cast<int>(object_sizes_last_time_[index]));
7159 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 7135 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
7160 #undef ADJUST_LAST_TIME_OBJECT_COUNT 7136 #undef ADJUST_LAST_TIME_OBJECT_COUNT
7161 7137
7162 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 7138 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
7163 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 7139 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
7164 ClearObjectStats(); 7140 ClearObjectStats();
7165 } 7141 }
7166 7142
7167 } } // namespace v8::internal 7143 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698