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

Unified Diff: src/bootstrapper.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast-value-factory.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index eeb1f3ce4583cb441d28181d02c66ce4b8db63b8..eb8cd7c5a5e7ca63c2bd25de4f2682ed651b7a20 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1561,9 +1561,6 @@ void Genesis::InstallNativeFunctions() {
native_object_get_notifier);
INSTALL_NATIVE(JSFunction, "NativeObjectNotifierPerformChange",
native_object_notifier_perform_change);
-
- INSTALL_NATIVE(Symbol, "symbolIterator", iterator_symbol);
- INSTALL_NATIVE(Symbol, "symbolUnscopables", unscopables_symbol);
INSTALL_NATIVE(JSFunction, "ArrayValues", array_values_iterator);
#define INSTALL_NATIVE_FUNCTIONS_FOR(id, descr) InstallNativeFunctions_##id();
@@ -1988,6 +1985,17 @@ bool Genesis::InstallNatives() {
return true;
}
+ // Install public symbols.
+ {
+ static const PropertyAttributes attributes =
+ static_cast<PropertyAttributes>(READ_ONLY | DONT_DELETE);
+#define INSTALL_PUBLIC_SYMBOL(name, varname, description) \
+ Handle<String> varname = factory()->NewStringFromStaticChars(#varname); \
+ JSObject::AddProperty(builtins, varname, factory()->name(), attributes);
+ PUBLIC_SYMBOL_LIST(INSTALL_PUBLIC_SYMBOL)
+#undef INSTALL_PUBLIC_SYMBOL
+ }
+
// Install natives.
for (int i = Natives::GetDebuggerCount();
i < Natives::GetBuiltinsCount();
@@ -2114,22 +2122,22 @@ bool Genesis::InstallNatives() {
Handle<AccessorInfo> arguments_iterator =
Accessors::ArgumentsIteratorInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()),
- arguments_iterator, attribs);
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
+ attribs);
Handle<Map> map(native_context()->sloppy_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
}
{
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()),
- arguments_iterator, attribs);
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
+ attribs);
Handle<Map> map(native_context()->aliased_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
}
{
- CallbacksDescriptor d(Handle<Name>(native_context()->iterator_symbol()),
- arguments_iterator, attribs);
+ CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
+ attribs);
Handle<Map> map(native_context()->strict_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
« no previous file with comments | « src/ast-value-factory.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698