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

Side by Side Diff: src/isolate.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.cc ('k') | src/macros.py » ('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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 2554
2555 Handle<JSObject> Isolate::GetSymbolRegistry() { 2555 Handle<JSObject> Isolate::GetSymbolRegistry() {
2556 if (heap()->symbol_registry()->IsSmi()) { 2556 if (heap()->symbol_registry()->IsSmi()) {
2557 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); 2557 Handle<Map> map = factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize);
2558 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map); 2558 Handle<JSObject> registry = factory()->NewJSObjectFromMap(map);
2559 heap()->set_symbol_registry(*registry); 2559 heap()->set_symbol_registry(*registry);
2560 2560
2561 SetUpSubregistry(registry, map, "for"); 2561 SetUpSubregistry(registry, map, "for");
2562 SetUpSubregistry(registry, map, "for_api"); 2562 SetUpSubregistry(registry, map, "for_api");
2563 SetUpSubregistry(registry, map, "keyFor"); 2563 SetUpSubregistry(registry, map, "keyFor");
2564 SetUpSubregistry(registry, map, "private_api");
2565 heap()->AddPrivateGlobalSymbols(
2566 SetUpSubregistry(registry, map, "private_intern"));
2567 } 2564 }
2568 return Handle<JSObject>::cast(factory()->symbol_registry()); 2565 return Handle<JSObject>::cast(factory()->symbol_registry());
2569 } 2566 }
2570 2567
2571 2568
2572 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) { 2569 void Isolate::AddCallCompletedCallback(CallCompletedCallback callback) {
2573 for (int i = 0; i < call_completed_callbacks_.length(); i++) { 2570 for (int i = 0; i < call_completed_callbacks_.length(); i++) {
2574 if (callback == call_completed_callbacks_.at(i)) return; 2571 if (callback == call_completed_callbacks_.at(i)) return;
2575 } 2572 }
2576 call_completed_callbacks_.Add(callback); 2573 call_completed_callbacks_.Add(callback);
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2818 // Then check whether this scope intercepts. 2815 // Then check whether this scope intercepts.
2819 if ((flag & intercept_mask_)) { 2816 if ((flag & intercept_mask_)) {
2820 intercepted_flags_ |= flag; 2817 intercepted_flags_ |= flag;
2821 return true; 2818 return true;
2822 } 2819 }
2823 return false; 2820 return false;
2824 } 2821 }
2825 2822
2826 } // namespace internal 2823 } // namespace internal
2827 } // namespace v8 2824 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/macros.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698