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

Side by Side Diff: src/bootstrapper.cc

Issue 2102223005: [builtins] Migrate Math.hypot() to C++ builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@MathAbs
Patch Set: Do not add Math.hypot() to list of optimized functions. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api-natives.h" 8 #include "src/api-natives.h"
9 #include "src/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true); 1683 SimpleInstallFunction(math, "clz32", Builtins::kMathClz32, 1, true);
1684 SimpleInstallFunction(math, "cos", Builtins::kMathCos, 1, true); 1684 SimpleInstallFunction(math, "cos", Builtins::kMathCos, 1, true);
1685 SimpleInstallFunction(math, "cosh", Builtins::kMathCosh, 1, true); 1685 SimpleInstallFunction(math, "cosh", Builtins::kMathCosh, 1, true);
1686 Handle<JSFunction> math_exp = 1686 Handle<JSFunction> math_exp =
1687 SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true); 1687 SimpleInstallFunction(math, "exp", Builtins::kMathExp, 1, true);
1688 native_context()->set_math_exp(*math_exp); 1688 native_context()->set_math_exp(*math_exp);
1689 Handle<JSFunction> math_floor = 1689 Handle<JSFunction> math_floor =
1690 SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true); 1690 SimpleInstallFunction(math, "floor", Builtins::kMathFloor, 1, true);
1691 native_context()->set_math_floor(*math_floor); 1691 native_context()->set_math_floor(*math_floor);
1692 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true); 1692 SimpleInstallFunction(math, "fround", Builtins::kMathFround, 1, true);
1693 SimpleInstallFunction(math, "hypot", Builtins::kMathHypot, 2, false);
1693 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true); 1694 SimpleInstallFunction(math, "imul", Builtins::kMathImul, 2, true);
1694 Handle<JSFunction> math_log = 1695 Handle<JSFunction> math_log =
1695 SimpleInstallFunction(math, "log", Builtins::kMathLog, 1, true); 1696 SimpleInstallFunction(math, "log", Builtins::kMathLog, 1, true);
1696 native_context()->set_math_log(*math_log); 1697 native_context()->set_math_log(*math_log);
1697 SimpleInstallFunction(math, "log1p", Builtins::kMathLog1p, 1, true); 1698 SimpleInstallFunction(math, "log1p", Builtins::kMathLog1p, 1, true);
1698 SimpleInstallFunction(math, "log2", Builtins::kMathLog2, 1, true); 1699 SimpleInstallFunction(math, "log2", Builtins::kMathLog2, 1, true);
1699 SimpleInstallFunction(math, "log10", Builtins::kMathLog10, 1, true); 1700 SimpleInstallFunction(math, "log10", Builtins::kMathLog10, 1, true);
1700 SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false); 1701 SimpleInstallFunction(math, "max", Builtins::kMathMax, 2, false);
1701 SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false); 1702 SimpleInstallFunction(math, "min", Builtins::kMathMin, 2, false);
1702 Handle<JSFunction> math_pow = 1703 Handle<JSFunction> math_pow =
(...skipping 2244 matching lines...) Expand 10 before | Expand all | Expand 10 after
3947 } 3948 }
3948 3949
3949 3950
3950 // Called when the top-level V8 mutex is destroyed. 3951 // Called when the top-level V8 mutex is destroyed.
3951 void Bootstrapper::FreeThreadResources() { 3952 void Bootstrapper::FreeThreadResources() {
3952 DCHECK(!IsActive()); 3953 DCHECK(!IsActive());
3953 } 3954 }
3954 3955
3955 } // namespace internal 3956 } // namespace internal
3956 } // namespace v8 3957 } // namespace v8
OLDNEW
« 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