Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (260264 => 260265)
--- trunk/Source/_javascript_Core/ChangeLog 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-04-17 17:57:11 UTC (rev 260265)
@@ -1,3 +1,37 @@
+2020-04-17 Ross Kirsling <ross.kirsl...@sony.com>
+
+ Clean up some Intl classes following the ICU upgrade
+ https://bugs.webkit.org/show_bug.cgi?id=210637
+
+ Reviewed by Yusuke Suzuki.
+
+ In r259606, I removed the compile-time guards for {DateTimeFormat, NumberFormat}.prototype.formatToParts,
+ but I forgot to move the method setup back to the lookup table.
+
+ This patch addresses that and prunes various other unnecessary includes and forward declarations.
+
+ * runtime/IntlCollator.h:
+ * runtime/IntlCollatorConstructor.h:
+ * runtime/IntlDateTimeFormat.h:
+ * runtime/IntlDateTimeFormatConstructor.h:
+ * runtime/IntlDateTimeFormatPrototype.cpp:
+ (JSC::IntlDateTimeFormatPrototype::create):
+ (JSC::IntlDateTimeFormatPrototype::finishCreation):
+ * runtime/IntlDateTimeFormatPrototype.h:
+ * runtime/IntlNumberFormat.h:
+ * runtime/IntlNumberFormatConstructor.h:
+ * runtime/IntlNumberFormatPrototype.cpp:
+ (JSC::IntlNumberFormatPrototype::create):
+ (JSC::IntlNumberFormatPrototype::finishCreation):
+ * runtime/IntlNumberFormatPrototype.h:
+ * runtime/IntlObject.h:
+ * runtime/IntlPluralRules.h:
+ * runtime/IntlPluralRulesConstructor.h:
+ * runtime/IntlPluralRulesPrototype.cpp:
+ (JSC::IntlPluralRulesPrototype::create):
+ (JSC::IntlPluralRulesPrototype::finishCreation):
+ * runtime/IntlPluralRulesPrototype.h:
+
2020-04-17 Yusuke Suzuki <ysuz...@apple.com>
[JSC] Map/Set iterator creation functions should fail with BadType etc. before executing insertChecks
Modified: trunk/Source/_javascript_Core/runtime/IntlCollator.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlCollator.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlCollator.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,7 +31,6 @@
namespace JSC {
-class IntlCollatorConstructor;
class JSBoundFunction;
class IntlCollator final : public JSNonFinalObject {
Modified: trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,7 +31,6 @@
namespace JSC {
-class IntlCollator;
class IntlCollatorPrototype;
class IntlCollatorConstructor final : public InternalFunction {
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormat.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormat.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormat.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -27,11 +27,9 @@
#include "JSObject.h"
#include <unicode/udat.h>
-#include <unicode/uvernum.h>
namespace JSC {
-class IntlDateTimeFormatConstructor;
class JSBoundFunction;
class IntlDateTimeFormat final : public JSNonFinalObject {
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,7 +31,6 @@
namespace JSC {
-class IntlDateTimeFormat;
class IntlDateTimeFormatPrototype;
class IntlDateTimeFormatConstructor final : public InternalFunction {
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.cpp 2020-04-17 17:57:11 UTC (rev 260265)
@@ -54,14 +54,15 @@
/* Source for IntlDateTimeFormatPrototype.lut.h
@begin dateTimeFormatPrototypeTable
format IntlDateTimeFormatPrototypeGetterFormat DontEnum|Accessor
+ formatToParts IntlDateTimeFormatPrototypeFuncFormatToParts DontEnum|Function 1
resolvedOptions IntlDateTimeFormatPrototypeFuncResolvedOptions DontEnum|Function 0
@end
*/
-IntlDateTimeFormatPrototype* IntlDateTimeFormatPrototype::create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
+IntlDateTimeFormatPrototype* IntlDateTimeFormatPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
{
IntlDateTimeFormatPrototype* object = new (NotNull, allocateCell<IntlDateTimeFormatPrototype>(vm.heap)) IntlDateTimeFormatPrototype(vm, structure);
- object->finishCreation(vm, globalObject, structure);
+ object->finishCreation(vm);
return object;
}
@@ -75,11 +76,9 @@
{
}
-void IntlDateTimeFormatPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, Structure*)
+void IntlDateTimeFormatPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
- JSFunction* formatToPartsFunction = JSFunction::create(vm, globalObject, 1, vm.propertyNames->formatToParts.string(), IntlDateTimeFormatPrototypeFuncFormatToParts);
- putDirectWithoutTransition(vm, vm.propertyNames->formatToParts, formatToPartsFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsNontrivialString(vm, "Object"_s), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
}
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatPrototype.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -48,7 +48,7 @@
DECLARE_INFO;
protected:
- void finishCreation(VM&, JSGlobalObject*, Structure*);
+ void finishCreation(VM&);
private:
IntlDateTimeFormatPrototype(VM&, Structure*);
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormat.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormat.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormat.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -27,11 +27,9 @@
#include "JSObject.h"
#include <unicode/unum.h>
-#include <unicode/uvernum.h>
namespace JSC {
-class IntlNumberFormatConstructor;
class JSBoundFunction;
class IntlNumberFormat final : public JSNonFinalObject {
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,7 +31,6 @@
namespace JSC {
-class IntlNumberFormat;
class IntlNumberFormatPrototype;
class IntlNumberFormatConstructor final : public InternalFunction {
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.cpp 2020-04-17 17:57:11 UTC (rev 260265)
@@ -52,14 +52,15 @@
/* Source for IntlNumberFormatPrototype.lut.h
@begin numberFormatPrototypeTable
format IntlNumberFormatPrototypeGetterFormat DontEnum|Accessor
+ formatToParts IntlNumberFormatPrototypeFuncFormatToParts DontEnum|Function 1
resolvedOptions IntlNumberFormatPrototypeFuncResolvedOptions DontEnum|Function 0
@end
*/
-IntlNumberFormatPrototype* IntlNumberFormatPrototype::create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
+IntlNumberFormatPrototype* IntlNumberFormatPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
{
IntlNumberFormatPrototype* object = new (NotNull, allocateCell<IntlNumberFormatPrototype>(vm.heap)) IntlNumberFormatPrototype(vm, structure);
- object->finishCreation(vm, globalObject, structure);
+ object->finishCreation(vm);
return object;
}
@@ -73,10 +74,9 @@
{
}
-void IntlNumberFormatPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, Structure*)
+void IntlNumberFormatPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->formatToParts, IntlNumberFormatPrototypeFuncFormatToParts, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsNontrivialString(vm, "Object"_s), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
}
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatPrototype.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -48,7 +48,7 @@
DECLARE_INFO;
protected:
- void finishCreation(VM&, JSGlobalObject*, Structure*);
+ void finishCreation(VM&);
private:
IntlNumberFormatPrototype(VM&, Structure*);
Modified: trunk/Source/_javascript_Core/runtime/IntlObject.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlObject.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlObject.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,15 +31,6 @@
namespace JSC {
-class IntlCollatorConstructor;
-class IntlCollatorPrototype;
-class IntlDateTimeFormatConstructor;
-class IntlDateTimeFormatPrototype;
-class IntlNumberFormatConstructor;
-class IntlNumberFormatPrototype;
-class IntlPluralRulesConstructor;
-class IntlPluralRulesPrototype;
-
class IntlObject final : public JSNonFinalObject {
public:
using Base = JSNonFinalObject;
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRules.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRules.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRules.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -28,13 +28,9 @@
#include "JSObject.h"
#include <unicode/unum.h>
#include <unicode/upluralrules.h>
-#include <unicode/uvernum.h>
namespace JSC {
-class IntlPluralRulesConstructor;
-class JSBoundFunction;
-
class IntlPluralRules final : public JSNonFinalObject {
public:
using Base = JSNonFinalObject;
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -31,7 +31,6 @@
namespace JSC {
-class IntlPluralRules;
class IntlPluralRulesPrototype;
class IntlPluralRulesConstructor final : public InternalFunction {
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.cpp 2020-04-17 17:57:11 UTC (rev 260265)
@@ -55,7 +55,7 @@
IntlPluralRulesPrototype* IntlPluralRulesPrototype::create(VM& vm, JSGlobalObject*, Structure* structure)
{
IntlPluralRulesPrototype* object = new (NotNull, allocateCell<IntlPluralRulesPrototype>(vm.heap)) IntlPluralRulesPrototype(vm, structure);
- object->finishCreation(vm, structure);
+ object->finishCreation(vm);
return object;
}
@@ -69,7 +69,7 @@
{
}
-void IntlPluralRulesPrototype::finishCreation(VM& vm, Structure*)
+void IntlPluralRulesPrototype::finishCreation(VM& vm)
{
Base::finishCreation(vm);
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.h (260264 => 260265)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.h 2020-04-17 17:56:07 UTC (rev 260264)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesPrototype.h 2020-04-17 17:57:11 UTC (rev 260265)
@@ -48,7 +48,7 @@
DECLARE_INFO;
protected:
- void finishCreation(VM&, Structure*);
+ void finishCreation(VM&);
private:
IntlPluralRulesPrototype(VM&, Structure*);