Title: [194332] trunk

Diff

Modified: trunk/LayoutTests/ChangeLog (194331 => 194332)


--- trunk/LayoutTests/ChangeLog	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/ChangeLog	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,3 +1,15 @@
+2015-12-21  Ryan Haddad  <[email protected]>
+
+        Unreviewed, rolling out r194328.
+
+        This change appears to have caused failures in JSC tests
+
+        Reverted changeset:
+
+        "[INTL] Implement String.prototype.localeCompare in ECMA-402"
+        https://bugs.webkit.org/show_bug.cgi?id=147607
+        http://trac.webkit.org/changeset/194328
+
 2015-12-21  Andy VanWagoner  <[email protected]>
 
         [INTL] Implement String.prototype.localeCompare in ECMA-402

Modified: trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js (194331 => 194332)


--- trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/js/dom/script-tests/string-prototype-properties.js	2015-12-21 18:20:58 UTC (rev 194332)
@@ -20,7 +20,7 @@
 shouldThrow("String.prototype.substring.call(undefined, 1, 3)");
 shouldThrow("String.prototype.toLowerCase.call(undefined)");
 shouldThrow("String.prototype.toUpperCase.call(undefined)");
-shouldThrow("String.prototype.localeCompare.call(undefined, '1224')", "'TypeError: String.prototype.localeCompare requires that |this| not be undefined'");
+shouldThrow("String.prototype.localeCompare.call(undefined, '1224')");
 shouldThrow("String.prototype.toLocaleLowerCase.call(undefined)");
 shouldThrow("String.prototype.toLocaleUpperCase.call(undefined)");
 shouldThrow("String.prototype.trim.call(undefined)");

Modified: trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt (194331 => 194332)


--- trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/js/dom/string-prototype-properties-expected.txt	2015-12-21 18:20:58 UTC (rev 194332)
@@ -20,7 +20,7 @@
 PASS String.prototype.substring.call(undefined, 1, 3) threw exception TypeError: Type error.
 PASS String.prototype.toLowerCase.call(undefined) threw exception TypeError: Type error.
 PASS String.prototype.toUpperCase.call(undefined) threw exception TypeError: Type error.
-PASS String.prototype.localeCompare.call(undefined, '1224') threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
+PASS String.prototype.localeCompare.call(undefined, '1224') threw exception TypeError: Type error.
 PASS String.prototype.toLocaleLowerCase.call(undefined) threw exception TypeError: Type error.
 PASS String.prototype.toLocaleUpperCase.call(undefined) threw exception TypeError: Type error.
 PASS String.prototype.trim.call(undefined) threw exception TypeError: Type error.

Modified: trunk/LayoutTests/js/script-tests/string-localeCompare.js (194331 => 194332)


--- trunk/LayoutTests/js/script-tests/string-localeCompare.js	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/js/script-tests/string-localeCompare.js	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,28 +1,5 @@
-description("This test checks the behavior of String.prototype.localeCompare as described in the ECMAScript Internationalization API Specification (ECMA-402 2.0).");
+description("This test checks String.localeCompare().");
 
-shouldBe("String.prototype.localeCompare.length", "1");
-shouldBeFalse("Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').enumerable");
-shouldBeTrue("Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').configurable");
-shouldBeTrue("Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').writable");
-
-// Test RequireObjectCoercible.
-shouldThrow("String.prototype.localeCompare.call()", "'TypeError: String.prototype.localeCompare requires that |this| not be undefined'");
-shouldThrow("String.prototype.localeCompare.call(undefined)", "'TypeError: String.prototype.localeCompare requires that |this| not be undefined'");
-shouldThrow("String.prototype.localeCompare.call(null)", "'TypeError: String.prototype.localeCompare requires that |this| not be null'");
-shouldNotThrow("String.prototype.localeCompare.call({}, '')");
-shouldNotThrow("String.prototype.localeCompare.call([], '')");
-shouldNotThrow("String.prototype.localeCompare.call(NaN, '')");
-shouldNotThrow("String.prototype.localeCompare.call(5, '')");
-shouldNotThrow("String.prototype.localeCompare.call('', '')");
-shouldNotThrow("String.prototype.localeCompare.call(() => {}, '')");
-
-// Test toString fails.
-shouldThrow("''.localeCompare.call({ toString() { throw 'thisFail' } }, '')", "'thisFail'");
-shouldThrow("''.localeCompare({ toString() { throw 'thatFail' } })", "'thatFail'");
-shouldNotThrow("''.localeCompare()");
-shouldNotThrow("''.localeCompare(null)");
-
-// Basic support.
 shouldBeTrue('"a".localeCompare("aa") < 0');
 shouldBeTrue('"a".localeCompare("b") < 0');
 
@@ -31,45 +8,3 @@
 
 shouldBeTrue('"aa".localeCompare("a") > 0');
 shouldBeTrue('"b".localeCompare("a") > 0');
-
-// Uses Intl.Collator.
-shouldThrow("'a'.localeCompare('b', '$')", "'RangeError: invalid language tag: $'");
-shouldThrow("'a'.localeCompare('b', 'en', {usage: 'Sort'})", '\'RangeError: usage must be either "sort" or "search"\'');
-
-shouldBe("'ä'.localeCompare('z', 'en')", "-1");
-shouldBe("'ä'.localeCompare('z', 'sv')", "1");
-
-shouldBe("'a'.localeCompare('b', 'en', { sensitivity:'base' })", "-1");
-shouldBe("'a'.localeCompare('ä', 'en', { sensitivity:'base' })", "0");
-shouldBe("'a'.localeCompare('A', 'en', { sensitivity:'base' })", "0");
-shouldBe("'a'.localeCompare('ⓐ', 'en', { sensitivity:'base' })", "0");
-
-shouldBe("'a'.localeCompare('b', 'en', { sensitivity:'accent' })", "-1");
-shouldBe("'a'.localeCompare('ä', 'en', { sensitivity:'accent' })", "-1");
-shouldBe("'a'.localeCompare('A', 'en', { sensitivity:'accent' })", "0");
-shouldBe("'a'.localeCompare('ⓐ', 'en', { sensitivity:'accent' })", "0");
-
-shouldBe("'a'.localeCompare('b', 'en', { sensitivity:'case' })", "-1");
-shouldBe("'a'.localeCompare('ä', 'en', { sensitivity:'case' })", "0");
-shouldBe("'a'.localeCompare('A', 'en', { sensitivity:'case' })", "-1");
-shouldBe("'a'.localeCompare('ⓐ', 'en', { sensitivity:'case' })", "0");
-
-shouldBe("'a'.localeCompare('b', 'en', { sensitivity:'variant' })", "-1");
-shouldBe("'a'.localeCompare('ä', 'en', { sensitivity:'variant' })", "-1");
-shouldBe("'a'.localeCompare('A', 'en', { sensitivity:'variant' })", "-1");
-shouldBe("'a'.localeCompare('ⓐ', 'en', { sensitivity:'variant' })", "-1");
-
-shouldBe("'1'.localeCompare('2', 'en', { numeric:false })", "-1");
-shouldBe("'2'.localeCompare('10', 'en', { numeric:false })", "1");
-shouldBe("'01'.localeCompare('1', 'en', { numeric:false })", "-1");
-shouldBe("'๑'.localeCompare('๒', 'en', { numeric:false })", "-1");
-shouldBe("'๒'.localeCompare('๑๐', 'en', { numeric:false })", "1");
-shouldBe("'๐๑'.localeCompare('๑', 'en', { numeric:false })", "-1");
-
-shouldBe("'1'.localeCompare('2', 'en', { numeric:true })", "-1");
-shouldBe("'2'.localeCompare('10', 'en', { numeric:true })", "-1");
-shouldBe("'01'.localeCompare('1', 'en', { numeric:true })", "0");
-shouldBe("'๑'.localeCompare('๒', 'en', { numeric:true })", "-1");
-shouldBe("'๒'.localeCompare('๑๐', 'en', { numeric:true })", "-1");
-shouldBe("'๐๑'.localeCompare('๑', 'en', { numeric:true })", "0");
-

Modified: trunk/LayoutTests/js/string-localeCompare-expected.txt (194331 => 194332)


--- trunk/LayoutTests/js/string-localeCompare-expected.txt	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/js/string-localeCompare-expected.txt	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,63 +1,14 @@
-This test checks the behavior of String.prototype.localeCompare as described in the ECMAScript Internationalization API Specification (ECMA-402 2.0).
+This test checks String.localeCompare().
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS String.prototype.localeCompare.length is 1
-PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').enumerable is false
-PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').configurable is true
-PASS Object.getOwnPropertyDescriptor(String.prototype, 'localeCompare').writable is true
-PASS String.prototype.localeCompare.call() threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
-PASS String.prototype.localeCompare.call(undefined) threw exception TypeError: String.prototype.localeCompare requires that |this| not be undefined.
-PASS String.prototype.localeCompare.call(null) threw exception TypeError: String.prototype.localeCompare requires that |this| not be null.
-PASS String.prototype.localeCompare.call({}, '') did not throw exception.
-PASS String.prototype.localeCompare.call([], '') did not throw exception.
-PASS String.prototype.localeCompare.call(NaN, '') did not throw exception.
-PASS String.prototype.localeCompare.call(5, '') did not throw exception.
-PASS String.prototype.localeCompare.call('', '') did not throw exception.
-PASS String.prototype.localeCompare.call(() => {}, '') did not throw exception.
-PASS ''.localeCompare.call({ toString() { throw 'thisFail' } }, '') threw exception thisFail.
-PASS ''.localeCompare({ toString() { throw 'thatFail' } }) threw exception thatFail.
-PASS ''.localeCompare() did not throw exception.
-PASS ''.localeCompare(null) did not throw exception.
 PASS "a".localeCompare("aa") < 0 is true
 PASS "a".localeCompare("b") < 0 is true
 PASS "a".localeCompare("a") === 0 is true
 PASS "ạ̈".localeCompare("ạ̈") === 0 is true
 PASS "aa".localeCompare("a") > 0 is true
 PASS "b".localeCompare("a") > 0 is true
-PASS 'a'.localeCompare('b', '$') threw exception RangeError: invalid language tag: $.
-PASS 'a'.localeCompare('b', 'en', {usage: 'Sort'}) threw exception RangeError: usage must be either "sort" or "search".
-PASS 'ä'.localeCompare('z', 'en') is -1
-PASS 'ä'.localeCompare('z', 'sv') is 1
-PASS 'a'.localeCompare('b', 'en', { sensitivity:'base' }) is -1
-PASS 'a'.localeCompare('ä', 'en', { sensitivity:'base' }) is 0
-PASS 'a'.localeCompare('A', 'en', { sensitivity:'base' }) is 0
-PASS 'a'.localeCompare('ⓐ', 'en', { sensitivity:'base' }) is 0
-PASS 'a'.localeCompare('b', 'en', { sensitivity:'accent' }) is -1
-PASS 'a'.localeCompare('ä', 'en', { sensitivity:'accent' }) is -1
-PASS 'a'.localeCompare('A', 'en', { sensitivity:'accent' }) is 0
-PASS 'a'.localeCompare('ⓐ', 'en', { sensitivity:'accent' }) is 0
-PASS 'a'.localeCompare('b', 'en', { sensitivity:'case' }) is -1
-PASS 'a'.localeCompare('ä', 'en', { sensitivity:'case' }) is 0
-PASS 'a'.localeCompare('A', 'en', { sensitivity:'case' }) is -1
-PASS 'a'.localeCompare('ⓐ', 'en', { sensitivity:'case' }) is 0
-PASS 'a'.localeCompare('b', 'en', { sensitivity:'variant' }) is -1
-PASS 'a'.localeCompare('ä', 'en', { sensitivity:'variant' }) is -1
-PASS 'a'.localeCompare('A', 'en', { sensitivity:'variant' }) is -1
-PASS 'a'.localeCompare('ⓐ', 'en', { sensitivity:'variant' }) is -1
-PASS '1'.localeCompare('2', 'en', { numeric:false }) is -1
-PASS '2'.localeCompare('10', 'en', { numeric:false }) is 1
-PASS '01'.localeCompare('1', 'en', { numeric:false }) is -1
-PASS '๑'.localeCompare('๒', 'en', { numeric:false }) is -1
-PASS '๒'.localeCompare('๑๐', 'en', { numeric:false }) is 1
-PASS '๐๑'.localeCompare('๑', 'en', { numeric:false }) is -1
-PASS '1'.localeCompare('2', 'en', { numeric:true }) is -1
-PASS '2'.localeCompare('10', 'en', { numeric:true }) is -1
-PASS '01'.localeCompare('1', 'en', { numeric:true }) is 0
-PASS '๑'.localeCompare('๒', 'en', { numeric:true }) is -1
-PASS '๒'.localeCompare('๑๐', 'en', { numeric:true }) is -1
-PASS '๐๑'.localeCompare('๑', 'en', { numeric:true }) is 0
 PASS successfullyParsed is true
 
 TEST COMPLETE

Modified: trunk/LayoutTests/js/string-localeCompare.html (194331 => 194332)


--- trunk/LayoutTests/js/string-localeCompare.html	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/LayoutTests/js/string-localeCompare.html	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,7 +1,6 @@
 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 <html>
 <head>
-<meta charset="utf-8">
 <script src=""
 </head>
 <body>

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (194331 => 194332)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1250,7 +1250,6 @@
     ${_javascript_CORE_DIR}/builtins/ReflectObject.js
     ${_javascript_CORE_DIR}/builtins/StringConstructor.js
     ${_javascript_CORE_DIR}/builtins/StringIteratorPrototype.js
-    ${_javascript_CORE_DIR}/builtins/StringPrototype.js
     ${_javascript_CORE_DIR}/builtins/TypedArrayConstructor.js
     ${_javascript_CORE_DIR}/builtins/TypedArrayPrototype.js
 )

Modified: trunk/Source/_javascript_Core/ChangeLog (194331 => 194332)


--- trunk/Source/_javascript_Core/ChangeLog	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,3 +1,15 @@
+2015-12-21  Ryan Haddad  <[email protected]>
+
+        Unreviewed, rolling out r194328.
+
+        This change appears to have caused failures in JSC tests
+
+        Reverted changeset:
+
+        "[INTL] Implement String.prototype.localeCompare in ECMA-402"
+        https://bugs.webkit.org/show_bug.cgi?id=147607
+        http://trac.webkit.org/changeset/194328
+
 2015-12-21  Filip Pizlo  <[email protected]>
 
         B3->Air lowering incorrectly copy-propagates over ZExt32's

Modified: trunk/Source/_javascript_Core/DerivedSources.make (194331 => 194332)


--- trunk/Source/_javascript_Core/DerivedSources.make	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/DerivedSources.make	2015-12-21 18:20:58 UTC (rev 194332)
@@ -98,7 +98,6 @@
     $(_javascript_Core)/builtins/ReflectObject.js \
     $(_javascript_Core)/builtins/StringConstructor.js \
     $(_javascript_Core)/builtins/StringIteratorPrototype.js \
-    $(_javascript_Core)/builtins/StringPrototype.js \
     $(_javascript_Core)/builtins/TypedArrayConstructor.js \
     $(_javascript_Core)/builtins/TypedArrayPrototype.js \
 #

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (194331 => 194332)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2015-12-21 18:20:58 UTC (rev 194332)
@@ -2056,7 +2056,7 @@
 		FE7C41961B97FC4B00F4D598 /* PingPongStackOverflowTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDA50D41B97F442009A3B4F /* PingPongStackOverflowTest.cpp */; };
 		FEA08620182B7A0400F6D851 /* Breakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861E182B7A0400F6D851 /* Breakpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		FEA08621182B7A0400F6D851 /* DebuggerPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA0861F182B7A0400F6D851 /* DebuggerPrimitives.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		FEA1E4391C213A2B00277A16 /* ValueProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEA1E4381C213A2600277A16 /* ValueProfile.cpp */; };
+		FEA1E4391C213A2B00277A16 /* ValueProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEA1E4381C213A2600277A16 /* ValueProfile.cpp */; settings = {ASSET_TAGS = (); }; };
 		FEB137571BB11EF900CD5100 /* MacroAssemblerARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB137561BB11EEE00CD5100 /* MacroAssemblerARM64.cpp */; };
 		FEB51F6C1A97B688001F921C /* Regress141809.mm in Sources */ = {isa = PBXBuildFile; fileRef = FEB51F6B1A97B688001F921C /* Regress141809.mm */; };
 		FEB58C14187B8B160098EF0B /* ErrorHandlingScope.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEB58C12187B8B160098EF0B /* ErrorHandlingScope.cpp */; };
@@ -3677,7 +3677,6 @@
 		A1D792F91B43864B004516F5 /* IntlNumberFormatConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlNumberFormatConstructor.h; sourceTree = "<group>"; };
 		A1D792FA1B43864B004516F5 /* IntlNumberFormatPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntlNumberFormatPrototype.cpp; sourceTree = "<group>"; };
 		A1D792FB1B43864B004516F5 /* IntlNumberFormatPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlNumberFormatPrototype.h; sourceTree = "<group>"; };
-		A1E0451B1C25B4B100BB663C /* StringPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = StringPrototype.js; sourceTree = "<group>"; };
 		A503FA13188E0FAF00110F14 /* _javascript_CallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _javascript_CallFrame.cpp; sourceTree = "<group>"; };
 		A503FA14188E0FAF00110F14 /* _javascript_CallFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _javascript_CallFrame.h; sourceTree = "<group>"; };
 		A503FA15188E0FB000110F14 /* JSJavaScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSJavaScriptCallFrame.cpp; sourceTree = "<group>"; };
@@ -6773,7 +6772,6 @@
 				7CF9BC5F1B65D9B1009DB1EF /* ReflectObject.js */,
 				7CF9BC601B65D9B1009DB1EF /* StringConstructor.js */,
 				7CF9BC611B65D9B1009DB1EF /* StringIteratorPrototype.js */,
-				A1E0451B1C25B4B100BB663C /* StringPrototype.js */,
 				53917E831B791CB8000EBD33 /* TypedArrayPrototype.js */,
 				534C457A1BC703DC007476A7 /* TypedArrayConstructor.js */,
 			);

Deleted: trunk/Source/_javascript_Core/builtins/StringPrototype.js (194331 => 194332)


--- trunk/Source/_javascript_Core/builtins/StringPrototype.js	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/builtins/StringPrototype.js	2015-12-21 18:20:58 UTC (rev 194332)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2015 Andy VanWagoner <[email protected]>.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-// @conditional=ENABLE(INTL)
-
-function localeCompare(that/*, locales, options */)
-{
-    "use strict";
-
-    // 13.1.1 String.prototype.localeCompare (that [, locales [, options ]]) (ECMA-402 2.0)
-    // http://ecma-international.org/publications/standards/Ecma-402.htm
-
-    // 1. Let O be RequireObjectCoercible(this value).
-    if (this === null)
-        throw new @TypeError("String.prototype.localeCompare requires that |this| not be null");
-    
-    if (this === undefined)
-        throw new @TypeError("String.prototype.localeCompare requires that |this| not be undefined");
-
-    // 2. Let S be ToString(O).
-    // 3. ReturnIfAbrupt(S).
-    var thisString = @toString(this);
-
-    // 4. Let That be ToString(that).
-    // 5. ReturnIfAbrupt(That).
-    var thatString = @toString(that);
-
-    // 6. Let collator be Construct(%Collator%, «locales, options»).
-    // 7. ReturnIfAbrupt(collator).
-    var collator = new @Collator(arguments[1], arguments[2]);
-
-    // 8. Return CompareStrings(collator, S, That).
-    return collator.compare(thisString, thatString);
-}

Modified: trunk/Source/_javascript_Core/runtime/StringPrototype.cpp (194331 => 194332)


--- trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2015-12-21 16:16:01 UTC (rev 194331)
+++ trunk/Source/_javascript_Core/runtime/StringPrototype.cpp	2015-12-21 18:20:58 UTC (rev 194332)
@@ -29,7 +29,6 @@
 #include "Error.h"
 #include "Executable.h"
 #include "IntlObject.h"
-#include "JSCBuiltins.h"
 #include "JSCInlines.h"
 #include "JSGlobalObjectFunctions.h"
 #include "JSArray.h"
@@ -131,12 +130,11 @@
     JSC_NATIVE_FUNCTION("substring", stringProtoFuncSubstring, DontEnum, 2);
     JSC_NATIVE_FUNCTION("toLowerCase", stringProtoFuncToLowerCase, DontEnum, 0);
     JSC_NATIVE_FUNCTION("toUpperCase", stringProtoFuncToUpperCase, DontEnum, 0);
+    JSC_NATIVE_FUNCTION("localeCompare", stringProtoFuncLocaleCompare, DontEnum, 1);
 #if ENABLE(INTL)
-    JSC_BUILTIN_FUNCTION("localeCompare", stringPrototypeLocaleCompareCodeGenerator, DontEnum);
     JSC_NATIVE_FUNCTION("toLocaleLowerCase", stringProtoFuncToLocaleLowerCase, DontEnum, 0);
     JSC_NATIVE_FUNCTION("toLocaleUpperCase", stringProtoFuncToLocaleUpperCase, DontEnum, 0);
 #else
-    JSC_NATIVE_FUNCTION("localeCompare", stringProtoFuncLocaleCompare, DontEnum, 1);
     JSC_NATIVE_FUNCTION("toLocaleLowerCase", stringProtoFuncToLowerCase, DontEnum, 0);
     JSC_NATIVE_FUNCTION("toLocaleUpperCase", stringProtoFuncToUpperCase, DontEnum, 0);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to