| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 (function(global, utils) { | 5 (function(global, utils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 return %_ValueOf(this); | 90 return %_ValueOf(this); |
| 91 } | 91 } |
| 92 | 92 |
| 93 function NAMEExtractLaneJS(instance, lane) { | 93 function NAMEExtractLaneJS(instance, lane) { |
| 94 return %NAMEExtractLane(instance, lane); | 94 return %NAMEExtractLane(instance, lane); |
| 95 } | 95 } |
| 96 endmacro | 96 endmacro |
| 97 | 97 |
| 98 SIMD_ALL_TYPES(DECLARE_COMMON_FUNCTIONS) | 98 SIMD_ALL_TYPES(DECLARE_COMMON_FUNCTIONS) |
| 99 | 99 |
| 100 macro DECLARE_INT_FUNCTIONS(NAME, TYPE, LANES) | 100 macro DECLARE_SHIFT_FUNCTIONS(NAME, TYPE, LANES) |
| 101 function NAMEShiftLeftByScalarJS(instance, shift) { | 101 function NAMEShiftLeftByScalarJS(instance, shift) { |
| 102 return %NAMEShiftLeftByScalar(instance, shift); | 102 return %NAMEShiftLeftByScalar(instance, shift); |
| 103 } | 103 } |
| 104 | 104 |
| 105 function NAMEShiftRightByScalarJS(instance, shift) { | 105 function NAMEShiftRightByScalarJS(instance, shift) { |
| 106 return %NAMEShiftRightByScalar(instance, shift); | 106 return %NAMEShiftRightByScalar(instance, shift); |
| 107 } | 107 } |
| 108 endmacro | 108 endmacro |
| 109 | 109 |
| 110 SIMD_INT_TYPES(DECLARE_INT_FUNCTIONS) | 110 SIMD_INT_TYPES(DECLARE_SHIFT_FUNCTIONS) |
| 111 | 111 SIMD_UINT_TYPES(DECLARE_SHIFT_FUNCTIONS) |
| 112 macro DECLARE_UINT_FUNCTIONS(NAME, TYPE, LANES) | |
| 113 function NAMEShiftLeftByScalarJS(instance, shift) { | |
| 114 return %NAMEShiftLeftByScalar(instance, shift); | |
| 115 } | |
| 116 | |
| 117 function NAMEShiftRightByScalarJS(instance, shift) { | |
| 118 return %NAMEShiftRightByScalar(instance, shift); | |
| 119 } | |
| 120 | |
| 121 function NAMEHorizontalSumJS(instance) { | |
| 122 return %NAMEHorizontalSum(instance); | |
| 123 } | |
| 124 endmacro | |
| 125 | |
| 126 SIMD_UINT_TYPES(DECLARE_UINT_FUNCTIONS) | |
| 127 | 112 |
| 128 macro SIMD_SMALL_INT_TYPES(FUNCTION) | 113 macro SIMD_SMALL_INT_TYPES(FUNCTION) |
| 129 FUNCTION(Int16x8) | 114 FUNCTION(Int16x8) |
| 130 FUNCTION(Int8x16) | 115 FUNCTION(Int8x16) |
| 131 FUNCTION(Uint8x16) | 116 FUNCTION(Uint8x16) |
| 132 FUNCTION(Uint16x8) | 117 FUNCTION(Uint16x8) |
| 133 endmacro | 118 endmacro |
| 134 | 119 |
| 135 macro DECLARE_SMALL_INT_FUNCTIONS(NAME) | 120 macro DECLARE_SMALL_INT_FUNCTIONS(NAME) |
| 136 function NAMEAddSaturateJS(a, b) { | 121 function NAMEAddSaturateJS(a, b) { |
| 137 return %NAMEAddSaturate(a, b); | 122 return %NAMEAddSaturate(a, b); |
| 138 } | 123 } |
| 139 | 124 |
| 140 function NAMESubSaturateJS(a, b) { | 125 function NAMESubSaturateJS(a, b) { |
| 141 return %NAMESubSaturate(a, b); | 126 return %NAMESubSaturate(a, b); |
| 142 } | 127 } |
| 143 endmacro | 128 endmacro |
| 144 | 129 |
| 145 SIMD_SMALL_INT_TYPES(DECLARE_SMALL_INT_FUNCTIONS) | 130 SIMD_SMALL_INT_TYPES(DECLARE_SMALL_INT_FUNCTIONS) |
| 146 | 131 |
| 147 macro SIMD_SMALL_UINT_TYPES(FUNCTION) | |
| 148 FUNCTION(Uint8x16) | |
| 149 FUNCTION(Uint16x8) | |
| 150 endmacro | |
| 151 | |
| 152 macro DECLARE_SMALL_UINT_FUNCTIONS(NAME) | |
| 153 function NAMEAbsoluteDifferenceJS(a, b) { | |
| 154 return %NAMEAbsoluteDifference(a, b); | |
| 155 } | |
| 156 | |
| 157 function NAMEWidenedAbsoluteDifferenceJS(a, b) { | |
| 158 return %NAMEWidenedAbsoluteDifference(a, b); | |
| 159 } | |
| 160 endmacro | |
| 161 | |
| 162 SIMD_SMALL_UINT_TYPES(DECLARE_SMALL_UINT_FUNCTIONS) | |
| 163 | |
| 164 macro DECLARE_SIGNED_FUNCTIONS(NAME, TYPE, LANES) | 132 macro DECLARE_SIGNED_FUNCTIONS(NAME, TYPE, LANES) |
| 165 function NAMENegJS(a) { | 133 function NAMENegJS(a) { |
| 166 return %NAMENeg(a); | 134 return %NAMENeg(a); |
| 167 } | 135 } |
| 168 endmacro | 136 endmacro |
| 169 | 137 |
| 170 SIMD_FLOAT_TYPES(DECLARE_SIGNED_FUNCTIONS) | 138 SIMD_FLOAT_TYPES(DECLARE_SIGNED_FUNCTIONS) |
| 171 SIMD_INT_TYPES(DECLARE_SIGNED_FUNCTIONS) | 139 SIMD_INT_TYPES(DECLARE_SIGNED_FUNCTIONS) |
| 172 | 140 |
| 173 macro DECLARE_BOOL_FUNCTIONS(NAME, TYPE, LANES) | 141 macro DECLARE_BOOL_FUNCTIONS(NAME, TYPE, LANES) |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 'sub', Uint32x4SubJS, | 664 'sub', Uint32x4SubJS, |
| 697 'mul', Uint32x4MulJS, | 665 'mul', Uint32x4MulJS, |
| 698 'min', Uint32x4MinJS, | 666 'min', Uint32x4MinJS, |
| 699 'max', Uint32x4MaxJS, | 667 'max', Uint32x4MaxJS, |
| 700 'and', Uint32x4AndJS, | 668 'and', Uint32x4AndJS, |
| 701 'or', Uint32x4OrJS, | 669 'or', Uint32x4OrJS, |
| 702 'xor', Uint32x4XorJS, | 670 'xor', Uint32x4XorJS, |
| 703 'not', Uint32x4NotJS, | 671 'not', Uint32x4NotJS, |
| 704 'shiftLeftByScalar', Uint32x4ShiftLeftByScalarJS, | 672 'shiftLeftByScalar', Uint32x4ShiftLeftByScalarJS, |
| 705 'shiftRightByScalar', Uint32x4ShiftRightByScalarJS, | 673 'shiftRightByScalar', Uint32x4ShiftRightByScalarJS, |
| 706 'horizontalSum', Uint32x4HorizontalSumJS, | |
| 707 'lessThan', Uint32x4LessThanJS, | 674 'lessThan', Uint32x4LessThanJS, |
| 708 'lessThanOrEqual', Uint32x4LessThanOrEqualJS, | 675 'lessThanOrEqual', Uint32x4LessThanOrEqualJS, |
| 709 'greaterThan', Uint32x4GreaterThanJS, | 676 'greaterThan', Uint32x4GreaterThanJS, |
| 710 'greaterThanOrEqual', Uint32x4GreaterThanOrEqualJS, | 677 'greaterThanOrEqual', Uint32x4GreaterThanOrEqualJS, |
| 711 'equal', Uint32x4EqualJS, | 678 'equal', Uint32x4EqualJS, |
| 712 'notEqual', Uint32x4NotEqualJS, | 679 'notEqual', Uint32x4NotEqualJS, |
| 713 'select', Uint32x4SelectJS, | 680 'select', Uint32x4SelectJS, |
| 714 'swizzle', Uint32x4SwizzleJS, | 681 'swizzle', Uint32x4SwizzleJS, |
| 715 'shuffle', Uint32x4ShuffleJS, | 682 'shuffle', Uint32x4ShuffleJS, |
| 716 'fromFloat32x4', Uint32x4FromFloat32x4JS, | 683 'fromFloat32x4', Uint32x4FromFloat32x4JS, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 'subSaturate', Uint16x8SubSaturateJS, | 763 'subSaturate', Uint16x8SubSaturateJS, |
| 797 'mul', Uint16x8MulJS, | 764 'mul', Uint16x8MulJS, |
| 798 'min', Uint16x8MinJS, | 765 'min', Uint16x8MinJS, |
| 799 'max', Uint16x8MaxJS, | 766 'max', Uint16x8MaxJS, |
| 800 'and', Uint16x8AndJS, | 767 'and', Uint16x8AndJS, |
| 801 'or', Uint16x8OrJS, | 768 'or', Uint16x8OrJS, |
| 802 'xor', Uint16x8XorJS, | 769 'xor', Uint16x8XorJS, |
| 803 'not', Uint16x8NotJS, | 770 'not', Uint16x8NotJS, |
| 804 'shiftLeftByScalar', Uint16x8ShiftLeftByScalarJS, | 771 'shiftLeftByScalar', Uint16x8ShiftLeftByScalarJS, |
| 805 'shiftRightByScalar', Uint16x8ShiftRightByScalarJS, | 772 'shiftRightByScalar', Uint16x8ShiftRightByScalarJS, |
| 806 'horizontalSum', Uint16x8HorizontalSumJS, | |
| 807 'absoluteDifference', Uint16x8AbsoluteDifferenceJS, | |
| 808 'widenedAbsoluteDifference', Uint16x8WidenedAbsoluteDifferenceJS, | |
| 809 'lessThan', Uint16x8LessThanJS, | 773 'lessThan', Uint16x8LessThanJS, |
| 810 'lessThanOrEqual', Uint16x8LessThanOrEqualJS, | 774 'lessThanOrEqual', Uint16x8LessThanOrEqualJS, |
| 811 'greaterThan', Uint16x8GreaterThanJS, | 775 'greaterThan', Uint16x8GreaterThanJS, |
| 812 'greaterThanOrEqual', Uint16x8GreaterThanOrEqualJS, | 776 'greaterThanOrEqual', Uint16x8GreaterThanOrEqualJS, |
| 813 'equal', Uint16x8EqualJS, | 777 'equal', Uint16x8EqualJS, |
| 814 'notEqual', Uint16x8NotEqualJS, | 778 'notEqual', Uint16x8NotEqualJS, |
| 815 'select', Uint16x8SelectJS, | 779 'select', Uint16x8SelectJS, |
| 816 'swizzle', Uint16x8SwizzleJS, | 780 'swizzle', Uint16x8SwizzleJS, |
| 817 'shuffle', Uint16x8ShuffleJS, | 781 'shuffle', Uint16x8ShuffleJS, |
| 818 'fromInt16x8', Uint16x8FromInt16x8JS, | 782 'fromInt16x8', Uint16x8FromInt16x8JS, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 'subSaturate', Uint8x16SubSaturateJS, | 855 'subSaturate', Uint8x16SubSaturateJS, |
| 892 'mul', Uint8x16MulJS, | 856 'mul', Uint8x16MulJS, |
| 893 'min', Uint8x16MinJS, | 857 'min', Uint8x16MinJS, |
| 894 'max', Uint8x16MaxJS, | 858 'max', Uint8x16MaxJS, |
| 895 'and', Uint8x16AndJS, | 859 'and', Uint8x16AndJS, |
| 896 'or', Uint8x16OrJS, | 860 'or', Uint8x16OrJS, |
| 897 'xor', Uint8x16XorJS, | 861 'xor', Uint8x16XorJS, |
| 898 'not', Uint8x16NotJS, | 862 'not', Uint8x16NotJS, |
| 899 'shiftLeftByScalar', Uint8x16ShiftLeftByScalarJS, | 863 'shiftLeftByScalar', Uint8x16ShiftLeftByScalarJS, |
| 900 'shiftRightByScalar', Uint8x16ShiftRightByScalarJS, | 864 'shiftRightByScalar', Uint8x16ShiftRightByScalarJS, |
| 901 'horizontalSum', Uint8x16HorizontalSumJS, | |
| 902 'absoluteDifference', Uint8x16AbsoluteDifferenceJS, | |
| 903 'widenedAbsoluteDifference', Uint8x16WidenedAbsoluteDifferenceJS, | |
| 904 'lessThan', Uint8x16LessThanJS, | 865 'lessThan', Uint8x16LessThanJS, |
| 905 'lessThanOrEqual', Uint8x16LessThanOrEqualJS, | 866 'lessThanOrEqual', Uint8x16LessThanOrEqualJS, |
| 906 'greaterThan', Uint8x16GreaterThanJS, | 867 'greaterThan', Uint8x16GreaterThanJS, |
| 907 'greaterThanOrEqual', Uint8x16GreaterThanOrEqualJS, | 868 'greaterThanOrEqual', Uint8x16GreaterThanOrEqualJS, |
| 908 'equal', Uint8x16EqualJS, | 869 'equal', Uint8x16EqualJS, |
| 909 'notEqual', Uint8x16NotEqualJS, | 870 'notEqual', Uint8x16NotEqualJS, |
| 910 'select', Uint8x16SelectJS, | 871 'select', Uint8x16SelectJS, |
| 911 'swizzle', Uint8x16SwizzleJS, | 872 'swizzle', Uint8x16SwizzleJS, |
| 912 'shuffle', Uint8x16ShuffleJS, | 873 'shuffle', Uint8x16ShuffleJS, |
| 913 'fromInt8x16', Uint8x16FromInt8x16JS, | 874 'fromInt8x16', Uint8x16FromInt8x16JS, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 943 to.Bool32x4ToString = Bool32x4ToString; | 904 to.Bool32x4ToString = Bool32x4ToString; |
| 944 to.Int16x8ToString = Int16x8ToString; | 905 to.Int16x8ToString = Int16x8ToString; |
| 945 to.Uint16x8ToString = Uint16x8ToString; | 906 to.Uint16x8ToString = Uint16x8ToString; |
| 946 to.Bool16x8ToString = Bool16x8ToString; | 907 to.Bool16x8ToString = Bool16x8ToString; |
| 947 to.Int8x16ToString = Int8x16ToString; | 908 to.Int8x16ToString = Int8x16ToString; |
| 948 to.Uint8x16ToString = Uint8x16ToString; | 909 to.Uint8x16ToString = Uint8x16ToString; |
| 949 to.Bool8x16ToString = Bool8x16ToString; | 910 to.Bool8x16ToString = Bool8x16ToString; |
| 950 }); | 911 }); |
| 951 | 912 |
| 952 }) | 913 }) |
| OLD | NEW |