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 "use strict"; | 5 "use strict"; |
6 | 6 |
7 // This file relies on the fact that the following declaration has been made | 7 // This file relies on the fact that the following declaration has been made |
8 // in runtime.js: | 8 // in runtime.js: |
9 // var $Array = global.Array; | 9 // var $Array = global.Array; |
10 var $ArrayBuffer = global.ArrayBuffer; | 10 var $ArrayBuffer = global.ArrayBuffer; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 %FunctionSetPrototype(global.NAME, new $Object()); | 307 %FunctionSetPrototype(global.NAME, new $Object()); |
308 | 308 |
309 %AddNamedProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, | 309 %AddNamedProperty(global.NAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
310 READ_ONLY | DONT_ENUM | DONT_DELETE); | 310 READ_ONLY | DONT_ENUM | DONT_DELETE); |
311 %AddNamedProperty(global.NAME.prototype, | 311 %AddNamedProperty(global.NAME.prototype, |
312 "constructor", global.NAME, DONT_ENUM); | 312 "constructor", global.NAME, DONT_ENUM); |
313 %AddNamedProperty(global.NAME.prototype, | 313 %AddNamedProperty(global.NAME.prototype, |
314 "BYTES_PER_ELEMENT", ELEMENT_SIZE, | 314 "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
315 READ_ONLY | DONT_ENUM | DONT_DELETE); | 315 READ_ONLY | DONT_ENUM | DONT_DELETE); |
316 InstallGetter(global.NAME.prototype, "buffer", NAME_GetBuffer); | 316 InstallGetter(global.NAME.prototype, "buffer", NAME_GetBuffer); |
317 InstallGetter(global.NAME.prototype, "byteOffset", NAME_GetByteOffset); | 317 InstallGetter(global.NAME.prototype, "byteOffset", NAME_GetByteOffset, |
318 InstallGetter(global.NAME.prototype, "byteLength", NAME_GetByteLength); | 318 DONT_ENUM | DONT_DELETE); |
319 InstallGetter(global.NAME.prototype, "length", NAME_GetLength); | 319 InstallGetter(global.NAME.prototype, "byteLength", NAME_GetByteLength, |
| 320 DONT_ENUM | DONT_DELETE); |
| 321 InstallGetter(global.NAME.prototype, "length", NAME_GetLength, |
| 322 DONT_ENUM | DONT_DELETE); |
320 InstallGetter(global.NAME.prototype, symbolToStringTag, | 323 InstallGetter(global.NAME.prototype, symbolToStringTag, |
321 TypedArrayGetToStringTag); | 324 TypedArrayGetToStringTag); |
322 InstallFunctions(global.NAME.prototype, DONT_ENUM, $Array( | 325 InstallFunctions(global.NAME.prototype, DONT_ENUM, $Array( |
323 "subarray", NAMESubArray, | 326 "subarray", NAMESubArray, |
324 "set", TypedArraySet | 327 "set", TypedArraySet |
325 )); | 328 )); |
326 endmacro | 329 endmacro |
327 | 330 |
328 TYPED_ARRAYS(SETUP_TYPED_ARRAY) | 331 TYPED_ARRAYS(SETUP_TYPED_ARRAY) |
329 } | 332 } |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 | 476 |
474 "getFloat32", DataViewGetFloat32JS, | 477 "getFloat32", DataViewGetFloat32JS, |
475 "setFloat32", DataViewSetFloat32JS, | 478 "setFloat32", DataViewSetFloat32JS, |
476 | 479 |
477 "getFloat64", DataViewGetFloat64JS, | 480 "getFloat64", DataViewGetFloat64JS, |
478 "setFloat64", DataViewSetFloat64JS | 481 "setFloat64", DataViewSetFloat64JS |
479 )); | 482 )); |
480 } | 483 } |
481 | 484 |
482 SetupDataView(); | 485 SetupDataView(); |
OLD | NEW |