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

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

Issue 1419813010: [runtime] Remove the very dangerous %_CallFunction intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/full-codegen/x87/full-codegen-x87.cc ('k') | src/js/code-stubs.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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 func = this.join; 398 func = this.join;
399 if (func === ArrayJoin) { 399 if (func === ArrayJoin) {
400 return Join(this, this.length, ',', ConvertToString); 400 return Join(this, this.length, ',', ConvertToString);
401 } 401 }
402 array = this; 402 array = this;
403 } else { 403 } else {
404 array = TO_OBJECT(this); 404 array = TO_OBJECT(this);
405 func = array.join; 405 func = array.join;
406 } 406 }
407 if (!IS_CALLABLE(func)) { 407 if (!IS_CALLABLE(func)) {
408 return %_CallFunction(array, ObjectToString); 408 return %_Call(ObjectToString, array);
409 } 409 }
410 return %_Call(func, array); 410 return %_Call(func, array);
411 } 411 }
412 412
413 413
414 function InnerArrayToLocaleString(array, length) { 414 function InnerArrayToLocaleString(array, length) {
415 var len = TO_LENGTH_OR_UINT32(length); 415 var len = TO_LENGTH_OR_UINT32(length);
416 if (len === 0) return ""; 416 if (len === 0) return "";
417 return Join(array, len, ',', ConvertToLocaleString); 417 return Join(array, len, ',', ConvertToLocaleString);
418 } 418 }
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1950 %InstallToContext([ 1950 %InstallToContext([
1951 "array_pop", ArrayPop, 1951 "array_pop", ArrayPop,
1952 "array_push", ArrayPush, 1952 "array_push", ArrayPush,
1953 "array_shift", ArrayShift, 1953 "array_shift", ArrayShift,
1954 "array_splice", ArraySplice, 1954 "array_splice", ArraySplice,
1955 "array_slice", ArraySlice, 1955 "array_slice", ArraySlice,
1956 "array_unshift", ArrayUnshift, 1956 "array_unshift", ArrayUnshift,
1957 ]); 1957 ]);
1958 1958
1959 }); 1959 });
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/js/code-stubs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698