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

Side by Side Diff: src/js/array.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/debug/mirrors.js ('k') | src/js/array-iterator.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 1767
1768 if (!IS_UNDEFINED(iterable)) { 1768 if (!IS_UNDEFINED(iterable)) {
1769 result = %IsConstructor(this) ? new this() : []; 1769 result = %IsConstructor(this) ? new this() : [];
1770 1770
1771 var iterator = GetIterator(items, iterable); 1771 var iterator = GetIterator(items, iterable);
1772 1772
1773 k = 0; 1773 k = 0;
1774 while (true) { 1774 while (true) {
1775 var next = iterator.next(); 1775 var next = iterator.next();
1776 1776
1777 if (!IS_SPEC_OBJECT(next)) { 1777 if (!IS_RECEIVER(next)) {
1778 throw MakeTypeError(kIteratorResultNotAnObject, next); 1778 throw MakeTypeError(kIteratorResultNotAnObject, next);
1779 } 1779 }
1780 1780
1781 if (next.done) { 1781 if (next.done) {
1782 result.length = k; 1782 result.length = k;
1783 return result; 1783 return result;
1784 } 1784 }
1785 1785
1786 nextValue = next.value; 1786 nextValue = next.value;
1787 if (mapping) { 1787 if (mapping) {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 %InstallToContext([ 1964 %InstallToContext([
1965 "array_pop", ArrayPop, 1965 "array_pop", ArrayPop,
1966 "array_push", ArrayPush, 1966 "array_push", ArrayPush,
1967 "array_shift", ArrayShift, 1967 "array_shift", ArrayShift,
1968 "array_splice", ArraySplice, 1968 "array_splice", ArraySplice,
1969 "array_slice", ArraySlice, 1969 "array_slice", ArraySlice,
1970 "array_unshift", ArrayUnshift, 1970 "array_unshift", ArrayUnshift,
1971 ]); 1971 ]);
1972 1972
1973 }); 1973 });
OLDNEW
« no previous file with comments | « src/debug/mirrors.js ('k') | src/js/array-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698