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

Unified Diff: src/bootstrapper.cc

Issue 2395373002: [builtins] Migrate Number.parseFloat to a TurboFan builtin. (Closed)
Patch Set: Fix the -0 corner case. 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 2529224e6a79d0603f7b27c9a3fa2f45f3ad5717..078f1e7c2474793f1f74e870ea7edc80ade00cdd 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1349,6 +1349,13 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
SimpleInstallFunction(number_fun, "isNaN", Builtins::kNumberIsNaN, 1, true);
SimpleInstallFunction(number_fun, "isSafeInteger",
Builtins::kNumberIsSafeInteger, 1, true);
+
+ // Install Number.parseFloat and Global.parseFloat.
+ Handle<JSFunction> parse_float_fun = SimpleInstallFunction(
+ number_fun, "parseFloat", Builtins::kNumberParseFloat, 1, true);
+ JSObject::AddProperty(global_object,
+ factory->NewStringFromAsciiChecked("parseFloat"),
+ parse_float_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