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

Unified Diff: src/bootstrapper.cc

Issue 2424403002: [builtins] Migrate Number.parseInt to TurboFan builtin. (Closed)
Patch Set: Created 4 years, 2 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/builtins.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 02b2a240881a5a04a75a106eadb4ac44271fb29e..e503e1a2852e6e8e5d696dcad2c73c7fe1b63a36 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1447,6 +1447,13 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
JSObject::AddProperty(global_object,
factory->NewStringFromAsciiChecked("parseFloat"),
parse_float_fun, DONT_ENUM);
+
+ // Install Number.parseInt and Global.parseInt.
+ Handle<JSFunction> parse_int_fun = SimpleInstallFunction(
+ number_fun, "parseInt", Builtins::kNumberParseInt, 2, true);
+ JSObject::AddProperty(global_object,
+ factory->NewStringFromAsciiChecked("parseInt"),
+ parse_int_fun, DONT_ENUM);
}
{ // --- B o o l e a n ---
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698