OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 19 matching lines...) Expand all Loading... |
30 endmacro | 30 endmacro |
31 | 31 |
32 macro DECLARE_GLOBALS(INDEX, NAME, SIZE) | 32 macro DECLARE_GLOBALS(INDEX, NAME, SIZE) |
33 var GlobalNAME = global.NAME; | 33 var GlobalNAME = global.NAME; |
34 endmacro | 34 endmacro |
35 | 35 |
36 TYPED_ARRAYS(DECLARE_GLOBALS) | 36 TYPED_ARRAYS(DECLARE_GLOBALS) |
37 | 37 |
38 var MathMax; | 38 var MathMax; |
39 var MathMin; | 39 var MathMin; |
| 40 var ToNumber; |
40 | 41 |
41 utils.Import(function(from) { | 42 utils.Import(function(from) { |
42 MathMax = from.MathMax; | 43 MathMax = from.MathMax; |
43 MathMin = from.MathMin; | 44 MathMin = from.MathMin; |
| 45 ToNumber = from.ToNumber; |
44 }); | 46 }); |
45 | 47 |
46 var InternalArray = utils.InternalArray; | 48 var InternalArray = utils.InternalArray; |
47 | 49 |
48 // --------------- Typed Arrays --------------------- | 50 // --------------- Typed Arrays --------------------- |
49 | 51 |
50 macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE) | 52 macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE) |
51 function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) { | 53 function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) { |
52 if (!IS_UNDEFINED(byteOffset)) { | 54 if (!IS_UNDEFINED(byteOffset)) { |
53 byteOffset = | 55 byteOffset = |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 "setUint32", DataViewSetUint32JS, | 502 "setUint32", DataViewSetUint32JS, |
501 | 503 |
502 "getFloat32", DataViewGetFloat32JS, | 504 "getFloat32", DataViewGetFloat32JS, |
503 "setFloat32", DataViewSetFloat32JS, | 505 "setFloat32", DataViewSetFloat32JS, |
504 | 506 |
505 "getFloat64", DataViewGetFloat64JS, | 507 "getFloat64", DataViewGetFloat64JS, |
506 "setFloat64", DataViewSetFloat64JS | 508 "setFloat64", DataViewSetFloat64JS |
507 ]); | 509 ]); |
508 | 510 |
509 }) | 511 }) |
OLD | NEW |