| 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 |
| 11 // ------------------------------------------------------------------- | 11 // ------------------------------------------------------------------- |
| 12 // Imports | 12 // Imports |
| 13 | 13 |
| 14 var GlobalSIMD = global.SIMD; | 14 var GlobalSIMD = global.SIMD; |
| 15 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); |
| 15 | 16 |
| 16 macro SIMD_FLOAT_TYPES(FUNCTION) | 17 macro SIMD_FLOAT_TYPES(FUNCTION) |
| 17 FUNCTION(Float32x4, float32x4, 4) | 18 FUNCTION(Float32x4, float32x4, 4) |
| 18 endmacro | 19 endmacro |
| 19 | 20 |
| 20 macro SIMD_INT_TYPES(FUNCTION) | 21 macro SIMD_INT_TYPES(FUNCTION) |
| 21 FUNCTION(Int32x4, int32x4, 4) | 22 FUNCTION(Int32x4, int32x4, 4) |
| 22 FUNCTION(Int16x8, int16x8, 8) | 23 FUNCTION(Int16x8, int16x8, 8) |
| 23 FUNCTION(Int8x16, int8x16, 16) | 24 FUNCTION(Int8x16, int8x16, 16) |
| 24 endmacro | 25 endmacro |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 function Float32x4MinNumJS(a, b) { | 571 function Float32x4MinNumJS(a, b) { |
| 571 return %Float32x4MinNum(a, b); | 572 return %Float32x4MinNum(a, b); |
| 572 } | 573 } |
| 573 | 574 |
| 574 | 575 |
| 575 function Float32x4MaxNumJS(a, b) { | 576 function Float32x4MaxNumJS(a, b) { |
| 576 return %Float32x4MaxNum(a, b); | 577 return %Float32x4MaxNum(a, b); |
| 577 } | 578 } |
| 578 | 579 |
| 579 | 580 |
| 580 %AddNamedProperty(GlobalSIMD, symbolToStringTag, 'SIMD', READ_ONLY | DONT_ENUM); | 581 %AddNamedProperty(GlobalSIMD, toStringTagSymbol, 'SIMD', READ_ONLY | DONT_ENUM); |
| 581 | 582 |
| 582 macro SETUP_SIMD_TYPE(NAME, TYPE, LANES) | 583 macro SETUP_SIMD_TYPE(NAME, TYPE, LANES) |
| 583 %SetCode(GlobalNAME, NAMEConstructor); | 584 %SetCode(GlobalNAME, NAMEConstructor); |
| 584 %FunctionSetPrototype(GlobalNAME, {}); | 585 %FunctionSetPrototype(GlobalNAME, {}); |
| 585 %AddNamedProperty(GlobalNAME.prototype, 'constructor', GlobalNAME, | 586 %AddNamedProperty(GlobalNAME.prototype, 'constructor', GlobalNAME, |
| 586 DONT_ENUM); | 587 DONT_ENUM); |
| 587 %AddNamedProperty(GlobalNAME.prototype, symbolToStringTag, 'NAME', | 588 %AddNamedProperty(GlobalNAME.prototype, toStringTagSymbol, 'NAME', |
| 588 DONT_ENUM | READ_ONLY); | 589 DONT_ENUM | READ_ONLY); |
| 589 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ | 590 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ |
| 590 'toLocaleString', NAMEToLocaleString, | 591 'toLocaleString', NAMEToLocaleString, |
| 591 'toString', NAMEToString, | 592 'toString', NAMEToString, |
| 592 'valueOf', NAMEValueOf, | 593 'valueOf', NAMEValueOf, |
| 593 ]); | 594 ]); |
| 594 endmacro | 595 endmacro |
| 595 | 596 |
| 596 SIMD_ALL_TYPES(SETUP_SIMD_TYPE) | 597 SIMD_ALL_TYPES(SETUP_SIMD_TYPE) |
| 597 | 598 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 to.Bool32x4ToString = Bool32x4ToString; | 943 to.Bool32x4ToString = Bool32x4ToString; |
| 943 to.Int16x8ToString = Int16x8ToString; | 944 to.Int16x8ToString = Int16x8ToString; |
| 944 to.Uint16x8ToString = Uint16x8ToString; | 945 to.Uint16x8ToString = Uint16x8ToString; |
| 945 to.Bool16x8ToString = Bool16x8ToString; | 946 to.Bool16x8ToString = Bool16x8ToString; |
| 946 to.Int8x16ToString = Int8x16ToString; | 947 to.Int8x16ToString = Int8x16ToString; |
| 947 to.Uint8x16ToString = Uint8x16ToString; | 948 to.Uint8x16ToString = Uint8x16ToString; |
| 948 to.Bool8x16ToString = Bool8x16ToString; | 949 to.Bool8x16ToString = Bool8x16ToString; |
| 949 }); | 950 }); |
| 950 | 951 |
| 951 }) | 952 }) |
| OLD | NEW |