Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 0158369f756b89586126dc2d4530662433a672fe..c91df28e0089337a86b99d2583309d8c826173ce 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -2561,6 +2561,20 @@ void Builtins::Generate_MathRound(CodeStubAssembler* assembler) { |
Generate_MathRoundingOperation(assembler, &CodeStubAssembler::Float64Round); |
} |
+// ES6 section 20.2.2.26 Math.pow ( x, y ) |
+void Builtins::Generate_MathPow(CodeStubAssembler* assembler) { |
+ using compiler::Node; |
+ |
+ Node* x = assembler->Parameter(1); |
+ Node* y = assembler->Parameter(2); |
+ Node* context = assembler->Parameter(5); |
+ Node* x_value = assembler->TruncateTaggedToFloat64(context, x); |
+ Node* y_value = assembler->TruncateTaggedToFloat64(context, y); |
+ Node* value = assembler->Float64Pow(x_value, y_value); |
+ Node* result = assembler->ChangeFloat64ToTagged(value); |
+ assembler->Return(result); |
+} |
+ |
// ES6 section 20.2.2.30 Math.sin ( x ) |
void Builtins::Generate_MathSin(CodeStubAssembler* assembler) { |
using compiler::Node; |