Chromium Code Reviews| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 | 347 |
| 348 // ------------------------------------------------------------------- | 348 // ------------------------------------------------------------------- |
| 349 | 349 |
| 350 macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE) | 350 macro SETUP_TYPED_ARRAY(ARRAY_ID, NAME, ELEMENT_SIZE) |
| 351 %SetCode(GlobalNAME, NAMEConstructor); | 351 %SetCode(GlobalNAME, NAMEConstructor); |
| 352 %FunctionSetPrototype(GlobalNAME, new GlobalObject()); | 352 %FunctionSetPrototype(GlobalNAME, new GlobalObject()); |
| 353 | 353 |
| 354 %AddNamedProperty(GlobalNAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, | 354 %AddNamedProperty(GlobalNAME, "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
| 355 READ_ONLY | DONT_ENUM | DONT_DELETE); | 355 READ_ONLY | DONT_ENUM | DONT_DELETE); |
| 356 %AddNamedProperty(GlobalNAME.prototype, | 356 %AddNamedProperty(GlobalNAME.prototype, |
| 357 "constructor", global.NAME, DONT_ENUM); | 357 "constructor", global.NAME, |
| 358 READ_ONLY | DONT_ENUM | DONT_DELETE); | |
|
adamk
2015/07/16 19:16:12
Why are you marking it this way? Am I missing anot
| |
| 358 %AddNamedProperty(GlobalNAME.prototype, | 359 %AddNamedProperty(GlobalNAME.prototype, |
| 359 "BYTES_PER_ELEMENT", ELEMENT_SIZE, | 360 "BYTES_PER_ELEMENT", ELEMENT_SIZE, |
| 360 READ_ONLY | DONT_ENUM | DONT_DELETE); | 361 READ_ONLY | DONT_ENUM | DONT_DELETE); |
| 361 utils.InstallGetter(GlobalNAME.prototype, "buffer", NAME_GetBuffer); | 362 utils.InstallGetter(GlobalNAME.prototype, "buffer", NAME_GetBuffer); |
| 362 utils.InstallGetter(GlobalNAME.prototype, "byteOffset", NAME_GetByteOffset, | 363 utils.InstallGetter(GlobalNAME.prototype, "byteOffset", NAME_GetByteOffset, |
| 363 DONT_ENUM | DONT_DELETE); | 364 DONT_ENUM); |
|
adamk
2015/07/16 19:16:12
DONT_ENUM is the default, you can leave this off h
| |
| 364 utils.InstallGetter(GlobalNAME.prototype, "byteLength", NAME_GetByteLength, | 365 utils.InstallGetter(GlobalNAME.prototype, "byteLength", NAME_GetByteLength, |
| 365 DONT_ENUM | DONT_DELETE); | 366 DONT_ENUM); |
| 366 utils.InstallGetter(GlobalNAME.prototype, "length", NAME_GetLength, | 367 utils.InstallGetter(GlobalNAME.prototype, "length", NAME_GetLength, |
| 367 DONT_ENUM | DONT_DELETE); | 368 DONT_ENUM); |
| 368 utils.InstallGetter(GlobalNAME.prototype, symbolToStringTag, | 369 utils.InstallGetter(GlobalNAME.prototype, symbolToStringTag, |
| 369 TypedArrayGetToStringTag); | 370 TypedArrayGetToStringTag); |
| 370 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ | 371 utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [ |
| 371 "subarray", NAMESubArray, | 372 "subarray", NAMESubArray, |
| 372 "set", TypedArraySet | 373 "set", TypedArraySet |
| 373 ]); | 374 ]); |
| 374 endmacro | 375 endmacro |
| 375 | 376 |
| 376 TYPED_ARRAYS(SETUP_TYPED_ARRAY) | 377 TYPED_ARRAYS(SETUP_TYPED_ARRAY) |
| 377 | 378 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 500 "setUint32", DataViewSetUint32JS, | 501 "setUint32", DataViewSetUint32JS, |
| 501 | 502 |
| 502 "getFloat32", DataViewGetFloat32JS, | 503 "getFloat32", DataViewGetFloat32JS, |
| 503 "setFloat32", DataViewSetFloat32JS, | 504 "setFloat32", DataViewSetFloat32JS, |
| 504 | 505 |
| 505 "getFloat64", DataViewGetFloat64JS, | 506 "getFloat64", DataViewGetFloat64JS, |
| 506 "setFloat64", DataViewSetFloat64JS | 507 "setFloat64", DataViewSetFloat64JS |
| 507 ]); | 508 ]); |
| 508 | 509 |
| 509 }) | 510 }) |
| OLD | NEW |