Reviewers: rossberg,
Message:
This behavior is ES5 conform and consistent with latest JSC and FF.
Description:
Fix String.prototype.split for undefined separator.
[email protected]
TEST=test262/S15.5.4.14_A?_T?
Please review this at https://chromiumcodereview.appspot.com/9355005/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/string.js
M test/test262/test262.status
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index
2d6896120e5c7c2633fd550a085b1624eb62ada6..3576ccd626dce27512085aec26324a328a74429e
100644
--- a/src/string.js
+++ b/src/string.js
@@ -588,11 +588,8 @@ function StringSplit(separator, limit) {
limit = (IS_UNDEFINED(limit)) ? 0xffffffff : TO_UINT32(limit);
// ECMA-262 says that if separator is undefined, the result should
- // be an array of size 1 containing the entire string. SpiderMonkey
- // and KJS have this behavior only when no separator is given. If
- // undefined is explicitly given, they convert it to a string and
- // use that. We do as SpiderMonkey and KJS.
- if (%_ArgumentsLength() === 0) {
+ // be an array of size 1 containing the entire string.
+ if (IS_UNDEFINED(separator)) {
return [subject];
}
Index: test/test262/test262.status
diff --git a/test/test262/test262.status b/test/test262/test262.status
index
38e88a13ccf0b2b8a96cc0124256c5cc213d00dc..4ce3ff901cc1de0524beadd0332c99ae5697a49d
100644
--- a/test/test262/test262.status
+++ b/test/test262/test262.status
@@ -57,11 +57,6 @@ S10.4.2.1_A1: FAIL
15.2.3.7-6-a-285: FAIL
# Unanalyzed failures:
-S15.5.4.14_A1_T6: FAIL
-S15.5.4.14_A1_T7: FAIL
-S15.5.4.14_A1_T8: FAIL
-S15.5.4.14_A1_T9: FAIL
-S15.5.4.14_A2_T7: FAIL
S15.10.2.12_A1_T1: FAIL
S15.10.2.12_A2_T1: FAIL
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev