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_H_ | 5 #ifndef V8_BUILTINS_H_ |
6 #define V8_BUILTINS_H_ | 6 #define V8_BUILTINS_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 | 10 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 V(GeneratorPrototypeNext, 2) \ | 303 V(GeneratorPrototypeNext, 2) \ |
304 V(GeneratorPrototypeReturn, 2) \ | 304 V(GeneratorPrototypeReturn, 2) \ |
305 V(GeneratorPrototypeThrow, 2) \ | 305 V(GeneratorPrototypeThrow, 2) \ |
306 V(MathAtan, 2) \ | 306 V(MathAtan, 2) \ |
307 V(MathAtan2, 3) \ | 307 V(MathAtan2, 3) \ |
308 V(MathAtanh, 2) \ | 308 V(MathAtanh, 2) \ |
309 V(MathCeil, 2) \ | 309 V(MathCeil, 2) \ |
310 V(MathCbrt, 2) \ | 310 V(MathCbrt, 2) \ |
311 V(MathExpm1, 2) \ | 311 V(MathExpm1, 2) \ |
312 V(MathClz32, 2) \ | 312 V(MathClz32, 2) \ |
| 313 V(MathCos, 2) \ |
313 V(MathExp, 2) \ | 314 V(MathExp, 2) \ |
314 V(MathFloor, 2) \ | 315 V(MathFloor, 2) \ |
315 V(MathLog, 2) \ | 316 V(MathLog, 2) \ |
316 V(MathLog1p, 2) \ | 317 V(MathLog1p, 2) \ |
317 V(MathLog2, 2) \ | 318 V(MathLog2, 2) \ |
318 V(MathLog10, 2) \ | 319 V(MathLog10, 2) \ |
319 V(MathRound, 2) \ | 320 V(MathRound, 2) \ |
| 321 V(MathSin, 2) \ |
320 V(MathSqrt, 2) \ | 322 V(MathSqrt, 2) \ |
321 V(MathTrunc, 2) \ | 323 V(MathTrunc, 2) \ |
322 V(ObjectHasOwnProperty, 2) \ | 324 V(ObjectHasOwnProperty, 2) \ |
323 V(ArrayIsArray, 2) \ | 325 V(ArrayIsArray, 2) \ |
324 V(StringFromCharCode, 2) \ | 326 V(StringFromCharCode, 2) \ |
325 V(StringPrototypeCharAt, 2) \ | 327 V(StringPrototypeCharAt, 2) \ |
326 V(StringPrototypeCharCodeAt, 2) \ | 328 V(StringPrototypeCharCodeAt, 2) \ |
327 V(TypedArrayPrototypeByteLength, 1) \ | 329 V(TypedArrayPrototypeByteLength, 1) \ |
328 V(TypedArrayPrototypeByteOffset, 1) \ | 330 V(TypedArrayPrototypeByteOffset, 1) \ |
329 V(TypedArrayPrototypeLength, 1) \ | 331 V(TypedArrayPrototypeLength, 1) \ |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 // ES6 section 20.2.2.7 Math.atanh ( x ) | 624 // ES6 section 20.2.2.7 Math.atanh ( x ) |
623 static void Generate_MathAtanh(CodeStubAssembler* assembler); | 625 static void Generate_MathAtanh(CodeStubAssembler* assembler); |
624 // ES6 section 20.2.2.10 Math.ceil ( x ) | 626 // ES6 section 20.2.2.10 Math.ceil ( x ) |
625 static void Generate_MathCeil(CodeStubAssembler* assembler); | 627 static void Generate_MathCeil(CodeStubAssembler* assembler); |
626 // ES6 section 20.2.2.9 Math.ceil ( x ) | 628 // ES6 section 20.2.2.9 Math.ceil ( x ) |
627 static void Generate_MathCbrt(CodeStubAssembler* assembler); | 629 static void Generate_MathCbrt(CodeStubAssembler* assembler); |
628 // ES6 section 20.2.2.15 Math.expm1 ( x ) | 630 // ES6 section 20.2.2.15 Math.expm1 ( x ) |
629 static void Generate_MathExpm1(CodeStubAssembler* assembler); | 631 static void Generate_MathExpm1(CodeStubAssembler* assembler); |
630 // ES6 section 20.2.2.11 Math.clz32 ( x ) | 632 // ES6 section 20.2.2.11 Math.clz32 ( x ) |
631 static void Generate_MathClz32(CodeStubAssembler* assembler); | 633 static void Generate_MathClz32(CodeStubAssembler* assembler); |
| 634 // ES6 section 20.2.2.12 Math.cos ( x ) |
| 635 static void Generate_MathCos(CodeStubAssembler* assembler); |
632 // ES6 section 20.2.2.14 Math.exp ( x ) | 636 // ES6 section 20.2.2.14 Math.exp ( x ) |
633 static void Generate_MathExp(CodeStubAssembler* assembler); | 637 static void Generate_MathExp(CodeStubAssembler* assembler); |
634 // ES6 section 20.2.2.16 Math.floor ( x ) | 638 // ES6 section 20.2.2.16 Math.floor ( x ) |
635 static void Generate_MathFloor(CodeStubAssembler* assembler); | 639 static void Generate_MathFloor(CodeStubAssembler* assembler); |
636 // ES6 section 20.2.2.20 Math.log ( x ) | 640 // ES6 section 20.2.2.20 Math.log ( x ) |
637 static void Generate_MathLog(CodeStubAssembler* assembler); | 641 static void Generate_MathLog(CodeStubAssembler* assembler); |
638 // ES6 section 20.2.2.21 Math.log ( x ) | 642 // ES6 section 20.2.2.21 Math.log ( x ) |
639 static void Generate_MathLog1p(CodeStubAssembler* assembler); | 643 static void Generate_MathLog1p(CodeStubAssembler* assembler); |
640 | 644 |
641 static void Generate_MathLog2(CodeStubAssembler* assembler); | 645 static void Generate_MathLog2(CodeStubAssembler* assembler); |
642 static void Generate_MathLog10(CodeStubAssembler* assembler); | 646 static void Generate_MathLog10(CodeStubAssembler* assembler); |
643 | 647 |
644 enum class MathMaxMinKind { kMax, kMin }; | 648 enum class MathMaxMinKind { kMax, kMin }; |
645 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 649 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
646 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) | 650 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) |
647 static void Generate_MathMax(MacroAssembler* masm) { | 651 static void Generate_MathMax(MacroAssembler* masm) { |
648 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); | 652 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); |
649 } | 653 } |
650 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) | 654 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) |
651 static void Generate_MathMin(MacroAssembler* masm) { | 655 static void Generate_MathMin(MacroAssembler* masm) { |
652 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); | 656 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); |
653 } | 657 } |
654 // ES6 section 20.2.2.28 Math.round ( x ) | 658 // ES6 section 20.2.2.28 Math.round ( x ) |
655 static void Generate_MathRound(CodeStubAssembler* assembler); | 659 static void Generate_MathRound(CodeStubAssembler* assembler); |
| 660 // ES6 section 20.2.2.20 Math.sin ( x ) |
| 661 static void Generate_MathSin(CodeStubAssembler* assembler); |
656 // ES6 section 20.2.2.32 Math.sqrt ( x ) | 662 // ES6 section 20.2.2.32 Math.sqrt ( x ) |
657 static void Generate_MathSqrt(CodeStubAssembler* assembler); | 663 static void Generate_MathSqrt(CodeStubAssembler* assembler); |
658 // ES6 section 20.2.2.35 Math.trunc ( x ) | 664 // ES6 section 20.2.2.35 Math.trunc ( x ) |
659 static void Generate_MathTrunc(CodeStubAssembler* assembler); | 665 static void Generate_MathTrunc(CodeStubAssembler* assembler); |
660 | 666 |
661 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case. | 667 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case. |
662 static void Generate_NumberConstructor(MacroAssembler* masm); | 668 static void Generate_NumberConstructor(MacroAssembler* masm); |
663 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case. | 669 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case. |
664 static void Generate_NumberConstructor_ConstructStub(MacroAssembler* masm); | 670 static void Generate_NumberConstructor_ConstructStub(MacroAssembler* masm); |
665 | 671 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
739 friend class BuiltinFunctionTable; | 745 friend class BuiltinFunctionTable; |
740 friend class Isolate; | 746 friend class Isolate; |
741 | 747 |
742 DISALLOW_COPY_AND_ASSIGN(Builtins); | 748 DISALLOW_COPY_AND_ASSIGN(Builtins); |
743 }; | 749 }; |
744 | 750 |
745 } // namespace internal | 751 } // namespace internal |
746 } // namespace v8 | 752 } // namespace v8 |
747 | 753 |
748 #endif // V8_BUILTINS_H_ | 754 #endif // V8_BUILTINS_H_ |
OLD | NEW |