Title: [240273] trunk/Source/_javascript_Core
Revision
240273
Author
[email protected]
Date
2019-01-22 12:33:37 -0800 (Tue, 22 Jan 2019)

Log Message

[JSC] Intl constructors should fit in sizeof(InternalFunction)
https://bugs.webkit.org/show_bug.cgi?id=193661

Reviewed by Mark Lam.

Previously all the Intl constructors have their own subspace. This is because these constructors have different size from InternalFunction.
But it is too costly approach in terms of the memory usage since these constructors are only one per JSGlobalObject. This patch attempts to
reduce the memory size consumed by these Intl objects by holding instance structures in IntlObject instead of in each Intl constructors.
So that we can make sizeof(Intl constructors) == sizeof(InternalFunction) and drop costly subspaces. Since this patch drops subspaces in VM,
it also significantly reduces the sizeof(VM), from 76696 to 74680.

This patch also includes the preparation for making Intl properties lazy. But currently it is not possible since @Collator reference exists
in builtin code.

* CMakeLists.txt:
* DerivedSources.make:
* runtime/IntlCollatorConstructor.cpp:
(JSC::IntlCollatorConstructor::create):
(JSC::IntlCollatorConstructor::finishCreation):
(JSC::constructIntlCollator):
(JSC::callIntlCollator):
(JSC::IntlCollatorConstructor::visitChildren): Deleted.
* runtime/IntlCollatorConstructor.h:
* runtime/IntlDateTimeFormatConstructor.cpp:
(JSC::IntlDateTimeFormatConstructor::create):
(JSC::IntlDateTimeFormatConstructor::finishCreation):
(JSC::constructIntlDateTimeFormat):
(JSC::callIntlDateTimeFormat):
(JSC::IntlDateTimeFormatConstructor::visitChildren): Deleted.
* runtime/IntlDateTimeFormatConstructor.h:
* runtime/IntlNumberFormatConstructor.cpp:
(JSC::IntlNumberFormatConstructor::create):
(JSC::IntlNumberFormatConstructor::finishCreation):
(JSC::constructIntlNumberFormat):
(JSC::callIntlNumberFormat):
(JSC::IntlNumberFormatConstructor::visitChildren): Deleted.
* runtime/IntlNumberFormatConstructor.h:
* runtime/IntlObject.cpp:
(JSC::createCollatorConstructor):
(JSC::createNumberFormatConstructor):
(JSC::createDateTimeFormatConstructor):
(JSC::createPluralRulesConstructor):
(JSC::IntlObject::create):
(JSC::IntlObject::finishCreation):
(JSC::IntlObject::visitChildren):
* runtime/IntlObject.h:
* runtime/IntlPluralRulesConstructor.cpp:
(JSC::IntlPluralRulesConstructor::create):
(JSC::IntlPluralRulesConstructor::finishCreation):
(JSC::constructIntlPluralRules):
(JSC::IntlPluralRulesConstructor::visitChildren): Deleted.
* runtime/IntlPluralRulesConstructor.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::intlObject const):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (240272 => 240273)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2019-01-22 20:33:37 UTC (rev 240273)
@@ -75,6 +75,7 @@
     runtime/IntlDateTimeFormatPrototype.cpp
     runtime/IntlNumberFormatConstructor.cpp
     runtime/IntlNumberFormatPrototype.cpp
+    runtime/IntlObject.cpp
     runtime/IntlPluralRulesConstructor.cpp
     runtime/IntlPluralRulesPrototype.cpp
     runtime/JSDataViewPrototype.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (240272 => 240273)


--- trunk/Source/_javascript_Core/ChangeLog	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-01-22 20:33:37 UTC (rev 240273)
@@ -1,3 +1,66 @@
+2019-01-22  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Intl constructors should fit in sizeof(InternalFunction)
+        https://bugs.webkit.org/show_bug.cgi?id=193661
+
+        Reviewed by Mark Lam.
+
+        Previously all the Intl constructors have their own subspace. This is because these constructors have different size from InternalFunction.
+        But it is too costly approach in terms of the memory usage since these constructors are only one per JSGlobalObject. This patch attempts to
+        reduce the memory size consumed by these Intl objects by holding instance structures in IntlObject instead of in each Intl constructors.
+        So that we can make sizeof(Intl constructors) == sizeof(InternalFunction) and drop costly subspaces. Since this patch drops subspaces in VM,
+        it also significantly reduces the sizeof(VM), from 76696 to 74680.
+
+        This patch also includes the preparation for making Intl properties lazy. But currently it is not possible since @Collator reference exists
+        in builtin code.
+
+        * CMakeLists.txt:
+        * DerivedSources.make:
+        * runtime/IntlCollatorConstructor.cpp:
+        (JSC::IntlCollatorConstructor::create):
+        (JSC::IntlCollatorConstructor::finishCreation):
+        (JSC::constructIntlCollator):
+        (JSC::callIntlCollator):
+        (JSC::IntlCollatorConstructor::visitChildren): Deleted.
+        * runtime/IntlCollatorConstructor.h:
+        * runtime/IntlDateTimeFormatConstructor.cpp:
+        (JSC::IntlDateTimeFormatConstructor::create):
+        (JSC::IntlDateTimeFormatConstructor::finishCreation):
+        (JSC::constructIntlDateTimeFormat):
+        (JSC::callIntlDateTimeFormat):
+        (JSC::IntlDateTimeFormatConstructor::visitChildren): Deleted.
+        * runtime/IntlDateTimeFormatConstructor.h:
+        * runtime/IntlNumberFormatConstructor.cpp:
+        (JSC::IntlNumberFormatConstructor::create):
+        (JSC::IntlNumberFormatConstructor::finishCreation):
+        (JSC::constructIntlNumberFormat):
+        (JSC::callIntlNumberFormat):
+        (JSC::IntlNumberFormatConstructor::visitChildren): Deleted.
+        * runtime/IntlNumberFormatConstructor.h:
+        * runtime/IntlObject.cpp:
+        (JSC::createCollatorConstructor):
+        (JSC::createNumberFormatConstructor):
+        (JSC::createDateTimeFormatConstructor):
+        (JSC::createPluralRulesConstructor):
+        (JSC::IntlObject::create):
+        (JSC::IntlObject::finishCreation):
+        (JSC::IntlObject::visitChildren):
+        * runtime/IntlObject.h:
+        * runtime/IntlPluralRulesConstructor.cpp:
+        (JSC::IntlPluralRulesConstructor::create):
+        (JSC::IntlPluralRulesConstructor::finishCreation):
+        (JSC::constructIntlPluralRules):
+        (JSC::IntlPluralRulesConstructor::visitChildren): Deleted.
+        * runtime/IntlPluralRulesConstructor.h:
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::intlObject const):
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        * runtime/VM.h:
+
 2019-01-22  Saam Barati  <[email protected]>
 
         Unreviewed. Rollout r240223. It regressed JetStream2 by 1%.

Modified: trunk/Source/_javascript_Core/DerivedSources.make (240272 => 240273)


--- trunk/Source/_javascript_Core/DerivedSources.make	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/DerivedSources.make	2019-01-22 20:33:37 UTC (rev 240273)
@@ -151,6 +151,7 @@
     IntlDateTimeFormatPrototype.lut.h \
     IntlNumberFormatConstructor.lut.h \
     IntlNumberFormatPrototype.lut.h \
+    IntlObject.lut.h \
     IntlPluralRulesConstructor.lut.h \
     IntlPluralRulesPrototype.lut.h \
     JSDataViewPrototype.lut.h \

Modified: trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -60,10 +60,10 @@
 @end
 */
 
-IntlCollatorConstructor* IntlCollatorConstructor::create(VM& vm, Structure* structure, IntlCollatorPrototype* collatorPrototype, Structure* collatorStructure)
+IntlCollatorConstructor* IntlCollatorConstructor::create(VM& vm, Structure* structure, IntlCollatorPrototype* collatorPrototype)
 {
     IntlCollatorConstructor* constructor = new (NotNull, allocateCell<IntlCollatorConstructor>(vm.heap)) IntlCollatorConstructor(vm, structure);
-    constructor->finishCreation(vm, collatorPrototype, collatorStructure);
+    constructor->finishCreation(vm, collatorPrototype);
     return constructor;
 }
 
@@ -77,13 +77,12 @@
 {
 }
 
-void IntlCollatorConstructor::finishCreation(VM& vm, IntlCollatorPrototype* collatorPrototype, Structure* collatorStructure)
+void IntlCollatorConstructor::finishCreation(VM& vm, IntlCollatorPrototype* collatorPrototype)
 {
     Base::finishCreation(vm, "Collator"_s);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, collatorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     collatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    m_collatorStructure.set(vm, this, collatorStructure);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructIntlCollator(ExecState* state)
@@ -94,7 +93,7 @@
     // 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.
     // 2. Let collator be OrdinaryCreateFromConstructor(newTarget, %CollatorPrototype%).
     // 3. ReturnIfAbrupt(collator).
-    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlCollatorConstructor*>(state->jsCallee())->collatorStructure());
+    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlCollatorConstructor*>(state->jsCallee())->collatorStructure(vm));
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     IntlCollator* collator = IntlCollator::create(vm, structure);
     ASSERT(collator);
@@ -119,7 +118,7 @@
 
     // 2. Let collator be OrdinaryCreateFromConstructor(newTarget, %CollatorPrototype%).
     // 3. ReturnIfAbrupt(collator).
-    IntlCollator* collator = IntlCollator::create(vm, callee->collatorStructure());
+    IntlCollator* collator = IntlCollator::create(vm, callee->collatorStructure(vm));
     ASSERT(collator);
 
     // 4. Return InitializeCollator(collator, locales, options).
@@ -144,16 +143,6 @@
     RELEASE_AND_RETURN(scope, JSValue::encode(supportedLocales(*state, globalObject->intlCollatorAvailableLocales(), requestedLocales, state->argument(1))));
 }
 
-void IntlCollatorConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
-    IntlCollatorConstructor* thisObject = jsCast<IntlCollatorConstructor*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-
-    Base::visitChildren(thisObject, visitor);
-
-    visitor.append(thisObject->m_collatorStructure);
-}
-
 } // namespace JSC
 
 #endif // ENABLE(INTL)

Modified: trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -29,6 +29,7 @@
 #if ENABLE(INTL)
 
 #include "InternalFunction.h"
+#include "IntlObject.h"
 
 namespace JSC {
 
@@ -40,27 +41,18 @@
     typedef InternalFunction Base;
     static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
 
-    template<typename CellType>
-    static IsoSubspace* subspaceFor(VM& vm)
-    {
-        return &vm.intlCollatorConstructorSpace;
-    }
-
-    static IntlCollatorConstructor* create(VM&, Structure*, IntlCollatorPrototype*, Structure*);
+    static IntlCollatorConstructor* create(VM&, Structure*, IntlCollatorPrototype*);
     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
 
     DECLARE_INFO;
 
-    Structure* collatorStructure() const { return m_collatorStructure.get(); }
+    Structure* collatorStructure(VM& vm) const { return globalObject(vm)->intlObject()->collatorStructure(); }
 
 protected:
-    void finishCreation(VM&, IntlCollatorPrototype*, Structure*);
+    void finishCreation(VM&, IntlCollatorPrototype*);
 
 private:
     IntlCollatorConstructor(VM&, Structure*);
-    static void visitChildren(JSCell*, SlotVisitor&);
-    
-    WriteBarrier<Structure> m_collatorStructure;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -57,10 +57,10 @@
 @end
 */
 
-IntlDateTimeFormatConstructor* IntlDateTimeFormatConstructor::create(VM& vm, Structure* structure, IntlDateTimeFormatPrototype* dateTimeFormatPrototype, Structure* dateTimeFormatStructure)
+IntlDateTimeFormatConstructor* IntlDateTimeFormatConstructor::create(VM& vm, Structure* structure, IntlDateTimeFormatPrototype* dateTimeFormatPrototype)
 {
     IntlDateTimeFormatConstructor* constructor = new (NotNull, allocateCell<IntlDateTimeFormatConstructor>(vm.heap)) IntlDateTimeFormatConstructor(vm, structure);
-    constructor->finishCreation(vm, dateTimeFormatPrototype, dateTimeFormatStructure);
+    constructor->finishCreation(vm, dateTimeFormatPrototype);
     return constructor;
 }
 
@@ -77,13 +77,12 @@
 {
 }
 
-void IntlDateTimeFormatConstructor::finishCreation(VM& vm, IntlDateTimeFormatPrototype* dateTimeFormatPrototype, Structure* dateTimeFormatStructure)
+void IntlDateTimeFormatConstructor::finishCreation(VM& vm, IntlDateTimeFormatPrototype* dateTimeFormatPrototype)
 {
     Base::finishCreation(vm, "DateTimeFormat"_s);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, dateTimeFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     dateTimeFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    m_dateTimeFormatStructure.set(vm, this, dateTimeFormatStructure);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructIntlDateTimeFormat(ExecState* state)
@@ -94,7 +93,7 @@
     // 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.
     // 2. Let dateTimeFormat be OrdinaryCreateFromConstructor(newTarget, %DateTimeFormatPrototype%).
     // 3. ReturnIfAbrupt(dateTimeFormat).
-    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlDateTimeFormatConstructor*>(state->jsCallee())->dateTimeFormatStructure());
+    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlDateTimeFormatConstructor*>(state->jsCallee())->dateTimeFormatStructure(vm));
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     IntlDateTimeFormat* dateTimeFormat = IntlDateTimeFormat::create(vm, structure);
     ASSERT(dateTimeFormat);
@@ -118,7 +117,7 @@
     return JSValue::encode(constructIntlInstanceWithWorkaroundForLegacyIntlConstructor<IntlDateTimeFormat>(*state, state->thisValue(), callee, [&] (VM& vm) {
         // 2. Let dateTimeFormat be OrdinaryCreateFromConstructor(newTarget, %DateTimeFormatPrototype%).
         // 3. ReturnIfAbrupt(dateTimeFormat).
-        IntlDateTimeFormat* dateTimeFormat = IntlDateTimeFormat::create(vm, callee->dateTimeFormatStructure());
+        IntlDateTimeFormat* dateTimeFormat = IntlDateTimeFormat::create(vm, callee->dateTimeFormatStructure(vm));
         ASSERT(dateTimeFormat);
 
         // 4. Return InitializeDateTimeFormat(dateTimeFormat, locales, options).
@@ -145,16 +144,6 @@
     RELEASE_AND_RETURN(scope, JSValue::encode(supportedLocales(*state, availableLocales, requestedLocales, state->argument(1))));
 }
 
-void IntlDateTimeFormatConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
-    IntlDateTimeFormatConstructor* thisObject = jsCast<IntlDateTimeFormatConstructor*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-
-    Base::visitChildren(thisObject, visitor);
-
-    visitor.append(thisObject->m_dateTimeFormatStructure);
-}
-
 } // namespace JSC
 
 #endif // ENABLE(INTL)

Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -29,6 +29,7 @@
 #if ENABLE(INTL)
 
 #include "InternalFunction.h"
+#include "IntlObject.h"
 
 namespace JSC {
 
@@ -40,27 +41,18 @@
     typedef InternalFunction Base;
     static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
 
-    template<typename CellType>
-    static IsoSubspace* subspaceFor(VM& vm)
-    {
-        return &vm.intlDateTimeFormatConstructorSpace;
-    }
-
-    static IntlDateTimeFormatConstructor* create(VM&, Structure*, IntlDateTimeFormatPrototype*, Structure*);
+    static IntlDateTimeFormatConstructor* create(VM&, Structure*, IntlDateTimeFormatPrototype*);
     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
 
     DECLARE_INFO;
 
-    Structure* dateTimeFormatStructure() const { return m_dateTimeFormatStructure.get(); }
+    Structure* dateTimeFormatStructure(VM& vm) const { return globalObject(vm)->intlObject()->dateTimeFormatStructure(); }
 
 protected:
-    void finishCreation(VM&, IntlDateTimeFormatPrototype*, Structure*);
+    void finishCreation(VM&, IntlDateTimeFormatPrototype*);
 
 private:
     IntlDateTimeFormatConstructor(VM&, Structure*);
-    static void visitChildren(JSCell*, SlotVisitor&);
-    
-    WriteBarrier<Structure> m_dateTimeFormatStructure;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -57,10 +57,10 @@
 @end
 */
 
-IntlNumberFormatConstructor* IntlNumberFormatConstructor::create(VM& vm, Structure* structure, IntlNumberFormatPrototype* numberFormatPrototype, Structure* numberFormatStructure)
+IntlNumberFormatConstructor* IntlNumberFormatConstructor::create(VM& vm, Structure* structure, IntlNumberFormatPrototype* numberFormatPrototype)
 {
     IntlNumberFormatConstructor* constructor = new (NotNull, allocateCell<IntlNumberFormatConstructor>(vm.heap)) IntlNumberFormatConstructor(vm, structure);
-    constructor->finishCreation(vm, numberFormatPrototype, numberFormatStructure);
+    constructor->finishCreation(vm, numberFormatPrototype);
     return constructor;
 }
 
@@ -77,13 +77,12 @@
 {
 }
 
-void IntlNumberFormatConstructor::finishCreation(VM& vm, IntlNumberFormatPrototype* numberFormatPrototype, Structure* numberFormatStructure)
+void IntlNumberFormatConstructor::finishCreation(VM& vm, IntlNumberFormatPrototype* numberFormatPrototype)
 {
     Base::finishCreation(vm, "NumberFormat"_s);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     numberFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    m_numberFormatStructure.set(vm, this, numberFormatStructure);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructIntlNumberFormat(ExecState* state)
@@ -94,7 +93,7 @@
     // 1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.
     // 2. Let numberFormat be OrdinaryCreateFromConstructor(newTarget, %NumberFormatPrototype%).
     // 3. ReturnIfAbrupt(numberFormat).
-    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlNumberFormatConstructor*>(state->jsCallee())->numberFormatStructure());
+    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlNumberFormatConstructor*>(state->jsCallee())->numberFormatStructure(vm));
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     IntlNumberFormat* numberFormat = IntlNumberFormat::create(vm, structure);
     ASSERT(numberFormat);
@@ -118,7 +117,7 @@
     return JSValue::encode(constructIntlInstanceWithWorkaroundForLegacyIntlConstructor<IntlNumberFormat>(*state, state->thisValue(), callee, [&] (VM& vm) {
         // 2. Let numberFormat be OrdinaryCreateFromConstructor(newTarget, %NumberFormatPrototype%).
         // 3. ReturnIfAbrupt(numberFormat).
-        IntlNumberFormat* numberFormat = IntlNumberFormat::create(vm, callee->numberFormatStructure());
+        IntlNumberFormat* numberFormat = IntlNumberFormat::create(vm, callee->numberFormatStructure(vm));
         ASSERT(numberFormat);
 
         // 4. Return InitializeNumberFormat(numberFormat, locales, options).
@@ -145,16 +144,6 @@
     RELEASE_AND_RETURN(scope, JSValue::encode(supportedLocales(*state, availableLocales, requestedLocales, state->argument(1))));
 }
 
-void IntlNumberFormatConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
-    IntlNumberFormatConstructor* thisObject = jsCast<IntlNumberFormatConstructor*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-
-    Base::visitChildren(thisObject, visitor);
-
-    visitor.append(thisObject->m_numberFormatStructure);
-}
-
 } // namespace JSC
 
 #endif // ENABLE(INTL)

Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -29,6 +29,7 @@
 #if ENABLE(INTL)
 
 #include "InternalFunction.h"
+#include "IntlObject.h"
 
 namespace JSC {
 
@@ -40,27 +41,18 @@
     typedef InternalFunction Base;
     static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
 
-    template<typename CellType>
-    static IsoSubspace* subspaceFor(VM& vm)
-    {
-        return &vm.intlNumberFormatConstructorSpace;
-    }
-
-    static IntlNumberFormatConstructor* create(VM&, Structure*, IntlNumberFormatPrototype*, Structure*);
+    static IntlNumberFormatConstructor* create(VM&, Structure*, IntlNumberFormatPrototype*);
     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
 
     DECLARE_INFO;
 
-    Structure* numberFormatStructure() const { return m_numberFormatStructure.get(); }
+    Structure* numberFormatStructure(VM& vm) const { return globalObject(vm)->intlObject()->numberFormatStructure(); }
 
 protected:
-    void finishCreation(VM&, IntlNumberFormatPrototype*, Structure*);
+    void finishCreation(VM&, IntlNumberFormatPrototype*);
 
 private:
     IntlNumberFormatConstructor(VM&, Structure*);
-    static void visitChildren(JSCell*, SlotVisitor&);
-    
-    WriteBarrier<Structure> m_numberFormatStructure;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/IntlObject.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlObject.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlObject.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -47,6 +47,7 @@
 #include "IntlPluralRulesPrototype.h"
 #include "JSCInlines.h"
 #include "JSCJSValueInlines.h"
+#include "LazyPropertyInlines.h"
 #include "Lookup.h"
 #include "ObjectPrototype.h"
 #include "Options.h"
@@ -63,10 +64,46 @@
 
 static EncodedJSValue JSC_HOST_CALL intlObjectFuncGetCanonicalLocales(ExecState*);
 
+static JSValue createCollatorConstructor(VM& vm, JSObject* object)
+{
+    IntlObject* intlObject = jsCast<IntlObject*>(object);
+    JSGlobalObject* globalObject = intlObject->globalObject(vm);
+    return IntlCollatorConstructor::create(vm, IntlCollatorConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<IntlCollatorPrototype*>(intlObject->collatorStructure()->storedPrototypeObject()));
 }
 
+static JSValue createNumberFormatConstructor(VM& vm, JSObject* object)
+{
+    IntlObject* intlObject = jsCast<IntlObject*>(object);
+    JSGlobalObject* globalObject = intlObject->globalObject(vm);
+    return IntlNumberFormatConstructor::create(vm, IntlNumberFormatConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<IntlNumberFormatPrototype*>(intlObject->numberFormatStructure()->storedPrototypeObject()));
+}
+
+static JSValue createDateTimeFormatConstructor(VM& vm, JSObject* object)
+{
+    IntlObject* intlObject = jsCast<IntlObject*>(object);
+    JSGlobalObject* globalObject = intlObject->globalObject(vm);
+    return IntlDateTimeFormatConstructor::create(vm, IntlDateTimeFormatConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<IntlDateTimeFormatPrototype*>(intlObject->dateTimeFormatStructure()->storedPrototypeObject()));
+}
+
+static JSValue createPluralRulesConstructor(VM& vm, JSObject* object)
+{
+    IntlObject* intlObject = jsCast<IntlObject*>(object);
+    JSGlobalObject* globalObject = intlObject->globalObject(vm);
+    return IntlPluralRulesConstructor::create(vm, IntlPluralRulesConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), jsCast<IntlPluralRulesPrototype*>(intlObject->pluralRulesStructure()->storedPrototypeObject()));
+}
+
+}
+
+#include "IntlObject.lut.h"
+
 namespace JSC {
 
+/* Source for IntlObject.lut.h
+@begin intlObjectTable
+  getCanonicalLocales   intlObjectFuncGetCanonicalLocales            DontEnum|Function 1
+@end
+*/
+
 struct MatcherResult {
     String locale;
     String extension;
@@ -73,7 +110,7 @@
     size_t extensionIndex { 0 };
 };
 
-const ClassInfo IntlObject::s_info = { "Object", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(IntlObject) };
+const ClassInfo IntlObject::s_info = { "Object", &Base::s_info, &intlObjectTable, nullptr, CREATE_METHOD_TABLE(IntlObject) };
 
 IntlObject::IntlObject(VM& vm, Structure* structure)
     : JSNonFinalObject(vm, structure)
@@ -80,49 +117,51 @@
 {
 }
 
-IntlObject* IntlObject::create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
+IntlObject* IntlObject::create(VM& vm, Structure* structure)
 {
     IntlObject* object = new (NotNull, allocateCell<IntlObject>(vm.heap)) IntlObject(vm, structure);
-    object->finishCreation(vm, globalObject);
+    object->finishCreation(vm);
     return object;
 }
 
-void IntlObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
+void IntlObject::finishCreation(VM& vm)
 {
     Base::finishCreation(vm);
     ASSERT(inherits(vm, info()));
 
-    // Set up Collator.
-    IntlCollatorPrototype* collatorPrototype = IntlCollatorPrototype::create(vm, globalObject, IntlCollatorPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
-    Structure* collatorStructure = IntlCollator::createStructure(vm, globalObject, collatorPrototype);
-    IntlCollatorConstructor* collatorConstructor = IntlCollatorConstructor::create(vm, IntlCollatorConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), collatorPrototype, collatorStructure);
+    m_collatorStructure.initLater(
+        [] (const LazyProperty<IntlObject, Structure>::Initializer& init) {
+            JSGlobalObject* globalObject = jsCast<IntlObject*>(init.owner)->globalObject(init.vm);
+            IntlCollatorPrototype* collatorPrototype = IntlCollatorPrototype::create(init.vm, globalObject, IntlCollatorPrototype::createStructure(init.vm, globalObject, globalObject->objectPrototype()));
+            init.set(IntlCollator::createStructure(init.vm, globalObject, collatorPrototype));
+        });
+    m_numberFormatStructure.initLater(
+        [] (const LazyProperty<IntlObject, Structure>::Initializer& init) {
+            JSGlobalObject* globalObject = jsCast<IntlObject*>(init.owner)->globalObject(init.vm);
+            IntlNumberFormatPrototype* numberFormatPrototype = IntlNumberFormatPrototype::create(init.vm, globalObject, IntlNumberFormatPrototype::createStructure(init.vm, globalObject, globalObject->objectPrototype()));
+            init.set(IntlNumberFormat::createStructure(init.vm, globalObject, numberFormatPrototype));
+        });
+    m_dateTimeFormatStructure.initLater(
+        [] (const LazyProperty<IntlObject, Structure>::Initializer& init) {
+            JSGlobalObject* globalObject = jsCast<IntlObject*>(init.owner)->globalObject(init.vm);
+            IntlDateTimeFormatPrototype* dateTimeFormatPrototype = IntlDateTimeFormatPrototype::create(init.vm, globalObject, IntlDateTimeFormatPrototype::createStructure(init.vm, globalObject, globalObject->objectPrototype()));
+            init.set(IntlDateTimeFormat::createStructure(init.vm, globalObject, dateTimeFormatPrototype));
+        });
+    m_pluralRulesStructure.initLater(
+        [] (const LazyProperty<IntlObject, Structure>::Initializer& init) {
+            JSGlobalObject* globalObject = jsCast<IntlObject*>(init.owner)->globalObject(init.vm);
+            IntlPluralRulesPrototype* pluralRulesPrototype = IntlPluralRulesPrototype::create(init.vm, globalObject, IntlPluralRulesPrototype::createStructure(init.vm, globalObject, globalObject->objectPrototype()));
+            init.set(IntlPluralRules::createStructure(init.vm, globalObject, pluralRulesPrototype));
+        });
 
-    // Set up NumberFormat.
-    IntlNumberFormatPrototype* numberFormatPrototype = IntlNumberFormatPrototype::create(vm, globalObject, IntlNumberFormatPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
-    Structure* numberFormatStructure = IntlNumberFormat::createStructure(vm, globalObject, numberFormatPrototype);
-    IntlNumberFormatConstructor* numberFormatConstructor = IntlNumberFormatConstructor::create(vm, IntlNumberFormatConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), numberFormatPrototype, numberFormatStructure);
+    putDirectWithoutTransition(vm, vm.propertyNames->Collator, createCollatorConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
+    putDirectWithoutTransition(vm, vm.propertyNames->NumberFormat, createNumberFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
+    putDirectWithoutTransition(vm, vm.propertyNames->DateTimeFormat, createDateTimeFormatConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
 
-    // Set up DateTimeFormat.
-    IntlDateTimeFormatPrototype* dateTimeFormatPrototype = IntlDateTimeFormatPrototype::create(vm, globalObject, IntlDateTimeFormatPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
-    Structure* dateTimeFormatStructure = IntlDateTimeFormat::createStructure(vm, globalObject, dateTimeFormatPrototype);
-    IntlDateTimeFormatConstructor* dateTimeFormatConstructor = IntlDateTimeFormatConstructor::create(vm, IntlDateTimeFormatConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), dateTimeFormatPrototype, dateTimeFormatStructure);
-
-    // Set up PluralRules.
-    IntlPluralRulesPrototype* pluralRulesPrototype = IntlPluralRulesPrototype::create(vm, globalObject, IntlPluralRulesPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
-    Structure* pluralRulesStructure = IntlPluralRules::createStructure(vm, globalObject, pluralRulesPrototype);
-    IntlPluralRulesConstructor* pluralRulesConstructor = IntlPluralRulesConstructor::create(vm, IntlPluralRulesConstructor::createStructure(vm, globalObject, globalObject->functionPrototype()), pluralRulesPrototype, pluralRulesStructure);
-
     // Constructor Properties of the Intl Object
     // https://tc39.github.io/ecma402/#sec-constructor-properties-of-the-intl-object
-    putDirectWithoutTransition(vm, vm.propertyNames->Collator, collatorConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    putDirectWithoutTransition(vm, vm.propertyNames->NumberFormat, numberFormatConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    putDirectWithoutTransition(vm, vm.propertyNames->DateTimeFormat, dateTimeFormatConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     if (Options::useIntlPluralRules())
-        putDirectWithoutTransition(vm, vm.propertyNames->PluralRules, pluralRulesConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
-
-    // Function Properties of the Intl Object
-    // https://tc39.github.io/ecma402/#sec-function-properties-of-the-intl-object
-    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "getCanonicalLocales"), 1, intlObjectFuncGetCanonicalLocales, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
+        putDirectWithoutTransition(vm, vm.propertyNames->PluralRules, createPluralRulesConstructor(vm, this), static_cast<unsigned>(PropertyAttribute::DontEnum));
 }
 
 Structure* IntlObject::createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
@@ -942,6 +981,19 @@
     return JSValue::encode(localeArray);
 }
 
+void IntlObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
+{
+    IntlObject* thisObject = jsCast<IntlObject*>(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+
+    Base::visitChildren(thisObject, visitor);
+
+    thisObject->m_collatorStructure.visit(visitor);
+    thisObject->m_numberFormatStructure.visit(visitor);
+    thisObject->m_dateTimeFormatStructure.visit(visitor);
+    thisObject->m_pluralRulesStructure.visit(visitor);
+}
+
 } // namespace JSC
 
 #endif // ENABLE(INTL)

Modified: trunk/Source/_javascript_Core/runtime/IntlObject.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlObject.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlObject.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -44,18 +44,29 @@
 class IntlObject final : public JSNonFinalObject {
 public:
     typedef JSNonFinalObject Base;
-    static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
+    static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable | OverridesGetOwnPropertySlot;
 
-    static IntlObject* create(VM&, JSGlobalObject*, Structure*);
+    static IntlObject* create(VM&, Structure*);
     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
 
     DECLARE_INFO;
 
+    Structure* collatorStructure() { return m_collatorStructure.get(this); }
+    Structure* numberFormatStructure() { return m_numberFormatStructure.get(this); }
+    Structure* dateTimeFormatStructure() { return m_dateTimeFormatStructure.get(this); }
+    Structure* pluralRulesStructure() { return m_pluralRulesStructure.get(this); }
+
 protected:
-    void finishCreation(VM&, JSGlobalObject*);
+    void finishCreation(VM&);
 
 private:
+    static void visitChildren(JSCell*, SlotVisitor&);
+
     IntlObject(VM&, Structure*);
+    LazyProperty<IntlObject, Structure> m_collatorStructure;
+    LazyProperty<IntlObject, Structure> m_numberFormatStructure;
+    LazyProperty<IntlObject, Structure> m_dateTimeFormatStructure;
+    LazyProperty<IntlObject, Structure> m_pluralRulesStructure;
 };
 
 String defaultLocale(ExecState&);

Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -55,10 +55,10 @@
 @end
 */
 
-IntlPluralRulesConstructor* IntlPluralRulesConstructor::create(VM& vm, Structure* structure, IntlPluralRulesPrototype* pluralRulesPrototype, Structure* pluralRulesStructure)
+IntlPluralRulesConstructor* IntlPluralRulesConstructor::create(VM& vm, Structure* structure, IntlPluralRulesPrototype* pluralRulesPrototype)
 {
     IntlPluralRulesConstructor* constructor = new (NotNull, allocateCell<IntlPluralRulesConstructor>(vm.heap)) IntlPluralRulesConstructor(vm, structure);
-    constructor->finishCreation(vm, pluralRulesPrototype, pluralRulesStructure);
+    constructor->finishCreation(vm, pluralRulesPrototype);
     return constructor;
 }
 
@@ -75,13 +75,12 @@
 {
 }
 
-void IntlPluralRulesConstructor::finishCreation(VM& vm, IntlPluralRulesPrototype* pluralRulesPrototype, Structure* pluralRulesStructure)
+void IntlPluralRulesConstructor::finishCreation(VM& vm, IntlPluralRulesPrototype* pluralRulesPrototype)
 {
     Base::finishCreation(vm, "PluralRules"_s);
     putDirectWithoutTransition(vm, vm.propertyNames->prototype, pluralRulesPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     pluralRulesPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
-    m_pluralRulesStructure.set(vm, this, pluralRulesStructure);
 }
 
 static EncodedJSValue JSC_HOST_CALL constructIntlPluralRules(ExecState* state)
@@ -91,7 +90,7 @@
 
     // 13.2.1 Intl.PluralRules ([ locales [ , options ] ])
     // https://tc39.github.io/ecma402/#sec-intl.pluralrules
-    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlPluralRulesConstructor*>(state->jsCallee())->pluralRulesStructure());
+    Structure* structure = InternalFunction::createSubclassStructure(state, state->newTarget(), jsCast<IntlPluralRulesConstructor*>(state->jsCallee())->pluralRulesStructure(vm));
     RETURN_IF_EXCEPTION(scope, encodedJSValue());
     IntlPluralRules* pluralRules = IntlPluralRules::create(vm, structure);
     ASSERT(pluralRules);
@@ -127,16 +126,6 @@
     RELEASE_AND_RETURN(scope, JSValue::encode(supportedLocales(*state, availableLocales, requestedLocales, state->argument(1))));
 }
 
-void IntlPluralRulesConstructor::visitChildren(JSCell* cell, SlotVisitor& visitor)
-{
-    IntlPluralRulesConstructor* thisObject = jsCast<IntlPluralRulesConstructor*>(cell);
-    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
-
-    Base::visitChildren(thisObject, visitor);
-
-    visitor.append(thisObject->m_pluralRulesStructure);
-}
-
 } // namespace JSC
 
 #endif // ENABLE(INTL)

Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -28,6 +28,7 @@
 #if ENABLE(INTL)
 
 #include "InternalFunction.h"
+#include "IntlObject.h"
 
 namespace JSC {
 
@@ -39,27 +40,18 @@
     typedef InternalFunction Base;
     static const unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
 
-    template<typename CellType>
-    static IsoSubspace* subspaceFor(VM& vm)
-    {
-        return &vm.intlPluralRulesConstructorSpace;
-    }
-
-    static IntlPluralRulesConstructor* create(VM&, Structure*, IntlPluralRulesPrototype*, Structure*);
+    static IntlPluralRulesConstructor* create(VM&, Structure*, IntlPluralRulesPrototype*);
     static Structure* createStructure(VM&, JSGlobalObject*, JSValue);
 
     DECLARE_INFO;
 
-    Structure* pluralRulesStructure() const { return m_pluralRulesStructure.get(); }
+    Structure* pluralRulesStructure(VM& vm) const { return globalObject(vm)->intlObject()->pluralRulesStructure(); }
 
 protected:
-    void finishCreation(VM&, IntlPluralRulesPrototype*, Structure*);
+    void finishCreation(VM&, IntlPluralRulesPrototype*);
 
 private:
     IntlPluralRulesConstructor(VM&, Structure*);
-    static void visitChildren(JSCell*, SlotVisitor&);
-    
-    WriteBarrier<Structure> m_pluralRulesStructure;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -782,8 +782,9 @@
     putDirectWithoutTransition(vm, vm.propertyNames->eval, m_evalFunction.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     
 #if ENABLE(INTL)
-    IntlObject* intl = IntlObject::create(vm, this, IntlObject::createStructure(vm, this, m_objectPrototype.get()));
+    IntlObject* intl = IntlObject::create(vm, IntlObject::createStructure(vm, this, m_objectPrototype.get()));
     putDirectWithoutTransition(vm, vm.propertyNames->Intl, intl, static_cast<unsigned>(PropertyAttribute::DontEnum));
+    m_intlObject.set(vm, this, intl);
 #endif // ENABLE(INTL)
     ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get()));
     putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, static_cast<unsigned>(PropertyAttribute::DontEnum));
@@ -1559,6 +1560,9 @@
     visitor.append(thisObject->m_objectConstructor);
     visitor.append(thisObject->m_promiseConstructor);
 
+#if ENABLE(INTL)
+    visitor.append(thisObject->m_intlObject);
+#endif
     visitor.append(thisObject->m_nullGetterFunction);
     visitor.append(thisObject->m_nullSetterFunction);
 

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -80,6 +80,7 @@
 class GlobalCodeBlock;
 class IndirectEvalExecutable;
 class InputCursor;
+class IntlObject;
 class JSArrayBuffer;
 class JSArrayBufferConstructor;
 class JSArrayBufferPrototype;
@@ -274,6 +275,9 @@
     WriteBarrier<JSPromiseConstructor> m_promiseConstructor;
     WriteBarrier<JSInternalPromiseConstructor> m_internalPromiseConstructor;
 
+#if ENABLE(INTL)
+    WriteBarrier<IntlObject> m_intlObject;
+#endif
     WriteBarrier<NullGetterFunction> m_nullGetterFunction;
     WriteBarrier<NullSetterFunction> m_nullSetterFunction;
 
@@ -583,6 +587,10 @@
     NativeErrorConstructor* typeErrorConstructor() const { return m_typeErrorConstructor.get(); }
     NativeErrorConstructor* URIErrorConstructor() const { return m_URIErrorConstructor.get(this); }
 
+#if ENABLE(INTL)
+    IntlObject* intlObject() const { return m_intlObject.get(); }
+#endif
+
     NullGetterFunction* nullGetterFunction() const { return m_nullGetterFunction.get(); }
     NullSetterFunction* nullSetterFunction() const { return m_nullSetterFunction.get(); }
 

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2019-01-22 20:33:37 UTC (rev 240273)
@@ -304,12 +304,6 @@
     , generatorFunctionSpace ISO_SUBSPACE_INIT(heap, cellJSValueOOBHeapCellType.get(), JSGeneratorFunction)
     , inferredValueSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), InferredValue)
     , internalFunctionSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), InternalFunction)
-#if ENABLE(INTL)
-    , intlCollatorConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), IntlCollatorConstructor)
-    , intlDateTimeFormatConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), IntlDateTimeFormatConstructor)
-    , intlNumberFormatConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), IntlNumberFormatConstructor)
-    , intlPluralRulesConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), IntlPluralRulesConstructor)
-#endif
     , nativeErrorConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), NativeErrorConstructor)
     , nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable)
     , nativeStdFunctionSpace ISO_SUBSPACE_INIT(heap, cellJSValueOOBHeapCellType.get(), JSNativeStdFunction)

Modified: trunk/Source/_javascript_Core/runtime/VM.h (240272 => 240273)


--- trunk/Source/_javascript_Core/runtime/VM.h	2019-01-22 20:12:37 UTC (rev 240272)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2019-01-22 20:33:37 UTC (rev 240273)
@@ -379,12 +379,6 @@
     IsoSubspace generatorFunctionSpace;
     IsoSubspace inferredValueSpace;
     IsoSubspace internalFunctionSpace;
-#if ENABLE(INTL)
-    IsoSubspace intlCollatorConstructorSpace;
-    IsoSubspace intlDateTimeFormatConstructorSpace;
-    IsoSubspace intlNumberFormatConstructorSpace;
-    IsoSubspace intlPluralRulesConstructorSpace;
-#endif
     IsoSubspace nativeErrorConstructorSpace;
     IsoSubspace nativeExecutableSpace;
     IsoSubspace nativeStdFunctionSpace;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to