WebKit Bugzilla
Attachment 373055 Details for
Bug 199288
: Enable Intl.PluralRules and Intl.NumberFormatToParts by default
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199288-20190627150410.patch (text/plain), 8.71 KB, created by
Keith Miller
on 2019-06-27 15:04:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Keith Miller
Created:
2019-06-27 15:04:11 PDT
Size:
8.71 KB
patch
obsolete
>Subversion Revision: 246905 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index fa9ce7fa7b07c1da504a15a00dbf89f925f414ee..0bd915d178a5025ef3c52a6b6ad61eacb0c8b0bd 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-06-27 Keith Miller <keith_miller@apple.com> >+ >+ Enable Intl.PluralRules and Intl.NumberFormatToParts by default >+ https://bugs.webkit.org/show_bug.cgi?id=199288 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ These features have been around for a while. We should turn them on by default. >+ >+ * runtime/IntlNumberFormatPrototype.cpp: >+ (JSC::IntlNumberFormatPrototype::finishCreation): >+ * runtime/IntlObject.cpp: >+ (JSC::IntlObject::finishCreation): Deleted. >+ * runtime/IntlObject.h: >+ * runtime/Options.h: >+ > 2019-06-27 Beth Dakin <bdakin@apple.com> > > Upstream use of MACCATALYST >diff --git a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >index 679fe68cc7f3f9d6167a42ce5dc6287a61798132..f0cb4571f3a27aae9af4cb0513effa0da1685480 100644 >--- a/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp >@@ -81,8 +81,7 @@ void IntlNumberFormatPrototype::finishCreation(VM& vm, JSGlobalObject* globalObj > { > Base::finishCreation(vm); > #if HAVE(ICU_FORMAT_DOUBLE_FOR_FIELDS) >- if (Options::useIntlNumberFormatToParts()) >- JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->formatToParts, IntlNumberFormatPrototypeFuncFormatToParts, static_cast<unsigned>(PropertyAttribute::DontEnum), 1); >+ JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->formatToParts, IntlNumberFormatPrototypeFuncFormatToParts, static_cast<unsigned>(PropertyAttribute::DontEnum), 1); > #else > UNUSED_PARAM(globalObject); > #endif >diff --git a/Source/JavaScriptCore/runtime/IntlObject.cpp b/Source/JavaScriptCore/runtime/IntlObject.cpp >index f89e523feb77273de8f327a454f9de9d48638a58..8ccb7e0b96ba0cae5e2b9e0fdd42ba97000d3285 100644 >--- a/Source/JavaScriptCore/runtime/IntlObject.cpp >+++ b/Source/JavaScriptCore/runtime/IntlObject.cpp >@@ -99,6 +99,7 @@ namespace JSC { > Collator createCollatorConstructor DontEnum|PropertyCallback > DateTimeFormat createDateTimeFormatConstructor DontEnum|PropertyCallback > NumberFormat createNumberFormatConstructor DontEnum|PropertyCallback >+ PluralRules createPluralRulesConstructor DontEnum|PropertyCallback > @end > */ > >@@ -122,17 +123,6 @@ IntlObject* IntlObject::create(VM& vm, Structure* structure) > return object; > } > >-void IntlObject::finishCreation(VM& vm) >-{ >- Base::finishCreation(vm); >- ASSERT(inherits(vm, info())); >- >- // Constructor Properties of the Intl Object >- // https://tc39.github.io/ecma402/#sec-constructor-properties-of-the-intl-object >- if (Options::useIntlPluralRules()) >- putDirectWithoutTransition(vm, vm.propertyNames->PluralRules, createPluralRulesConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum)); >-} >- > Structure* IntlObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype) > { > return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info()); >diff --git a/Source/JavaScriptCore/runtime/IntlObject.h b/Source/JavaScriptCore/runtime/IntlObject.h >index 9bfd08130a87607b9ef8b6bef6be1ce90a78e8f0..80d4f51516bcbb4510cf310a962c94954c7a85ec 100644 >--- a/Source/JavaScriptCore/runtime/IntlObject.h >+++ b/Source/JavaScriptCore/runtime/IntlObject.h >@@ -51,9 +51,6 @@ public: > > DECLARE_INFO; > >-protected: >- void finishCreation(VM&); >- > private: > IntlObject(VM&, Structure*); > }; >diff --git a/Source/JavaScriptCore/runtime/Options.h b/Source/JavaScriptCore/runtime/Options.h >index c42a341fd8ddbb14fb3e6277562a45aa3d06da04..9321c5e552149d0302b0b633d034f66f9fe22b88 100644 >--- a/Source/JavaScriptCore/runtime/Options.h >+++ b/Source/JavaScriptCore/runtime/Options.h >@@ -106,18 +106,6 @@ typedef const char* optionString; > #define MAXIMUM_NUMBER_OF_FTL_COMPILER_THREADS 8 > #endif > >-#if ENABLE(EXPERIMENTAL_FEATURES) >-constexpr bool enableIntlNumberFormatToParts = true; >-#else >-constexpr bool enableIntlNumberFormatToParts = false; >-#endif >- >-#if ENABLE(EXPERIMENTAL_FEATURES) >-constexpr bool enableIntlPluralRules = true; >-#else >-constexpr bool enableIntlPluralRules = false; >-#endif >- > #if ENABLE(WEBASSEMBLY_STREAMING_API) > constexpr bool enableWebAssemblyStreamingApi = true; > #else >@@ -504,8 +492,6 @@ constexpr bool enableWebAssemblyStreamingApi = false; > v(bool, useEagerWebAssemblyModuleHashing, false, Normal, "Unnamed WebAssembly modules are identified in backtraces through their hash, if available.") \ > v(bool, useWebAssemblyReferences, true, Normal, "Allow types from the wasm references spec.") \ > v(bool, useBigInt, false, Normal, "If true, we will enable BigInt support.") \ >- v(bool, useIntlNumberFormatToParts, enableIntlNumberFormatToParts, Normal, "If true, we will enable Intl.NumberFormat.prototype.formatToParts") \ >- v(bool, useIntlPluralRules, enableIntlPluralRules, Normal, "If true, we will enable Intl.PluralRules.") \ > v(bool, useArrayAllocationProfiling, true, Normal, "If true, we will use our normal array allocation profiling. If false, the allocation profile will always claim to be undecided.") \ > v(bool, forcePolyProto, false, Normal, "If true, create_this will always create an object with a poly proto structure.") \ > v(bool, forceMiniVMMode, false, Normal, "If true, it will force mini VM mode on.") \ >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index af61b1137d8ab62ba7c32f8b08f577ecb7f384be..9f5eb14f642c6b0dba517ae94cb738a5482443b5 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2019-06-27 Keith Miller <keith_miller@apple.com> >+ >+ Enable Intl.PluralRules and Intl.NumberFormatToParts by default >+ https://bugs.webkit.org/show_bug.cgi?id=199288 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Remove runtime flag from testing. >+ >+ * js/intl-numberformat-format-to-parts.html: >+ * js/intl-pluralrules.html: >+ * js/script-tests/intl-numberformat-format-to-parts.js: >+ * js/script-tests/intl-pluralrules.js: >+ > 2019-06-27 Russell Epstein <russell_e@apple.com> > > Layout Test fast/parser/parser-yield-timing.html was flaky due to strict tolerance, increased tolerance. >diff --git a/LayoutTests/js/intl-numberformat-format-to-parts.html b/LayoutTests/js/intl-numberformat-format-to-parts.html >index b3781f29ee59cd7b518a82ec63372155a0403a3e..2c4930747452c89799d947610139a942d57946f3 100644 >--- a/LayoutTests/js/intl-numberformat-format-to-parts.html >+++ b/LayoutTests/js/intl-numberformat-format-to-parts.html >@@ -1,4 +1,4 @@ >-<!doctype html><!-- webkit-test-runner [ jscOptions=--useIntlNumberFormatToParts=true ] --> >+<!doctype html> > <html> > <head> > <meta charset="utf-8"> >diff --git a/LayoutTests/js/intl-pluralrules.html b/LayoutTests/js/intl-pluralrules.html >index f326dbff5bd6d7e91546d9d874cc0ae956adfe18..b9584e90ea1353d261a64b34f2ecdb8db4d2f7ef 100644 >--- a/LayoutTests/js/intl-pluralrules.html >+++ b/LayoutTests/js/intl-pluralrules.html >@@ -1,4 +1,4 @@ >-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true ] --> >+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> > <html> > <head> > <meta charset="utf-8"> >diff --git a/LayoutTests/js/script-tests/intl-numberformat-format-to-parts.js b/LayoutTests/js/script-tests/intl-numberformat-format-to-parts.js >index 430c73b92b8ce2079a185e056f88653e5cec2c2c..a66a1c670413e300a343e504db7cc145bbd3f9f7 100644 >--- a/LayoutTests/js/script-tests/intl-numberformat-format-to-parts.js >+++ b/LayoutTests/js/script-tests/intl-numberformat-format-to-parts.js >@@ -1,5 +1,4 @@ > //@ skip if $hostOS == "windows" or $hostOS == "darwin" or $hostOS == "linux" >-//@ requireOptions("--useIntlNumberFormatToParts=true") > > description("This test checks the behavior of Intl.NumberFormat.prototype.formatToParts as described in the ECMAScript Internationalization API Specification."); > >diff --git a/LayoutTests/js/script-tests/intl-pluralrules.js b/LayoutTests/js/script-tests/intl-pluralrules.js >index c2e8ca9157697ab602220130cc22cc87f5b67cb1..2e087b8665c32ab2b0878993fc18443abdf45b34 100644 >--- a/LayoutTests/js/script-tests/intl-pluralrules.js >+++ b/LayoutTests/js/script-tests/intl-pluralrules.js >@@ -1,5 +1,4 @@ > //@ skip if $hostOS == "windows" or $hostOS == "linux" >-//@ requireOptions("--useIntlPluralRules=true") > > description("This test checks the behavior of Intl.PluralRules as described in the ECMAScript Internationalization API Specification."); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199288
: 373055