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

Unified Diff: src/array.js

Issue 1323543002: [runtime] Replace %to_string_fun with %_ToString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ToStringStub
Patch Set: REBASE. Fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index 94775cd6334c492c9449e2755ac8f35da0e0409d..721121e9b35322a7135fcdb883d90e4bffd52081 100644
--- a/src/array.js
+++ b/src/array.js
@@ -411,8 +411,8 @@ function ArrayToLocaleString() {
function InnerArrayJoin(separator, array, length) {
if (IS_UNDEFINED(separator)) {
separator = ',';
- } else if (!IS_STRING(separator)) {
- separator = $nonStringToString(separator);
+ } else {
+ separator = TO_STRING(separator);
}
var result = %_FastOneByteArrayJoin(array, separator);
@@ -421,9 +421,8 @@ function InnerArrayJoin(separator, array, length) {
// Fast case for one-element arrays.
if (length === 1) {
var e = array[0];
- if (IS_STRING(e)) return e;
if (IS_NULL_OR_UNDEFINED(e)) return '';
- return $nonStringToString(e);
+ return TO_STRING(e);
}
return Join(array, length, separator, ConvertToString);
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698