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

Unified Diff: src/builtins.h

Issue 1841993002: [builtins] Make Math.ceil, Math.trunc and Math.round optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 | « src/bootstrapper.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.h
diff --git a/src/builtins.h b/src/builtins.h
index 6554c34d3ff750836cf96a97c739ef381e36e36c..214c8c90e16b5036ae5d3160e32a417f17b40a0b 100644
--- a/src/builtins.h
+++ b/src/builtins.h
@@ -308,8 +308,11 @@ inline bool operator&(BuiltinExtraArguments lhs, BuiltinExtraArguments rhs) {
// Define list of builtins implemented in TurboFan (with JS linkage).
#define BUILTIN_LIST_T(V) \
+ V(MathCeil, 2) \
V(MathFloor, 2) \
- V(MathSqrt, 2)
+ V(MathRound, 2) \
+ V(MathSqrt, 2) \
+ V(MathTrunc, 2)
// Define list of builtin handlers implemented in assembly.
#define BUILTIN_LIST_H(V) \
@@ -582,6 +585,8 @@ class Builtins {
static void Generate_InternalArrayCode(MacroAssembler* masm);
static void Generate_ArrayCode(MacroAssembler* masm);
+ // ES6 section 20.2.2.10 Math.floor ( x )
+ static void Generate_MathCeil(compiler::CodeStubAssembler* assembler);
// ES6 section 20.2.2.16 Math.floor ( x )
static void Generate_MathFloor(compiler::CodeStubAssembler* assembler);
enum class MathMaxMinKind { kMax, kMin };
@@ -594,8 +599,12 @@ class Builtins {
static void Generate_MathMin(MacroAssembler* masm) {
Generate_MathMaxMin(masm, MathMaxMinKind::kMin);
}
+ // ES6 section 20.2.2.28 Math.round ( x )
+ static void Generate_MathRound(compiler::CodeStubAssembler* assembler);
// ES6 section 20.2.2.32 Math.sqrt ( x )
static void Generate_MathSqrt(compiler::CodeStubAssembler* assembler);
+ // ES6 section 20.2.2.35 Math.trunc ( x )
+ static void Generate_MathTrunc(compiler::CodeStubAssembler* assembler);
// ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case.
static void Generate_NumberConstructor(MacroAssembler* masm);
« no previous file with comments | « src/bootstrapper.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698