Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 905427606bc7864e6fc2328dcf176066826c012a..6c68b479d554d882ba84aad12a2c70c173ca8c6f 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2316,6 +2316,18 @@ void Builtins::Generate_MathAtan2(CodeStubAssembler* assembler) { |
assembler->Return(result); |
} |
+// ES6 section 20.2.2.7 Math.atanh ( x ) |
+void Builtins::Generate_MathAtanh(CodeStubAssembler* assembler) { |
+ using compiler::Node; |
+ |
+ Node* x = assembler->Parameter(1); |
+ Node* context = assembler->Parameter(4); |
+ Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
+ Node* value = assembler->Float64Atanh(x_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
+} |
+ |
namespace { |
void Generate_MathRoundingOperation( |
@@ -2384,6 +2396,18 @@ void Builtins::Generate_MathCeil(CodeStubAssembler* assembler) { |
Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Ceil); |
} |
+// ES6 section 20.2.2.9 Math.cbrt ( x ) |
+void Builtins::Generate_MathCbrt(CodeStubAssembler* assembler) { |
+ using compiler::Node; |
+ |
+ Node* x = assembler->Parameter(1); |
+ Node* context = assembler->Parameter(4); |
+ Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
+ Node* value = assembler->Float64Cbrt(x_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
+} |
+ |
// ES6 section 20.2.2.11 Math.clz32 ( x ) |
void Builtins::Generate_MathClz32(CodeStubAssembler* assembler) { |
typedef CodeStubAssembler::Label Label; |
@@ -2539,6 +2563,18 @@ void Builtins::Generate_MathLog10(CodeStubAssembler* assembler) { |
assembler->Return(result); |
} |
+// ES6 section 20.2.2.15 Math.expm1 ( x ) |
+void Builtins::Generate_MathExpm1(CodeStubAssembler* assembler) { |
+ using compiler::Node; |
+ |
+ Node* x = assembler->Parameter(1); |
+ Node* context = assembler->Parameter(4); |
+ Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
+ Node* value = assembler->Float64Expm1(x_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
+} |
+ |
// ES6 section 20.2.2.28 Math.round ( x ) |
void Builtins::Generate_MathRound(CodeStubAssembler* assembler) { |
Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Round); |