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 2115493002: [builtins] Migrate Math.abs() to TurboFan builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment back in Created 4 years, 6 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') | 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 ba940736dfff6e098afef099fb82b6aedbe4b75b..425b64d1ddb2bb849070ef83bee591f700fcd2da 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1669,6 +1669,9 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
Handle<JSObject> math = factory->NewJSObject(cons, TENURED);
DCHECK(math->IsJSObject());
JSObject::AddProperty(global, name, math, DONT_ENUM);
+ Handle<JSFunction> math_abs =
+ SimpleInstallFunction(math, "abs", Builtins::kMathAbs, 1, true);
+ native_context()->set_math_abs(*math_abs);
SimpleInstallFunction(math, "acos", Builtins::kMathAcos, 1, true);
SimpleInstallFunction(math, "asin", Builtins::kMathAsin, 1, true);
SimpleInstallFunction(math, "atan", Builtins::kMathAtan, 1, true);
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698