1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef V8_BUILTINS_BUILTINS_MATH_GEN_H_
6 #define V8_BUILTINS_BUILTINS_MATH_GEN_H_
7 
8 #include "src/code-stub-assembler.h"
9 
10 namespace v8 {
11 namespace internal {
12 
13 class MathBuiltinsAssembler : public CodeStubAssembler {
14  public:
MathBuiltinsAssembler(compiler::CodeAssemblerState * state)15   explicit MathBuiltinsAssembler(compiler::CodeAssemblerState* state)
16       : CodeStubAssembler(state) {}
17 
18   Node* MathPow(Node* context, Node* base, Node* exponent);
19 
20  protected:
21   void MathRoundingOperation(
22       Node* context, Node* x,
23       TNode<Float64T> (CodeStubAssembler::*float64op)(SloppyTNode<Float64T>));
24   void MathUnaryOperation(
25       Node* context, Node* x,
26       TNode<Float64T> (CodeStubAssembler::*float64op)(SloppyTNode<Float64T>));
27   void MathMaxMin(Node* context, Node* argc,
28                   TNode<Float64T> (CodeStubAssembler::*float64op)(
29                       SloppyTNode<Float64T>, SloppyTNode<Float64T>),
30                   double default_val);
31 };
32 
33 }  // namespace internal
34 }  // namespace v8
35 
36 #endif  // V8_BUILTINS_BUILTINS_MATH_GEN_H_
37