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

Unified Diff: src/bootstrapper.cc

Issue 1573243009: [builtins] Migrate Number constructor similar to String constructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index c6a1c32eadab97f63990b1ff1be3a9d1c967f717..e404fb6727941a342cbb7c93a5fec84079349ba0 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1201,14 +1201,15 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
}
{ // --- N u m b e r ---
- Handle<JSFunction> number_fun =
- InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize,
- isolate->initial_object_prototype(),
- Builtins::kIllegal);
+ Handle<JSFunction> number_fun = InstallFunction(
+ global, "Number", JS_VALUE_TYPE, JSValue::kSize,
+ isolate->initial_object_prototype(), Builtins::kNumberConstructor);
+ number_fun->shared()->DontAdaptArguments();
+ number_fun->shared()->set_construct_stub(
+ *isolate->builtins()->NumberConstructor_ConstructStub());
+ number_fun->shared()->set_length(1);
InstallWithIntrinsicDefaultProto(isolate, number_fun,
Context::NUMBER_FUNCTION_INDEX);
- number_fun->shared()->set_construct_stub(
- *isolate->builtins()->JSBuiltinsConstructStub());
}
{ // --- B o o l e a n ---
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/builtins.h » ('j') | src/x64/builtins-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698