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

Side by Side Diff: src/heap/heap.cc

Issue 1052253003: Revert of Revert of Protect the emptiness of Array prototype elements with a PropertyCell. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/heap/heap.h ('k') | src/hydrogen.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 Handle<SeededNumberDictionary> slow_element_dictionary = 3098 Handle<SeededNumberDictionary> slow_element_dictionary =
3099 SeededNumberDictionary::New(isolate(), 0, TENURED); 3099 SeededNumberDictionary::New(isolate(), 0, TENURED);
3100 slow_element_dictionary->set_requires_slow_elements(); 3100 slow_element_dictionary->set_requires_slow_elements();
3101 set_empty_slow_element_dictionary(*slow_element_dictionary); 3101 set_empty_slow_element_dictionary(*slow_element_dictionary);
3102 3102
3103 set_materialized_objects(*factory->NewFixedArray(0, TENURED)); 3103 set_materialized_objects(*factory->NewFixedArray(0, TENURED));
3104 3104
3105 // Handling of script id generation is in Factory::NewScript. 3105 // Handling of script id generation is in Factory::NewScript.
3106 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId)); 3106 set_last_script_id(Smi::FromInt(v8::UnboundScript::kNoScriptId));
3107 3107
3108 Handle<PropertyCell> cell = factory->NewPropertyCell();
3109 cell->set_value(Smi::FromInt(1));
3110 set_array_protector(*cell);
3111
3108 set_allocation_sites_scratchpad( 3112 set_allocation_sites_scratchpad(
3109 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED)); 3113 *factory->NewFixedArray(kAllocationSiteScratchpadSize, TENURED));
3110 InitializeAllocationSitesScratchpad(); 3114 InitializeAllocationSitesScratchpad();
3111 3115
3112 // Initialize keyed lookup cache. 3116 // Initialize keyed lookup cache.
3113 isolate_->keyed_lookup_cache()->Clear(); 3117 isolate_->keyed_lookup_cache()->Clear();
3114 3118
3115 // Initialize context slot cache. 3119 // Initialize context slot cache.
3116 isolate_->context_slot_cache()->Clear(); 3120 isolate_->context_slot_cache()->Clear();
3117 3121
(...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after
6405 static_cast<int>(object_sizes_last_time_[index])); 6409 static_cast<int>(object_sizes_last_time_[index]));
6406 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6410 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6407 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6411 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6408 6412
6409 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6413 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6410 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6414 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6411 ClearObjectStats(); 6415 ClearObjectStats();
6412 } 6416 }
6413 } 6417 }
6414 } // namespace v8::internal 6418 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698