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

Side by Side Diff: src/js/array-iterator.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/array.js ('k') | src/js/arraybuffer.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 arrayIterationKindSymbol = 14 var arrayIterationKindSymbol =
15 utils.ImportNow("array_iteration_kind_symbol"); 15 utils.ImportNow("array_iteration_kind_symbol");
16 var arrayIteratorNextIndexSymbol = 16 var arrayIteratorNextIndexSymbol =
17 utils.ImportNow("array_iterator_next_symbol"); 17 utils.ImportNow("array_iterator_next_symbol");
18 var arrayIteratorObjectSymbol = 18 var arrayIteratorObjectSymbol =
19 utils.ImportNow("array_iterator_object_symbol"); 19 utils.ImportNow("array_iterator_object_symbol");
20 var GlobalArray = global.Array; 20 var GlobalArray = global.Array;
21 var IteratorPrototype = utils.ImportNow("IteratorPrototype"); 21 var IteratorPrototype = utils.ImportNow("IteratorPrototype");
22 var iteratorSymbol = utils.ImportNow("iterator_symbol"); 22 var iteratorSymbol = utils.ImportNow("iterator_symbol");
23 var MakeTypeError;
23 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 24 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
24 25
25 macro TYPED_ARRAYS(FUNCTION) 26 macro TYPED_ARRAYS(FUNCTION)
26 FUNCTION(Uint8Array) 27 FUNCTION(Uint8Array)
27 FUNCTION(Int8Array) 28 FUNCTION(Int8Array)
28 FUNCTION(Uint16Array) 29 FUNCTION(Uint16Array)
29 FUNCTION(Int16Array) 30 FUNCTION(Int16Array)
30 FUNCTION(Uint32Array) 31 FUNCTION(Uint32Array)
31 FUNCTION(Int32Array) 32 FUNCTION(Int32Array)
32 FUNCTION(Float32Array) 33 FUNCTION(Float32Array)
33 FUNCTION(Float64Array) 34 FUNCTION(Float64Array)
34 FUNCTION(Uint8ClampedArray) 35 FUNCTION(Uint8ClampedArray)
35 endmacro 36 endmacro
36 37
37 macro COPY_FROM_GLOBAL(NAME) 38 macro COPY_FROM_GLOBAL(NAME)
38 var GlobalNAME = global.NAME; 39 var GlobalNAME = global.NAME;
39 endmacro 40 endmacro
40 41
41 TYPED_ARRAYS(COPY_FROM_GLOBAL) 42 TYPED_ARRAYS(COPY_FROM_GLOBAL)
42 43
44 utils.Import(function(from) {
45 MakeTypeError = from.MakeTypeError;
46 })
47
43 // ----------------------------------------------------------------------- 48 // -----------------------------------------------------------------------
44 49
45 function ArrayIterator() {} 50 function ArrayIterator() {}
46 51
47 52
48 // TODO(wingo): Update section numbers when ES6 has stabilized. The 53 // TODO(wingo): Update section numbers when ES6 has stabilized. The
49 // section numbers below are already out of date as of the May 2014 54 // section numbers below are already out of date as of the May 2014
50 // draft. 55 // draft.
51 56
52 57
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // ------------------------------------------------------------------- 165 // -------------------------------------------------------------------
161 // Exports 166 // Exports
162 167
163 utils.Export(function(to) { 168 utils.Export(function(to) {
164 to.ArrayValues = ArrayValues; 169 to.ArrayValues = ArrayValues;
165 }); 170 });
166 171
167 %InstallToContext(["array_values_iterator", ArrayValues]); 172 %InstallToContext(["array_values_iterator", ArrayValues]);
168 173
169 }) 174 })
OLDNEW
« no previous file with comments | « src/js/array.js ('k') | src/js/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698