| OLD | NEW |
| 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 2667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2678 CodeCache* code_cache; | 2678 CodeCache* code_cache; |
| 2679 { MaybeObject* maybe_code_cache = AllocateStruct(CODE_CACHE_TYPE); | 2679 { MaybeObject* maybe_code_cache = AllocateStruct(CODE_CACHE_TYPE); |
| 2680 if (!maybe_code_cache->To(&code_cache)) return maybe_code_cache; | 2680 if (!maybe_code_cache->To(&code_cache)) return maybe_code_cache; |
| 2681 } | 2681 } |
| 2682 code_cache->set_default_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); | 2682 code_cache->set_default_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); |
| 2683 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER); | 2683 code_cache->set_normal_type_cache(undefined_value(), SKIP_WRITE_BARRIER); |
| 2684 return code_cache; | 2684 return code_cache; |
| 2685 } | 2685 } |
| 2686 | 2686 |
| 2687 | 2687 |
| 2688 MaybeObject* Heap::AllocatePolymorphicCodeCache() { | |
| 2689 return AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE); | |
| 2690 } | |
| 2691 | |
| 2692 | |
| 2693 MaybeObject* Heap::AllocateAliasedArgumentsEntry(int aliased_context_slot) { | |
| 2694 AliasedArgumentsEntry* entry; | |
| 2695 { MaybeObject* maybe_entry = AllocateStruct(ALIASED_ARGUMENTS_ENTRY_TYPE); | |
| 2696 if (!maybe_entry->To(&entry)) return maybe_entry; | |
| 2697 } | |
| 2698 entry->set_aliased_context_slot(aliased_context_slot); | |
| 2699 return entry; | |
| 2700 } | |
| 2701 | |
| 2702 | |
| 2703 const Heap::StringTypeTable Heap::string_type_table[] = { | 2688 const Heap::StringTypeTable Heap::string_type_table[] = { |
| 2704 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ | 2689 #define STRING_TYPE_ELEMENT(type, size, name, camel_name) \ |
| 2705 {type, size, k##camel_name##MapRootIndex}, | 2690 {type, size, k##camel_name##MapRootIndex}, |
| 2706 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) | 2691 STRING_TYPE_LIST(STRING_TYPE_ELEMENT) |
| 2707 #undef STRING_TYPE_ELEMENT | 2692 #undef STRING_TYPE_ELEMENT |
| 2708 }; | 2693 }; |
| 2709 | 2694 |
| 2710 | 2695 |
| 2711 const Heap::ConstantStringTable Heap::constant_string_table[] = { | 2696 const Heap::ConstantStringTable Heap::constant_string_table[] = { |
| 2712 #define CONSTANT_STRING_ELEMENT(name, contents) \ | 2697 #define CONSTANT_STRING_ELEMENT(name, contents) \ |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3238 set_code_stubs(UnseededNumberDictionary::cast(obj)); | 3223 set_code_stubs(UnseededNumberDictionary::cast(obj)); |
| 3239 | 3224 |
| 3240 | 3225 |
| 3241 // Allocate the non_monomorphic_cache used in stub-cache.cc. The initial size | 3226 // Allocate the non_monomorphic_cache used in stub-cache.cc. The initial size |
| 3242 // is set to avoid expanding the dictionary during bootstrapping. | 3227 // is set to avoid expanding the dictionary during bootstrapping. |
| 3243 { MaybeObject* maybe_obj = UnseededNumberDictionary::Allocate(this, 64); | 3228 { MaybeObject* maybe_obj = UnseededNumberDictionary::Allocate(this, 64); |
| 3244 if (!maybe_obj->ToObject(&obj)) return false; | 3229 if (!maybe_obj->ToObject(&obj)) return false; |
| 3245 } | 3230 } |
| 3246 set_non_monomorphic_cache(UnseededNumberDictionary::cast(obj)); | 3231 set_non_monomorphic_cache(UnseededNumberDictionary::cast(obj)); |
| 3247 | 3232 |
| 3248 { MaybeObject* maybe_obj = AllocatePolymorphicCodeCache(); | 3233 { MaybeObject* maybe_obj = AllocateStruct(POLYMORPHIC_CODE_CACHE_TYPE); |
| 3249 if (!maybe_obj->ToObject(&obj)) return false; | 3234 if (!maybe_obj->ToObject(&obj)) return false; |
| 3250 } | 3235 } |
| 3251 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj)); | 3236 set_polymorphic_code_cache(PolymorphicCodeCache::cast(obj)); |
| 3252 | 3237 |
| 3253 set_instanceof_cache_function(Smi::FromInt(0)); | 3238 set_instanceof_cache_function(Smi::FromInt(0)); |
| 3254 set_instanceof_cache_map(Smi::FromInt(0)); | 3239 set_instanceof_cache_map(Smi::FromInt(0)); |
| 3255 set_instanceof_cache_answer(Smi::FromInt(0)); | 3240 set_instanceof_cache_answer(Smi::FromInt(0)); |
| 3256 | 3241 |
| 3257 CreateFixedStubs(); | 3242 CreateFixedStubs(); |
| 3258 | 3243 |
| (...skipping 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7714 static_cast<int>(object_sizes_last_time_[index])); | 7699 static_cast<int>(object_sizes_last_time_[index])); |
| 7715 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7700 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7716 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7701 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7717 | 7702 |
| 7718 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7703 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7719 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7704 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7720 ClearObjectStats(); | 7705 ClearObjectStats(); |
| 7721 } | 7706 } |
| 7722 | 7707 |
| 7723 } } // namespace v8::internal | 7708 } } // namespace v8::internal |
| OLD | NEW |