Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 79c895b74f58b28d2cab7a84d72fb91d4d7e8189..94f90efba78201948f28ffb17f721bf73be99f80 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2474,6 +2474,18 @@ void Builtins::Generate_MathLog(CodeStubAssembler* assembler) { |
assembler->Return(result); |
} |
+// ES6 section 20.2.2.21 Math.log1p ( x ) |
+void Builtins::Generate_MathLog1p(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->Float64Log1p(x_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
Yang
2016/06/13 05:36:33
If only we could reduce duplicate code for these s
Benedikt Meurer
2016/06/13 05:40:17
Acknowledged.
|
+} |
+ |
// ES6 section 20.2.2.28 Math.round ( x ) |
void Builtins::Generate_MathRound(CodeStubAssembler* assembler) { |
Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Round); |