Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: src/js/typedarray.js

Issue 1413173003: Move error message makers off js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/js/symbol.js ('k') | src/js/uri.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 // ------------------------------------------------------------------- 11 // -------------------------------------------------------------------
12 // Imports 12 // Imports
13 13
14 var ArrayValues; 14 var ArrayValues;
15 var GlobalArray = global.Array; 15 var GlobalArray = global.Array;
16 var GlobalArrayBuffer = global.ArrayBuffer; 16 var GlobalArrayBuffer = global.ArrayBuffer;
17 var GlobalDataView = global.DataView; 17 var GlobalDataView = global.DataView;
18 var GlobalObject = global.Object; 18 var GlobalObject = global.Object;
19 var InternalArray = utils.InternalArray; 19 var InternalArray = utils.InternalArray;
20 var iteratorSymbol = utils.ImportNow("iterator_symbol"); 20 var iteratorSymbol = utils.ImportNow("iterator_symbol");
21 var MakeRangeError;
22 var MakeTypeError;
21 var MaxSimple; 23 var MaxSimple;
22 var MinSimple; 24 var MinSimple;
23 var ToPositiveInteger; 25 var ToPositiveInteger;
24 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 26 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
25 27
26 macro TYPED_ARRAYS(FUNCTION) 28 macro TYPED_ARRAYS(FUNCTION)
27 // arrayIds below should be synchronized with Runtime_TypedArrayInitialize. 29 // arrayIds below should be synchronized with Runtime_TypedArrayInitialize.
28 FUNCTION(1, Uint8Array, 1) 30 FUNCTION(1, Uint8Array, 1)
29 FUNCTION(2, Int8Array, 1) 31 FUNCTION(2, Int8Array, 1)
30 FUNCTION(3, Uint16Array, 2) 32 FUNCTION(3, Uint16Array, 2)
31 FUNCTION(4, Int16Array, 2) 33 FUNCTION(4, Int16Array, 2)
32 FUNCTION(5, Uint32Array, 4) 34 FUNCTION(5, Uint32Array, 4)
33 FUNCTION(6, Int32Array, 4) 35 FUNCTION(6, Int32Array, 4)
34 FUNCTION(7, Float32Array, 4) 36 FUNCTION(7, Float32Array, 4)
35 FUNCTION(8, Float64Array, 8) 37 FUNCTION(8, Float64Array, 8)
36 FUNCTION(9, Uint8ClampedArray, 1) 38 FUNCTION(9, Uint8ClampedArray, 1)
37 endmacro 39 endmacro
38 40
39 macro DECLARE_GLOBALS(INDEX, NAME, SIZE) 41 macro DECLARE_GLOBALS(INDEX, NAME, SIZE)
40 var GlobalNAME = global.NAME; 42 var GlobalNAME = global.NAME;
41 endmacro 43 endmacro
42 44
43 TYPED_ARRAYS(DECLARE_GLOBALS) 45 TYPED_ARRAYS(DECLARE_GLOBALS)
44 46
45 utils.Import(function(from) { 47 utils.Import(function(from) {
46 ArrayValues = from.ArrayValues; 48 ArrayValues = from.ArrayValues;
49 MakeRangeError = from.MakeRangeError;
50 MakeTypeError = from.MakeTypeError;
47 MaxSimple = from.MaxSimple; 51 MaxSimple = from.MaxSimple;
48 MinSimple = from.MinSimple; 52 MinSimple = from.MinSimple;
49 ToPositiveInteger = from.ToPositiveInteger; 53 ToPositiveInteger = from.ToPositiveInteger;
50 }); 54 });
51 55
52 // --------------- Typed Arrays --------------------- 56 // --------------- Typed Arrays ---------------------
53 57
54 macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE) 58 macro TYPED_ARRAY_CONSTRUCTOR(ARRAY_ID, NAME, ELEMENT_SIZE)
55 function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) { 59 function NAMEConstructByArrayBuffer(obj, buffer, byteOffset, length) {
56 if (!IS_UNDEFINED(byteOffset)) { 60 if (!IS_UNDEFINED(byteOffset)) {
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 "setUint32", DataViewSetUint32JS, 512 "setUint32", DataViewSetUint32JS,
509 513
510 "getFloat32", DataViewGetFloat32JS, 514 "getFloat32", DataViewGetFloat32JS,
511 "setFloat32", DataViewSetFloat32JS, 515 "setFloat32", DataViewSetFloat32JS,
512 516
513 "getFloat64", DataViewGetFloat64JS, 517 "getFloat64", DataViewGetFloat64JS,
514 "setFloat64", DataViewSetFloat64JS 518 "setFloat64", DataViewSetFloat64JS
515 ]); 519 ]);
516 520
517 }) 521 })
OLDNEW
« no previous file with comments | « src/js/symbol.js ('k') | src/js/uri.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698