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

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

Issue 1875033003: Revert of Turn StoreIC::Megamorphic into a builtin, get rid of the non-monomorphic-cache (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/ic/arm/ic-arm.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 // 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/heap/heap.h" 5 #include "src/heap/heap.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/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 for (unsigned i = 0; i < arraysize(constant_string_table); i++) { 2688 for (unsigned i = 0; i < arraysize(constant_string_table); i++) {
2689 Handle<String> str = 2689 Handle<String> str =
2690 factory->InternalizeUtf8String(constant_string_table[i].contents); 2690 factory->InternalizeUtf8String(constant_string_table[i].contents);
2691 roots_[constant_string_table[i].index] = *str; 2691 roots_[constant_string_table[i].index] = *str;
2692 } 2692 }
2693 2693
2694 // Create the code_stubs dictionary. The initial size is set to avoid 2694 // Create the code_stubs dictionary. The initial size is set to avoid
2695 // expanding the dictionary during bootstrapping. 2695 // expanding the dictionary during bootstrapping.
2696 set_code_stubs(*UnseededNumberDictionary::New(isolate(), 128)); 2696 set_code_stubs(*UnseededNumberDictionary::New(isolate(), 128));
2697 2697
2698 // Create the non_monomorphic_cache used in stub-cache.cc. The initial size
2699 // is set to avoid expanding the dictionary during bootstrapping.
2700 set_non_monomorphic_cache(*UnseededNumberDictionary::New(isolate(), 64));
2701
2698 set_instanceof_cache_function(Smi::FromInt(0)); 2702 set_instanceof_cache_function(Smi::FromInt(0));
2699 set_instanceof_cache_map(Smi::FromInt(0)); 2703 set_instanceof_cache_map(Smi::FromInt(0));
2700 set_instanceof_cache_answer(Smi::FromInt(0)); 2704 set_instanceof_cache_answer(Smi::FromInt(0));
2701 2705
2702 { 2706 {
2703 HandleScope scope(isolate()); 2707 HandleScope scope(isolate());
2704 #define SYMBOL_INIT(name) \ 2708 #define SYMBOL_INIT(name) \
2705 { \ 2709 { \
2706 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \ 2710 Handle<String> name##d = factory->NewStringFromStaticChars(#name); \
2707 Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \ 2711 Handle<Symbol> symbol(isolate()->factory()->NewPrivateSymbol()); \
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 } 2894 }
2891 2895
2892 2896
2893 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { 2897 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
2894 switch (root_index) { 2898 switch (root_index) {
2895 case kNumberStringCacheRootIndex: 2899 case kNumberStringCacheRootIndex:
2896 case kInstanceofCacheFunctionRootIndex: 2900 case kInstanceofCacheFunctionRootIndex:
2897 case kInstanceofCacheMapRootIndex: 2901 case kInstanceofCacheMapRootIndex:
2898 case kInstanceofCacheAnswerRootIndex: 2902 case kInstanceofCacheAnswerRootIndex:
2899 case kCodeStubsRootIndex: 2903 case kCodeStubsRootIndex:
2904 case kNonMonomorphicCacheRootIndex:
2900 case kEmptyScriptRootIndex: 2905 case kEmptyScriptRootIndex:
2901 case kSymbolRegistryRootIndex: 2906 case kSymbolRegistryRootIndex:
2902 case kScriptListRootIndex: 2907 case kScriptListRootIndex:
2903 case kMaterializedObjectsRootIndex: 2908 case kMaterializedObjectsRootIndex:
2904 case kMicrotaskQueueRootIndex: 2909 case kMicrotaskQueueRootIndex:
2905 case kDetachedContextsRootIndex: 2910 case kDetachedContextsRootIndex:
2906 case kWeakObjectToCodeTableRootIndex: 2911 case kWeakObjectToCodeTableRootIndex:
2907 case kRetainedMapsRootIndex: 2912 case kRetainedMapsRootIndex:
2908 case kNoScriptSharedFunctionInfosRootIndex: 2913 case kNoScriptSharedFunctionInfosRootIndex:
2909 case kWeakStackTraceListRootIndex: 2914 case kWeakStackTraceListRootIndex:
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after
6442 } 6447 }
6443 6448
6444 6449
6445 // static 6450 // static
6446 int Heap::GetStaticVisitorIdForMap(Map* map) { 6451 int Heap::GetStaticVisitorIdForMap(Map* map) {
6447 return StaticVisitorBase::GetVisitorId(map); 6452 return StaticVisitorBase::GetVisitorId(map);
6448 } 6453 }
6449 6454
6450 } // namespace internal 6455 } // namespace internal
6451 } // namespace v8 6456 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/ic/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698