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

Unified Diff: src/js/array.js

Issue 1709693002: Revert of [fullcodegen] Remove the hacky %_FastOneByteArrayJoin intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/array.js
diff --git a/src/js/array.js b/src/js/array.js
index b8cf3ff5d222a3fb65266a9539890b218b1b30d4..28d964eaae87a36e05585a8755938a5fb3feb0d0 100644
--- a/src/js/array.js
+++ b/src/js/array.js
@@ -209,6 +209,8 @@
elements[elements_length++] = e;
}
elements.length = elements_length;
+ var result = %_FastOneByteArrayJoin(elements, '');
+ if (!IS_UNDEFINED(result)) return result;
return %StringBuilderConcat(elements, elements_length, '');
}
// Non-empty separator case.
@@ -231,6 +233,9 @@
elements[i] = e;
}
}
+ var result = %_FastOneByteArrayJoin(elements, separator);
+ if (!IS_UNDEFINED(result)) return result;
+
return %StringBuilderJoin(elements, length, separator);
} finally {
// Make sure to remove the last element of the visited array no
@@ -441,6 +446,9 @@
} else {
separator = TO_STRING(separator);
}
+
+ var result = %_FastOneByteArrayJoin(array, separator);
+ if (!IS_UNDEFINED(result)) return result;
// Fast case for one-element arrays.
if (length === 1) {
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698