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

Unified Diff: src/bootstrapper.cc

Issue 1641083003: [builtins] Make Math.max and Math.min fast by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: SKIP unrelated ignition failures. 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 6aabf61bcb8504907b997129ffd8abf79d39449e..3a290691ed9fe400314266cec42a712e0f9596aa 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1517,9 +1517,11 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
cons,
Handle<Object>(native_context()->initial_object_prototype(), isolate));
cons->shared()->set_instance_class_name(*name);
- Handle<JSObject> json_object = factory->NewJSObject(cons, TENURED);
- DCHECK(json_object->IsJSObject());
- JSObject::AddProperty(global, name, json_object, DONT_ENUM);
+ Handle<JSObject> math = factory->NewJSObject(cons, TENURED);
+ DCHECK(math->IsJSObject());
+ JSObject::AddProperty(global, name, math, DONT_ENUM);
+ SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false);
+ SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false);
}
{ // -- A r r a y B u f f e r
« src/arm64/builtins-arm64.cc ('K') | « src/arm64/builtins-arm64.cc ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698