Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 07817fe8c0899444decbddebeb73acd90d6a5e6c..80fca71b2d7c884ed3b3672a369bca692ae174dc 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2464,6 +2464,18 @@ BUILTIN(MathImul) { |
return *isolate->factory()->NewNumberFromInt(product); |
} |
+// ES6 section 20.2.2.20 Math.log ( x ) |
+void Builtins::Generate_MathLog(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->Float64Log(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); |