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

Side by Side Diff: src/js/array-iterator.js

Issue 1990983002: array-iterator.js: use object_get_prototype_of instead of directly accessing the proto (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | no next file » | 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 MakeTypeError;
24 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol"); 24 var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
25 var GlobalTypedArray = global.Uint8Array.__proto__; 25 var GlobalTypedArray = %object_get_prototype_of(global.Uint8Array);
26 26
27 utils.Import(function(from) { 27 utils.Import(function(from) {
28 MakeTypeError = from.MakeTypeError; 28 MakeTypeError = from.MakeTypeError;
29 }) 29 })
30 30
31 // ----------------------------------------------------------------------- 31 // -----------------------------------------------------------------------
32 32
33 function ArrayIterator() {} 33 function ArrayIterator() {}
34 34
35 35
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 // ------------------------------------------------------------------- 162 // -------------------------------------------------------------------
163 // Exports 163 // Exports
164 164
165 utils.Export(function(to) { 165 utils.Export(function(to) {
166 to.ArrayValues = ArrayValues; 166 to.ArrayValues = ArrayValues;
167 }); 167 });
168 168
169 %InstallToContext(["array_values_iterator", ArrayValues]); 169 %InstallToContext(["array_values_iterator", ArrayValues]);
170 170
171 }) 171 })
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698