Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 343970b77b3f6b17f2ce3f0b06deaf7245e0f000..d1cbbc4b3ffb638d34dea2bf22f7210d5f8f3f97 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2561,6 +2561,18 @@ void Builtins::Generate_MathSqrt(CodeStubAssembler* assembler) { |
assembler->Return(result); |
} |
+// ES6 section 20.2.2.33 Math.tan ( x ) |
+void Builtins::Generate_MathTan(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->Float64Tan(x_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
+} |
+ |
// ES6 section 20.2.2.35 Math.trunc ( x ) |
void Builtins::Generate_MathTrunc(CodeStubAssembler* assembler) { |
Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Trunc); |