| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_BUILTINS_BUILTINS_H_ | 5 #ifndef V8_BUILTINS_BUILTINS_H_ |
| 6 #define V8_BUILTINS_BUILTINS_H_ | 6 #define V8_BUILTINS_BUILTINS_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/globals.h" | 9 #include "src/globals.h" |
| 10 | 10 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 TFJ(MathImul, 2) \ | 531 TFJ(MathImul, 2) \ |
| 532 /* ES6 section 20.2.2.20 Math.log ( x ) */ \ | 532 /* ES6 section 20.2.2.20 Math.log ( x ) */ \ |
| 533 TFJ(MathLog, 1) \ | 533 TFJ(MathLog, 1) \ |
| 534 /* ES6 section 20.2.2.21 Math.log1p ( x ) */ \ | 534 /* ES6 section 20.2.2.21 Math.log1p ( x ) */ \ |
| 535 TFJ(MathLog1p, 1) \ | 535 TFJ(MathLog1p, 1) \ |
| 536 /* ES6 section 20.2.2.22 Math.log10 ( x ) */ \ | 536 /* ES6 section 20.2.2.22 Math.log10 ( x ) */ \ |
| 537 TFJ(MathLog10, 1) \ | 537 TFJ(MathLog10, 1) \ |
| 538 /* ES6 section 20.2.2.23 Math.log2 ( x ) */ \ | 538 /* ES6 section 20.2.2.23 Math.log2 ( x ) */ \ |
| 539 TFJ(MathLog2, 1) \ | 539 TFJ(MathLog2, 1) \ |
| 540 /* ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) */ \ | 540 /* ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) */ \ |
| 541 ASM(MathMax) \ | 541 TFJ(MathMax, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ |
| 542 /* ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) */ \ | 542 /* ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) */ \ |
| 543 ASM(MathMin) \ | 543 TFJ(MathMin, SharedFunctionInfo::kDontAdaptArgumentsSentinel) \ |
| 544 /* ES6 section 20.2.2.26 Math.pow ( x, y ) */ \ | 544 /* ES6 section 20.2.2.26 Math.pow ( x, y ) */ \ |
| 545 TFJ(MathPow, 2) \ | 545 TFJ(MathPow, 2) \ |
| 546 /* ES6 section 20.2.2.27 Math.random */ \ | 546 /* ES6 section 20.2.2.27 Math.random */ \ |
| 547 TFJ(MathRandom, 0) \ | 547 TFJ(MathRandom, 0) \ |
| 548 /* ES6 section 20.2.2.28 Math.round ( x ) */ \ | 548 /* ES6 section 20.2.2.28 Math.round ( x ) */ \ |
| 549 TFJ(MathRound, 1) \ | 549 TFJ(MathRound, 1) \ |
| 550 /* ES6 section 20.2.2.29 Math.sign ( x ) */ \ | 550 /* ES6 section 20.2.2.29 Math.sign ( x ) */ \ |
| 551 TFJ(MathSign, 1) \ | 551 TFJ(MathSign, 1) \ |
| 552 /* ES6 section 20.2.2.30 Math.sin ( x ) */ \ | 552 /* ES6 section 20.2.2.30 Math.sin ( x ) */ \ |
| 553 TFJ(MathSin, 1) \ | 553 TFJ(MathSin, 1) \ |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 static void Generate_CallForwardVarargs(MacroAssembler* masm, | 965 static void Generate_CallForwardVarargs(MacroAssembler* masm, |
| 966 Handle<Code> code); | 966 Handle<Code> code); |
| 967 | 967 |
| 968 static void Generate_InterpreterPushArgsAndCallImpl( | 968 static void Generate_InterpreterPushArgsAndCallImpl( |
| 969 MacroAssembler* masm, TailCallMode tail_call_mode, | 969 MacroAssembler* masm, TailCallMode tail_call_mode, |
| 970 InterpreterPushArgsMode mode); | 970 InterpreterPushArgsMode mode); |
| 971 | 971 |
| 972 static void Generate_InterpreterPushArgsAndConstructImpl( | 972 static void Generate_InterpreterPushArgsAndConstructImpl( |
| 973 MacroAssembler* masm, InterpreterPushArgsMode mode); | 973 MacroAssembler* masm, InterpreterPushArgsMode mode); |
| 974 | 974 |
| 975 enum class MathMaxMinKind { kMax, kMin }; | |
| 976 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | |
| 977 | |
| 978 #define DECLARE_ASM(Name, ...) \ | 975 #define DECLARE_ASM(Name, ...) \ |
| 979 static void Generate_##Name(MacroAssembler* masm); | 976 static void Generate_##Name(MacroAssembler* masm); |
| 980 #define DECLARE_TF(Name, ...) \ | 977 #define DECLARE_TF(Name, ...) \ |
| 981 static void Generate_##Name(compiler::CodeAssemblerState* state); | 978 static void Generate_##Name(compiler::CodeAssemblerState* state); |
| 982 | 979 |
| 983 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TF, DECLARE_TF, | 980 BUILTIN_LIST(IGNORE_BUILTIN, IGNORE_BUILTIN, DECLARE_TF, DECLARE_TF, |
| 984 DECLARE_ASM, DECLARE_ASM, DECLARE_ASM) | 981 DECLARE_ASM, DECLARE_ASM, DECLARE_ASM) |
| 985 | 982 |
| 986 #undef DECLARE_ASM | 983 #undef DECLARE_ASM |
| 987 #undef DECLARE_TF | 984 #undef DECLARE_TF |
| 988 | 985 |
| 989 // Note: These are always Code objects, but to conform with | 986 // Note: These are always Code objects, but to conform with |
| 990 // IterateBuiltins() above which assumes Object**'s for the callback | 987 // IterateBuiltins() above which assumes Object**'s for the callback |
| 991 // function f, we use an Object* array here. | 988 // function f, we use an Object* array here. |
| 992 Object* builtins_[builtin_count]; | 989 Object* builtins_[builtin_count]; |
| 993 bool initialized_; | 990 bool initialized_; |
| 994 | 991 |
| 995 friend class Isolate; | 992 friend class Isolate; |
| 996 | 993 |
| 997 DISALLOW_COPY_AND_ASSIGN(Builtins); | 994 DISALLOW_COPY_AND_ASSIGN(Builtins); |
| 998 }; | 995 }; |
| 999 | 996 |
| 1000 } // namespace internal | 997 } // namespace internal |
| 1001 } // namespace v8 | 998 } // namespace v8 |
| 1002 | 999 |
| 1003 #endif // V8_BUILTINS_BUILTINS_H_ | 1000 #endif // V8_BUILTINS_BUILTINS_H_ |
| OLD | NEW |