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

Side by Side Diff: src/typedarray.js

Issue 1325573004: [runtime] Replace many buggy uses of %_CallFunction with %_Call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address feedback. Created 5 years, 3 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/string.js ('k') | src/weak-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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 } 136 }
137 } 137 }
138 138
139 function NAMEConstructByIterable(obj, iterable, iteratorFn) { 139 function NAMEConstructByIterable(obj, iterable, iteratorFn) {
140 var list = new InternalArray(); 140 var list = new InternalArray();
141 // Reading the Symbol.iterator property of iterable twice would be 141 // Reading the Symbol.iterator property of iterable twice would be
142 // observable with getters, so instead, we call the function which 142 // observable with getters, so instead, we call the function which
143 // was already looked up, and wrap it in another iterable. The 143 // was already looked up, and wrap it in another iterable. The
144 // __proto__ of the new iterable is set to null to avoid any chance 144 // __proto__ of the new iterable is set to null to avoid any chance
145 // of modifications to Object.prototype being observable here. 145 // of modifications to Object.prototype being observable here.
146 var iterator = %_CallFunction(iterable, iteratorFn); 146 var iterator = %_Call(iteratorFn, iterable);
147 var newIterable = { 147 var newIterable = {
148 __proto__: null 148 __proto__: null
149 }; 149 };
150 // TODO(littledan): Computed properties don't work yet in nosnap. 150 // TODO(littledan): Computed properties don't work yet in nosnap.
151 // Rephrase when they do. 151 // Rephrase when they do.
152 newIterable[iteratorSymbol] = function() { return iterator; } 152 newIterable[iteratorSymbol] = function() { return iterator; }
153 for (var value of newIterable) { 153 for (var value of newIterable) {
154 list.push(value); 154 list.push(value);
155 } 155 }
156 NAMEConstructByArrayLike(obj, list); 156 NAMEConstructByArrayLike(obj, list);
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 "setUint32", DataViewSetUint32JS, 505 "setUint32", DataViewSetUint32JS,
506 506
507 "getFloat32", DataViewGetFloat32JS, 507 "getFloat32", DataViewGetFloat32JS,
508 "setFloat32", DataViewSetFloat32JS, 508 "setFloat32", DataViewSetFloat32JS,
509 509
510 "getFloat64", DataViewGetFloat64JS, 510 "getFloat64", DataViewGetFloat64JS,
511 "setFloat64", DataViewSetFloat64JS 511 "setFloat64", DataViewSetFloat64JS
512 ]); 512 ]);
513 513
514 }) 514 })
OLDNEW
« no previous file with comments | « src/string.js ('k') | src/weak-collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698