OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_RUNTIME_RUNTIME_H_ | 5 #ifndef V8_RUNTIME_RUNTIME_H_ |
6 #define V8_RUNTIME_RUNTIME_H_ | 6 #define V8_RUNTIME_RUNTIME_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/zone.h" | 10 #include "src/zone.h" |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 F(PushBlockContext, 2, 1) \ | 556 F(PushBlockContext, 2, 1) \ |
557 F(IsJSModule, 1, 1) \ | 557 F(IsJSModule, 1, 1) \ |
558 F(PushModuleContext, 2, 1) \ | 558 F(PushModuleContext, 2, 1) \ |
559 F(DeclareModules, 1, 1) \ | 559 F(DeclareModules, 1, 1) \ |
560 F(DeleteLookupSlot, 2, 1) \ | 560 F(DeleteLookupSlot, 2, 1) \ |
561 F(StoreLookupSlot, 4, 1) \ | 561 F(StoreLookupSlot, 4, 1) \ |
562 F(ArgumentsLength, 0, 1) \ | 562 F(ArgumentsLength, 0, 1) \ |
563 F(Arguments, 1, 1) | 563 F(Arguments, 1, 1) |
564 | 564 |
565 | 565 |
566 #define FOR_EACH_INTRINSIC_SIMD(F) \ | 566 #define FOR_EACH_INTRINSIC_SIMD(F) \ |
567 F(IsSimdValue, 1, 1) \ | 567 F(IsSimdValue, 1, 1) \ |
568 F(SimdToObject, 1, 1) \ | 568 F(SimdToObject, 1, 1) \ |
569 F(SimdEquals, 2, 1) \ | 569 F(SimdEquals, 2, 1) \ |
570 F(SimdSameValue, 2, 1) \ | 570 F(SimdSameValue, 2, 1) \ |
571 F(SimdSameValueZero, 2, 1) \ | 571 F(SimdSameValueZero, 2, 1) \ |
572 F(CreateFloat32x4, 4, 1) \ | 572 F(CreateFloat32x4, 4, 1) \ |
573 F(CreateInt32x4, 4, 1) \ | 573 F(CreateInt32x4, 4, 1) \ |
574 F(CreateBool32x4, 4, 1) \ | 574 F(CreateBool32x4, 4, 1) \ |
575 F(CreateInt16x8, 8, 1) \ | 575 F(CreateInt16x8, 8, 1) \ |
576 F(CreateBool16x8, 8, 1) \ | 576 F(CreateBool16x8, 8, 1) \ |
577 F(CreateInt8x16, 16, 1) \ | 577 F(CreateInt8x16, 16, 1) \ |
578 F(CreateBool8x16, 16, 1) \ | 578 F(CreateBool8x16, 16, 1) \ |
579 F(Float32x4Check, 1, 1) \ | 579 F(Float32x4Check, 1, 1) \ |
580 F(Int32x4Check, 1, 1) \ | 580 F(Float32x4ExtractLane, 2, 1) \ |
581 F(Bool32x4Check, 1, 1) \ | 581 F(Float32x4ReplaceLane, 3, 1) \ |
582 F(Int16x8Check, 1, 1) \ | 582 F(Float32x4Abs, 1, 1) \ |
583 F(Bool16x8Check, 1, 1) \ | 583 F(Float32x4Neg, 1, 1) \ |
584 F(Int8x16Check, 1, 1) \ | 584 F(Float32x4Sqrt, 1, 1) \ |
585 F(Bool8x16Check, 1, 1) \ | 585 F(Float32x4RecipApprox, 1, 1) \ |
586 F(Float32x4ExtractLane, 2, 1) \ | 586 F(Float32x4RecipSqrtApprox, 1, 1) \ |
587 F(Int32x4ExtractLane, 2, 1) \ | 587 F(Float32x4Add, 2, 1) \ |
588 F(Bool32x4ExtractLane, 2, 1) \ | 588 F(Float32x4Sub, 2, 1) \ |
589 F(Int16x8ExtractLane, 2, 1) \ | 589 F(Float32x4Mul, 2, 1) \ |
590 F(Int16x8UnsignedExtractLane, 2, 1) \ | 590 F(Float32x4Div, 2, 1) \ |
591 F(Bool16x8ExtractLane, 2, 1) \ | 591 F(Float32x4Min, 2, 1) \ |
592 F(Int8x16ExtractLane, 2, 1) \ | 592 F(Float32x4Max, 2, 1) \ |
593 F(Int8x16UnsignedExtractLane, 2, 1) \ | 593 F(Float32x4MinNum, 2, 1) \ |
594 F(Bool8x16ExtractLane, 2, 1) \ | 594 F(Float32x4MaxNum, 2, 1) \ |
595 F(Float32x4ReplaceLane, 3, 1) \ | 595 F(Float32x4LessThan, 2, 1) \ |
596 F(Int32x4ReplaceLane, 3, 1) \ | 596 F(Float32x4LessThanOrEqual, 2, 1) \ |
597 F(Bool32x4ReplaceLane, 3, 1) \ | 597 F(Float32x4GreaterThan, 2, 1) \ |
598 F(Int16x8ReplaceLane, 3, 1) \ | 598 F(Float32x4GreaterThanOrEqual, 2, 1) \ |
599 F(Bool16x8ReplaceLane, 3, 1) \ | 599 F(Float32x4Equal, 2, 1) \ |
600 F(Int8x16ReplaceLane, 3, 1) \ | 600 F(Float32x4NotEqual, 2, 1) \ |
601 F(Bool8x16ReplaceLane, 3, 1) | 601 F(Float32x4Select, 3, 1) \ |
| 602 F(Float32x4Swizzle, 5, 1) \ |
| 603 F(Float32x4Shuffle, 6, 1) \ |
| 604 F(Float32x4FromInt32x4, 1, 1) \ |
| 605 F(Float32x4FromInt32x4Bits, 1, 1) \ |
| 606 F(Float32x4FromInt16x8Bits, 1, 1) \ |
| 607 F(Float32x4FromInt8x16Bits, 1, 1) \ |
| 608 F(Int32x4Check, 1, 1) \ |
| 609 F(Int32x4ExtractLane, 2, 1) \ |
| 610 F(Int32x4ReplaceLane, 3, 1) \ |
| 611 F(Int32x4Neg, 1, 1) \ |
| 612 F(Int32x4Add, 2, 1) \ |
| 613 F(Int32x4Sub, 2, 1) \ |
| 614 F(Int32x4Mul, 2, 1) \ |
| 615 F(Int32x4Min, 2, 1) \ |
| 616 F(Int32x4Max, 2, 1) \ |
| 617 F(Int32x4And, 2, 1) \ |
| 618 F(Int32x4Or, 2, 1) \ |
| 619 F(Int32x4Xor, 2, 1) \ |
| 620 F(Int32x4Not, 1, 1) \ |
| 621 F(Int32x4ShiftLeftByScalar, 2, 1) \ |
| 622 F(Int32x4ShiftRightLogicalByScalar, 2, 1) \ |
| 623 F(Int32x4ShiftRightArithmeticByScalar, 2, 1) \ |
| 624 F(Int32x4LessThan, 2, 1) \ |
| 625 F(Int32x4LessThanOrEqual, 2, 1) \ |
| 626 F(Int32x4GreaterThan, 2, 1) \ |
| 627 F(Int32x4GreaterThanOrEqual, 2, 1) \ |
| 628 F(Int32x4Equal, 2, 1) \ |
| 629 F(Int32x4NotEqual, 2, 1) \ |
| 630 F(Int32x4Select, 3, 1) \ |
| 631 F(Int32x4Swizzle, 5, 1) \ |
| 632 F(Int32x4Shuffle, 6, 1) \ |
| 633 F(Int32x4FromFloat32x4, 1, 1) \ |
| 634 F(Int32x4FromFloat32x4Bits, 1, 1) \ |
| 635 F(Int32x4FromInt16x8Bits, 1, 1) \ |
| 636 F(Int32x4FromInt8x16Bits, 1, 1) \ |
| 637 F(Bool32x4Check, 1, 1) \ |
| 638 F(Bool32x4ExtractLane, 2, 1) \ |
| 639 F(Bool32x4ReplaceLane, 3, 1) \ |
| 640 F(Bool32x4And, 2, 1) \ |
| 641 F(Bool32x4Or, 2, 1) \ |
| 642 F(Bool32x4Xor, 2, 1) \ |
| 643 F(Bool32x4Not, 1, 1) \ |
| 644 F(Bool32x4AnyTrue, 1, 1) \ |
| 645 F(Bool32x4AllTrue, 1, 1) \ |
| 646 F(Bool32x4Equal, 2, 1) \ |
| 647 F(Bool32x4NotEqual, 2, 1) \ |
| 648 F(Bool32x4Swizzle, 5, 1) \ |
| 649 F(Bool32x4Shuffle, 6, 1) \ |
| 650 F(Int16x8Check, 1, 1) \ |
| 651 F(Int16x8ExtractLane, 2, 1) \ |
| 652 F(Int16x8UnsignedExtractLane, 2, 1) \ |
| 653 F(Int16x8ReplaceLane, 3, 1) \ |
| 654 F(Int16x8Neg, 1, 1) \ |
| 655 F(Int16x8Add, 2, 1) \ |
| 656 F(Int16x8AddSaturate, 2, 1) \ |
| 657 F(Int16x8Sub, 2, 1) \ |
| 658 F(Int16x8SubSaturate, 2, 1) \ |
| 659 F(Int16x8Mul, 2, 1) \ |
| 660 F(Int16x8Min, 2, 1) \ |
| 661 F(Int16x8Max, 2, 1) \ |
| 662 F(Int16x8And, 2, 1) \ |
| 663 F(Int16x8Or, 2, 1) \ |
| 664 F(Int16x8Xor, 2, 1) \ |
| 665 F(Int16x8Not, 1, 1) \ |
| 666 F(Int16x8ShiftLeftByScalar, 2, 1) \ |
| 667 F(Int16x8ShiftRightLogicalByScalar, 2, 1) \ |
| 668 F(Int16x8ShiftRightArithmeticByScalar, 2, 1) \ |
| 669 F(Int16x8LessThan, 2, 1) \ |
| 670 F(Int16x8LessThanOrEqual, 2, 1) \ |
| 671 F(Int16x8GreaterThan, 2, 1) \ |
| 672 F(Int16x8GreaterThanOrEqual, 2, 1) \ |
| 673 F(Int16x8Equal, 2, 1) \ |
| 674 F(Int16x8NotEqual, 2, 1) \ |
| 675 F(Int16x8Select, 3, 1) \ |
| 676 F(Int16x8Swizzle, 9, 1) \ |
| 677 F(Int16x8Shuffle, 10, 1) \ |
| 678 F(Int16x8FromFloat32x4Bits, 1, 1) \ |
| 679 F(Int16x8FromInt32x4Bits, 1, 1) \ |
| 680 F(Int16x8FromInt8x16Bits, 1, 1) \ |
| 681 F(Bool16x8Check, 1, 1) \ |
| 682 F(Bool16x8ExtractLane, 2, 1) \ |
| 683 F(Bool16x8ReplaceLane, 3, 1) \ |
| 684 F(Bool16x8And, 2, 1) \ |
| 685 F(Bool16x8Or, 2, 1) \ |
| 686 F(Bool16x8Xor, 2, 1) \ |
| 687 F(Bool16x8Not, 1, 1) \ |
| 688 F(Bool16x8AnyTrue, 1, 1) \ |
| 689 F(Bool16x8AllTrue, 1, 1) \ |
| 690 F(Bool16x8Equal, 2, 1) \ |
| 691 F(Bool16x8NotEqual, 2, 1) \ |
| 692 F(Bool16x8Swizzle, 9, 1) \ |
| 693 F(Bool16x8Shuffle, 10, 1) \ |
| 694 F(Int8x16Check, 1, 1) \ |
| 695 F(Int8x16ExtractLane, 2, 1) \ |
| 696 F(Int8x16UnsignedExtractLane, 2, 1) \ |
| 697 F(Int8x16ReplaceLane, 3, 1) \ |
| 698 F(Int8x16Neg, 1, 1) \ |
| 699 F(Int8x16Add, 2, 1) \ |
| 700 F(Int8x16AddSaturate, 2, 1) \ |
| 701 F(Int8x16Sub, 2, 1) \ |
| 702 F(Int8x16SubSaturate, 2, 1) \ |
| 703 F(Int8x16Mul, 2, 1) \ |
| 704 F(Int8x16Min, 2, 1) \ |
| 705 F(Int8x16Max, 2, 1) \ |
| 706 F(Int8x16And, 2, 1) \ |
| 707 F(Int8x16Or, 2, 1) \ |
| 708 F(Int8x16Xor, 2, 1) \ |
| 709 F(Int8x16Not, 1, 1) \ |
| 710 F(Int8x16ShiftLeftByScalar, 2, 1) \ |
| 711 F(Int8x16ShiftRightLogicalByScalar, 2, 1) \ |
| 712 F(Int8x16ShiftRightArithmeticByScalar, 2, 1) \ |
| 713 F(Int8x16LessThan, 2, 1) \ |
| 714 F(Int8x16LessThanOrEqual, 2, 1) \ |
| 715 F(Int8x16GreaterThan, 2, 1) \ |
| 716 F(Int8x16GreaterThanOrEqual, 2, 1) \ |
| 717 F(Int8x16Equal, 2, 1) \ |
| 718 F(Int8x16NotEqual, 2, 1) \ |
| 719 F(Int8x16Select, 3, 1) \ |
| 720 F(Int8x16Swizzle, 17, 1) \ |
| 721 F(Int8x16Shuffle, 18, 1) \ |
| 722 F(Int8x16FromFloat32x4Bits, 1, 1) \ |
| 723 F(Int8x16FromInt32x4Bits, 1, 1) \ |
| 724 F(Int8x16FromInt16x8Bits, 1, 1) \ |
| 725 F(Bool8x16Check, 1, 1) \ |
| 726 F(Bool8x16ExtractLane, 2, 1) \ |
| 727 F(Bool8x16ReplaceLane, 3, 1) \ |
| 728 F(Bool8x16And, 2, 1) \ |
| 729 F(Bool8x16Or, 2, 1) \ |
| 730 F(Bool8x16Xor, 2, 1) \ |
| 731 F(Bool8x16Not, 1, 1) \ |
| 732 F(Bool8x16AnyTrue, 1, 1) \ |
| 733 F(Bool8x16AllTrue, 1, 1) \ |
| 734 F(Bool8x16Equal, 2, 1) \ |
| 735 F(Bool8x16NotEqual, 2, 1) \ |
| 736 F(Bool8x16Swizzle, 17, 1) \ |
| 737 F(Bool8x16Shuffle, 18, 1) |
602 | 738 |
603 | 739 |
604 #define FOR_EACH_INTRINSIC_STRINGS(F) \ | 740 #define FOR_EACH_INTRINSIC_STRINGS(F) \ |
605 F(StringReplaceOneCharWithString, 3, 1) \ | 741 F(StringReplaceOneCharWithString, 3, 1) \ |
606 F(StringIndexOf, 3, 1) \ | 742 F(StringIndexOf, 3, 1) \ |
607 F(StringLastIndexOf, 3, 1) \ | 743 F(StringLastIndexOf, 3, 1) \ |
608 F(StringLocaleCompare, 2, 1) \ | 744 F(StringLocaleCompare, 2, 1) \ |
609 F(SubString, 3, 1) \ | 745 F(SubString, 3, 1) \ |
610 F(StringAdd, 2, 1) \ | 746 F(StringAdd, 2, 1) \ |
611 F(InternalizeString, 1, 1) \ | 747 F(InternalizeString, 1, 1) \ |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 inline bool Runtime::AtomicIsLockFree(uint32_t size) { | 1138 inline bool Runtime::AtomicIsLockFree(uint32_t size) { |
1003 return size == 1 || size == 2 || size == 4; | 1139 return size == 1 || size == 2 || size == 4; |
1004 } | 1140 } |
1005 | 1141 |
1006 #endif | 1142 #endif |
1007 | 1143 |
1008 } // namespace internal | 1144 } // namespace internal |
1009 } // namespace v8 | 1145 } // namespace v8 |
1010 | 1146 |
1011 #endif // V8_RUNTIME_RUNTIME_H_ | 1147 #endif // V8_RUNTIME_RUNTIME_H_ |
OLD | NEW |