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

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

Issue 722723002: Move public symbols to the root set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« 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/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 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 2914
2915 { 2915 {
2916 HandleScope scope(isolate()); 2916 HandleScope scope(isolate());
2917 #define SYMBOL_INIT(name) \ 2917 #define SYMBOL_INIT(name) \
2918 Handle<Symbol> name = factory->NewPrivateOwnSymbol(); \ 2918 Handle<Symbol> name = factory->NewPrivateOwnSymbol(); \
2919 roots_[k##name##RootIndex] = *name; 2919 roots_[k##name##RootIndex] = *name;
2920 PRIVATE_SYMBOL_LIST(SYMBOL_INIT) 2920 PRIVATE_SYMBOL_LIST(SYMBOL_INIT)
2921 #undef SYMBOL_INIT 2921 #undef SYMBOL_INIT
2922 } 2922 }
2923 2923
2924 {
2925 HandleScope scope(isolate());
2926 #define SYMBOL_INIT(name, varname, description) \
2927 Handle<Symbol> name = factory->NewSymbol(); \
2928 Handle<String> name##d = factory->NewStringFromStaticChars(#description); \
2929 name->set_name(*name##d); \
2930 roots_[k##name##RootIndex] = *name;
2931 PUBLIC_SYMBOL_LIST(SYMBOL_INIT)
2932 #undef SYMBOL_INIT
2933 }
2934
2924 CreateFixedStubs(); 2935 CreateFixedStubs();
2925 2936
2926 // Allocate the dictionary of intrinsic function names. 2937 // Allocate the dictionary of intrinsic function names.
2927 Handle<NameDictionary> intrinsic_names = 2938 Handle<NameDictionary> intrinsic_names =
2928 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED); 2939 NameDictionary::New(isolate(), Runtime::kNumFunctions, TENURED);
2929 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names); 2940 Runtime::InitializeIntrinsicFunctionNames(isolate(), intrinsic_names);
2930 set_intrinsic_function_names(*intrinsic_names); 2941 set_intrinsic_function_names(*intrinsic_names);
2931 2942
2932 set_number_string_cache( 2943 set_number_string_cache(
2933 *factory->NewFixedArray(kInitialNumberStringCacheSize * 2, TENURED)); 2944 *factory->NewFixedArray(kInitialNumberStringCacheSize * 2, TENURED));
(...skipping 3359 matching lines...) Expand 10 before | Expand all | Expand 10 after
6293 static_cast<int>(object_sizes_last_time_[index])); 6304 static_cast<int>(object_sizes_last_time_[index]));
6294 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6305 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6295 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6306 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6296 6307
6297 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6308 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6298 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6309 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6299 ClearObjectStats(); 6310 ClearObjectStats();
6300 } 6311 }
6301 } 6312 }
6302 } // namespace v8::internal 6313 } // namespace v8::internal
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