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

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

Issue 1122033002: Migrate error messages, part 7. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 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 | « src/collection.js ('k') | src/harmony-regexp.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() { 5 (function() {
6 6
7 'use strict'; 7 'use strict';
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 if (!IS_UNDEFINED(iterable)) { 206 if (!IS_UNDEFINED(iterable)) {
207 result = %IsConstructor(this) ? new this() : []; 207 result = %IsConstructor(this) ? new this() : [];
208 208
209 var iterator = GetIterator(items, iterable); 209 var iterator = GetIterator(items, iterable);
210 210
211 k = 0; 211 k = 0;
212 while (true) { 212 while (true) {
213 var next = iterator.next(); 213 var next = iterator.next();
214 214
215 if (!IS_OBJECT(next)) { 215 if (!IS_OBJECT(next)) {
216 throw MakeTypeError("iterator_result_not_an_object", [next]); 216 throw MakeTypeError(kIteratorResultNotAnObject, next);
217 } 217 }
218 218
219 if (next.done) { 219 if (next.done) {
220 result.length = k; 220 result.length = k;
221 return result; 221 return result;
222 } 222 }
223 223
224 nextValue = next.value; 224 nextValue = next.value;
225 if (mapping) { 225 if (mapping) {
226 mappedValue = %_CallFunction(receiver, nextValue, k, mapfn); 226 mappedValue = %_CallFunction(receiver, nextValue, k, mapfn);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 // Set up the non-enumerable functions on the Array prototype object. 280 // Set up the non-enumerable functions on the Array prototype object.
281 InstallFunctions(GlobalArray.prototype, DONT_ENUM, [ 281 InstallFunctions(GlobalArray.prototype, DONT_ENUM, [
282 "copyWithin", ArrayCopyWithin, 282 "copyWithin", ArrayCopyWithin,
283 "find", ArrayFind, 283 "find", ArrayFind,
284 "findIndex", ArrayFindIndex, 284 "findIndex", ArrayFindIndex,
285 "fill", ArrayFill 285 "fill", ArrayFill
286 ]); 286 ]);
287 287
288 })(); 288 })();
OLDNEW
« no previous file with comments | « src/collection.js ('k') | src/harmony-regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698