OLD | NEW |
1 | 1 |
2 // Copyright 2011 the V8 project authors. All rights reserved. | 2 // Copyright 2011 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #ifndef V8_BUILTINS_H_ | 6 #ifndef V8_BUILTINS_H_ |
7 #define V8_BUILTINS_H_ | 7 #define V8_BUILTINS_H_ |
8 | 8 |
9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 V(GeneratorPrototypeReturn, 2) \ | 307 V(GeneratorPrototypeReturn, 2) \ |
308 V(GeneratorPrototypeThrow, 2) \ | 308 V(GeneratorPrototypeThrow, 2) \ |
309 V(MathAtan, 2) \ | 309 V(MathAtan, 2) \ |
310 V(MathAtan2, 3) \ | 310 V(MathAtan2, 3) \ |
311 V(MathAtanh, 2) \ | 311 V(MathAtanh, 2) \ |
312 V(MathCeil, 2) \ | 312 V(MathCeil, 2) \ |
313 V(MathCbrt, 2) \ | 313 V(MathCbrt, 2) \ |
314 V(MathExpm1, 2) \ | 314 V(MathExpm1, 2) \ |
315 V(MathClz32, 2) \ | 315 V(MathClz32, 2) \ |
316 V(MathCos, 2) \ | 316 V(MathCos, 2) \ |
| 317 V(MathCosh, 2) \ |
317 V(MathExp, 2) \ | 318 V(MathExp, 2) \ |
318 V(MathFloor, 2) \ | 319 V(MathFloor, 2) \ |
319 V(MathLog, 2) \ | 320 V(MathLog, 2) \ |
320 V(MathLog1p, 2) \ | 321 V(MathLog1p, 2) \ |
321 V(MathLog10, 2) \ | 322 V(MathLog10, 2) \ |
322 V(MathLog2, 2) \ | 323 V(MathLog2, 2) \ |
323 V(MathRound, 2) \ | 324 V(MathRound, 2) \ |
324 V(MathPow, 3) \ | 325 V(MathPow, 3) \ |
325 V(MathSin, 2) \ | 326 V(MathSin, 2) \ |
| 327 V(MathSinh, 2) \ |
326 V(MathTan, 2) \ | 328 V(MathTan, 2) \ |
| 329 V(MathTanh, 2) \ |
327 V(MathSqrt, 2) \ | 330 V(MathSqrt, 2) \ |
328 V(MathTrunc, 2) \ | 331 V(MathTrunc, 2) \ |
329 V(ObjectHasOwnProperty, 2) \ | 332 V(ObjectHasOwnProperty, 2) \ |
330 V(ArrayIsArray, 2) \ | 333 V(ArrayIsArray, 2) \ |
331 V(StringFromCharCode, 2) \ | 334 V(StringFromCharCode, 2) \ |
332 V(StringPrototypeCharAt, 2) \ | 335 V(StringPrototypeCharAt, 2) \ |
333 V(StringPrototypeCharCodeAt, 2) \ | 336 V(StringPrototypeCharCodeAt, 2) \ |
334 V(TypedArrayPrototypeByteLength, 1) \ | 337 V(TypedArrayPrototypeByteLength, 1) \ |
335 V(TypedArrayPrototypeByteOffset, 1) \ | 338 V(TypedArrayPrototypeByteOffset, 1) \ |
336 V(TypedArrayPrototypeLength, 1) \ | 339 V(TypedArrayPrototypeLength, 1) \ |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 // ES6 section 20.2.2.10 Math.ceil ( x ) | 640 // ES6 section 20.2.2.10 Math.ceil ( x ) |
638 static void Generate_MathCeil(CodeStubAssembler* assembler); | 641 static void Generate_MathCeil(CodeStubAssembler* assembler); |
639 // ES6 section 20.2.2.9 Math.ceil ( x ) | 642 // ES6 section 20.2.2.9 Math.ceil ( x ) |
640 static void Generate_MathCbrt(CodeStubAssembler* assembler); | 643 static void Generate_MathCbrt(CodeStubAssembler* assembler); |
641 // ES6 section 20.2.2.15 Math.expm1 ( x ) | 644 // ES6 section 20.2.2.15 Math.expm1 ( x ) |
642 static void Generate_MathExpm1(CodeStubAssembler* assembler); | 645 static void Generate_MathExpm1(CodeStubAssembler* assembler); |
643 // ES6 section 20.2.2.11 Math.clz32 ( x ) | 646 // ES6 section 20.2.2.11 Math.clz32 ( x ) |
644 static void Generate_MathClz32(CodeStubAssembler* assembler); | 647 static void Generate_MathClz32(CodeStubAssembler* assembler); |
645 // ES6 section 20.2.2.12 Math.cos ( x ) | 648 // ES6 section 20.2.2.12 Math.cos ( x ) |
646 static void Generate_MathCos(CodeStubAssembler* assembler); | 649 static void Generate_MathCos(CodeStubAssembler* assembler); |
| 650 // ES6 section 20.2.2.13 Math.cosh ( x ) |
| 651 static void Generate_MathCosh(CodeStubAssembler* assembler); |
647 // ES6 section 20.2.2.14 Math.exp ( x ) | 652 // ES6 section 20.2.2.14 Math.exp ( x ) |
648 static void Generate_MathExp(CodeStubAssembler* assembler); | 653 static void Generate_MathExp(CodeStubAssembler* assembler); |
649 // ES6 section 20.2.2.16 Math.floor ( x ) | 654 // ES6 section 20.2.2.16 Math.floor ( x ) |
650 static void Generate_MathFloor(CodeStubAssembler* assembler); | 655 static void Generate_MathFloor(CodeStubAssembler* assembler); |
651 // ES6 section 20.2.2.20 Math.log ( x ) | 656 // ES6 section 20.2.2.20 Math.log ( x ) |
652 static void Generate_MathLog(CodeStubAssembler* assembler); | 657 static void Generate_MathLog(CodeStubAssembler* assembler); |
653 // ES6 section 20.2.2.21 Math.log ( x ) | 658 // ES6 section 20.2.2.21 Math.log ( x ) |
654 static void Generate_MathLog1p(CodeStubAssembler* assembler); | 659 static void Generate_MathLog1p(CodeStubAssembler* assembler); |
655 | 660 |
656 static void Generate_MathLog2(CodeStubAssembler* assembler); | 661 static void Generate_MathLog2(CodeStubAssembler* assembler); |
657 static void Generate_MathLog10(CodeStubAssembler* assembler); | 662 static void Generate_MathLog10(CodeStubAssembler* assembler); |
658 | 663 |
659 enum class MathMaxMinKind { kMax, kMin }; | 664 enum class MathMaxMinKind { kMax, kMin }; |
660 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); | 665 static void Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind); |
661 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) | 666 // ES6 section 20.2.2.24 Math.max ( value1, value2 , ...values ) |
662 static void Generate_MathMax(MacroAssembler* masm) { | 667 static void Generate_MathMax(MacroAssembler* masm) { |
663 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); | 668 Generate_MathMaxMin(masm, MathMaxMinKind::kMax); |
664 } | 669 } |
665 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) | 670 // ES6 section 20.2.2.25 Math.min ( value1, value2 , ...values ) |
666 static void Generate_MathMin(MacroAssembler* masm) { | 671 static void Generate_MathMin(MacroAssembler* masm) { |
667 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); | 672 Generate_MathMaxMin(masm, MathMaxMinKind::kMin); |
668 } | 673 } |
669 // ES6 section 20.2.2.26 Math.pow ( x, y ) | 674 // ES6 section 20.2.2.26 Math.pow ( x, y ) |
670 static void Generate_MathPow(CodeStubAssembler* assembler); | 675 static void Generate_MathPow(CodeStubAssembler* assembler); |
671 // ES6 section 20.2.2.28 Math.round ( x ) | 676 // ES6 section 20.2.2.28 Math.round ( x ) |
672 static void Generate_MathRound(CodeStubAssembler* assembler); | 677 static void Generate_MathRound(CodeStubAssembler* assembler); |
673 // ES6 section 20.2.2.20 Math.sin ( x ) | 678 // ES6 section 20.2.2.20 Math.sin ( x ) |
674 static void Generate_MathSin(CodeStubAssembler* assembler); | 679 static void Generate_MathSin(CodeStubAssembler* assembler); |
| 680 // ES6 section 20.2.2.21 Math.sinh ( x ) |
| 681 static void Generate_MathSinh(CodeStubAssembler* assembler); |
675 // ES6 section 20.2.2.32 Math.sqrt ( x ) | 682 // ES6 section 20.2.2.32 Math.sqrt ( x ) |
676 static void Generate_MathSqrt(CodeStubAssembler* assembler); | 683 static void Generate_MathSqrt(CodeStubAssembler* assembler); |
677 // ES6 section 20.2.2.33 Math.sin ( x ) | 684 // ES6 section 20.2.2.33 Math.tan ( x ) |
678 static void Generate_MathTan(CodeStubAssembler* assembler); | 685 static void Generate_MathTan(CodeStubAssembler* assembler); |
| 686 // ES6 section 20.2.2.34 Math.tanh ( x ) |
| 687 static void Generate_MathTanh(CodeStubAssembler* assembler); |
679 // ES6 section 20.2.2.35 Math.trunc ( x ) | 688 // ES6 section 20.2.2.35 Math.trunc ( x ) |
680 static void Generate_MathTrunc(CodeStubAssembler* assembler); | 689 static void Generate_MathTrunc(CodeStubAssembler* assembler); |
681 | 690 |
682 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case. | 691 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Call]] case. |
683 static void Generate_NumberConstructor(MacroAssembler* masm); | 692 static void Generate_NumberConstructor(MacroAssembler* masm); |
684 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case. | 693 // ES6 section 20.1.1.1 Number ( [ value ] ) for the [[Construct]] case. |
685 static void Generate_NumberConstructor_ConstructStub(MacroAssembler* masm); | 694 static void Generate_NumberConstructor_ConstructStub(MacroAssembler* masm); |
686 | 695 |
687 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) | 696 // ES6 section 19.2.3.6 Function.prototype [ @@hasInstance ] ( V ) |
688 static void Generate_FunctionPrototypeHasInstance( | 697 static void Generate_FunctionPrototypeHasInstance( |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 friend class BuiltinFunctionTable; | 769 friend class BuiltinFunctionTable; |
761 friend class Isolate; | 770 friend class Isolate; |
762 | 771 |
763 DISALLOW_COPY_AND_ASSIGN(Builtins); | 772 DISALLOW_COPY_AND_ASSIGN(Builtins); |
764 }; | 773 }; |
765 | 774 |
766 } // namespace internal | 775 } // namespace internal |
767 } // namespace v8 | 776 } // namespace v8 |
768 | 777 |
769 #endif // V8_BUILTINS_H_ | 778 #endif // V8_BUILTINS_H_ |
OLD | NEW |