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

Unified Diff: src/bootstrapper.cc

Issue 1349643002: [builtins] Also simplify the Symbol constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@StringConstructor
Patch Set: Fix off-by-1 in DCHECK. Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')
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 f382e263724f03812e00a07b31c7673d5d6d8298..6e73de5e533765feac7cc8309bdd746538e00c0e 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1147,7 +1147,11 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> global_object,
// --- S y m b o l ---
Handle<JSFunction> symbol_fun = InstallFunction(
global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
- isolate->initial_object_prototype(), Builtins::kIllegal);
+ isolate->initial_object_prototype(), Builtins::kSymbolConstructor);
+ symbol_fun->shared()->set_construct_stub(isolate->builtins()->builtin(
+ Builtins::kSymbolConstructor_ConstructStub));
+ symbol_fun->shared()->set_internal_formal_parameter_count(1);
+ symbol_fun->shared()->set_length(1);
native_context()->set_symbol_function(*symbol_fun);
}
« no previous file with comments | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698