Fix String.prototype.split for undefined separator.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 20 Feb 2012 08:41:13 +0000 (08:41 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 20 Feb 2012 08:41:13 +0000 (08:41 +0000)
R=rossberg@chromium.org
TEST=test262/S15.5.4.14_A?_T?

Review URL: https://chromiumcodereview.appspot.com/9355005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10743 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/string.js
test/test262/test262.status

index 2d68961..3576ccd 100644 (file)
@@ -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 38e88a1..4ce3ff9 100644 (file)
@@ -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