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

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

Issue 1531843003: Rename IS_SPEC_OBJECT macro to IS_RECEIVER. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/collection.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
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return this; 71 return this;
72 } 72 }
73 73
74 74
75 // ES6 section 22.1.5.2.1 %ArrayIteratorPrototype%.next( ) 75 // ES6 section 22.1.5.2.1 %ArrayIteratorPrototype%.next( )
76 function ArrayIteratorNext() { 76 function ArrayIteratorNext() {
77 var iterator = this; 77 var iterator = this;
78 var value = UNDEFINED; 78 var value = UNDEFINED;
79 var done = true; 79 var done = true;
80 80
81 if (!IS_SPEC_OBJECT(iterator) || 81 if (!IS_RECEIVER(iterator) ||
82 !HAS_DEFINED_PRIVATE(iterator, arrayIteratorNextIndexSymbol)) { 82 !HAS_DEFINED_PRIVATE(iterator, arrayIteratorNextIndexSymbol)) {
83 throw MakeTypeError(kIncompatibleMethodReceiver, 83 throw MakeTypeError(kIncompatibleMethodReceiver,
84 'Array Iterator.prototype.next', this); 84 'Array Iterator.prototype.next', this);
85 } 85 }
86 86
87 var array = GET_PRIVATE(iterator, arrayIteratorObjectSymbol); 87 var array = GET_PRIVATE(iterator, arrayIteratorObjectSymbol);
88 if (!IS_UNDEFINED(array)) { 88 if (!IS_UNDEFINED(array)) {
89 var index = GET_PRIVATE(iterator, arrayIteratorNextIndexSymbol); 89 var index = GET_PRIVATE(iterator, arrayIteratorNextIndexSymbol);
90 var itemKind = GET_PRIVATE(iterator, arrayIterationKindSymbol); 90 var itemKind = GET_PRIVATE(iterator, arrayIterationKindSymbol);
91 var length = TO_UINT32(array.length); 91 var length = TO_UINT32(array.length);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // ------------------------------------------------------------------- 165 // -------------------------------------------------------------------
166 // Exports 166 // Exports
167 167
168 utils.Export(function(to) { 168 utils.Export(function(to) {
169 to.ArrayValues = ArrayValues; 169 to.ArrayValues = ArrayValues;
170 }); 170 });
171 171
172 %InstallToContext(["array_values_iterator", ArrayValues]); 172 %InstallToContext(["array_values_iterator", ArrayValues]);
173 173
174 }) 174 })
OLDNEW
« no previous file with comments | « src/js/array.js ('k') | src/js/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698