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

Side by Side Diff: src/array.js

Issue 546803003: Update ObjectToString to Harmony-draft algorithm (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase, rename ObjectToString Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/api.cc ('k') | src/arraybuffer.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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declarations have been made 7 // This file relies on the fact that the following declarations have been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Array = global.Array; 9 // var $Array = global.Array;
10 10
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 func = this.join; 342 func = this.join;
343 if (func === ArrayJoin) { 343 if (func === ArrayJoin) {
344 return Join(this, this.length, ',', ConvertToString); 344 return Join(this, this.length, ',', ConvertToString);
345 } 345 }
346 array = this; 346 array = this;
347 } else { 347 } else {
348 array = ToObject(this); 348 array = ToObject(this);
349 func = array.join; 349 func = array.join;
350 } 350 }
351 if (!IS_SPEC_FUNCTION(func)) { 351 if (!IS_SPEC_FUNCTION(func)) {
352 return %_CallFunction(array, ObjectToString); 352 return %_CallFunction(array, NoSideEffectsObjectToString);
353 } 353 }
354 return %_CallFunction(array, func); 354 return %_CallFunction(array, func);
355 } 355 }
356 356
357 357
358 function ArrayToLocaleString() { 358 function ArrayToLocaleString() {
359 var array = ToObject(this); 359 var array = ToObject(this);
360 var arrayLen = array.length; 360 var arrayLen = array.length;
361 var len = TO_UINT32(arrayLen); 361 var len = TO_UINT32(arrayLen);
362 if (len === 0) return ""; 362 if (len === 0) return "";
(...skipping 1201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 )); 1564 ));
1565 1565
1566 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array( 1566 SetUpLockedPrototype(InternalPackedArray, $Array(), $Array(
1567 "join", getFunction("join", ArrayJoin), 1567 "join", getFunction("join", ArrayJoin),
1568 "pop", getFunction("pop", ArrayPop), 1568 "pop", getFunction("pop", ArrayPop),
1569 "push", getFunction("push", ArrayPush) 1569 "push", getFunction("push", ArrayPush)
1570 )); 1570 ));
1571 } 1571 }
1572 1572
1573 SetUpArray(); 1573 SetUpArray();
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698