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

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

Issue 1293493004: Unify symbols sharing across native scripts and runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 4 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/isolate.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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 3374 matching lines...) Expand 10 before | Expand all | Expand 10 after
3385 isolate_->context_slot_cache()->Clear(); 3385 isolate_->context_slot_cache()->Clear();
3386 3386
3387 // Initialize descriptor cache. 3387 // Initialize descriptor cache.
3388 isolate_->descriptor_lookup_cache()->Clear(); 3388 isolate_->descriptor_lookup_cache()->Clear();
3389 3389
3390 // Initialize compilation cache. 3390 // Initialize compilation cache.
3391 isolate_->compilation_cache()->Clear(); 3391 isolate_->compilation_cache()->Clear();
3392 } 3392 }
3393 3393
3394 3394
3395 void Heap::AddPrivateGlobalSymbols(Handle<Object> private_intern_table) {
3396 #define ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE(name_arg) \
3397 { \
3398 Handle<Symbol> symbol(Symbol::cast(roots_[k##name_arg##RootIndex])); \
3399 Handle<String> name_arg##d(String::cast(symbol->name())); \
3400 JSObject::AddProperty(Handle<JSObject>::cast(private_intern_table), \
3401 name_arg##d, symbol, NONE); \
3402 }
3403 PRIVATE_SYMBOL_LIST(ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE)
3404 #undef ADD_SYMBOL_TO_PRIVATE_INTERN_TABLE
3405 }
3406
3407
3408 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) { 3395 bool Heap::RootCanBeWrittenAfterInitialization(Heap::RootListIndex root_index) {
3409 switch (root_index) { 3396 switch (root_index) {
3410 case kStoreBufferTopRootIndex: 3397 case kStoreBufferTopRootIndex:
3411 case kNumberStringCacheRootIndex: 3398 case kNumberStringCacheRootIndex:
3412 case kInstanceofCacheFunctionRootIndex: 3399 case kInstanceofCacheFunctionRootIndex:
3413 case kInstanceofCacheMapRootIndex: 3400 case kInstanceofCacheMapRootIndex:
3414 case kInstanceofCacheAnswerRootIndex: 3401 case kInstanceofCacheAnswerRootIndex:
3415 case kCodeStubsRootIndex: 3402 case kCodeStubsRootIndex:
3416 case kNonMonomorphicCacheRootIndex: 3403 case kNonMonomorphicCacheRootIndex:
3417 case kPolymorphicCodeCacheRootIndex: 3404 case kPolymorphicCodeCacheRootIndex:
(...skipping 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after
6892 *object_type = "CODE_TYPE"; \ 6879 *object_type = "CODE_TYPE"; \
6893 *object_sub_type = "CODE_AGE/" #name; \ 6880 *object_sub_type = "CODE_AGE/" #name; \
6894 return true; 6881 return true;
6895 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6882 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6896 #undef COMPARE_AND_RETURN_NAME 6883 #undef COMPARE_AND_RETURN_NAME
6897 } 6884 }
6898 return false; 6885 return false;
6899 } 6886 }
6900 } // namespace internal 6887 } // namespace internal
6901 } // namespace v8 6888 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698