Changeset 253019 in webkit
- Timestamp:
- Dec 2, 2019 5:47:31 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 59 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r253015 r253019 1 2019-12-02 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Put some destructible objects to IsoSubspace 4 https://bugs.webkit.org/show_bug.cgi?id=204771 5 6 Reviewed by Mark Lam. 7 8 This patch puts DateInstance, ErrorInstance, and Intl objects in IsoSubspace. 9 By using specific IsoHeapCellType, we can use JSNonFinalObject as base-classes of 10 them instead of using JSDestructibleObject. We also introduce STATIC_ASSERT_ISO_SUBSPACE_SHARABLE 11 to ensure that derived class of some IsoSubspace'ed one is intentional and safe. 12 13 * runtime/ArrayConstructor.h: 14 * runtime/AsyncFunctionConstructor.h: 15 * runtime/AsyncGeneratorFunctionConstructor.h: 16 * runtime/BigIntConstructor.h: 17 * runtime/BooleanConstructor.h: 18 * runtime/DateConstructor.h: 19 * runtime/DateInstance.cpp: 20 (JSC::DateInstance::destroy): Deleted. 21 * runtime/DateInstance.h: 22 * runtime/ErrorConstructor.h: 23 * runtime/ErrorInstance.cpp: 24 (JSC::ErrorInstance::destroy): Deleted. 25 * runtime/ErrorInstance.h: 26 (JSC::ErrorInstance::destroy): 27 (JSC::ErrorInstance::subspaceFor): 28 * runtime/FunctionConstructor.h: 29 * runtime/FunctionPrototype.h: 30 * runtime/GeneratorFunctionConstructor.h: 31 * runtime/IntlCollator.cpp: 32 (JSC::IntlCollator::IntlCollator): 33 (JSC::IntlCollator::destroy): Deleted. 34 * runtime/IntlCollator.h: 35 * runtime/IntlCollatorConstructor.h: 36 * runtime/IntlDateTimeFormat.cpp: 37 (JSC::IntlDateTimeFormat::IntlDateTimeFormat): 38 (JSC::IntlDateTimeFormat::destroy): Deleted. 39 * runtime/IntlDateTimeFormat.h: 40 * runtime/IntlDateTimeFormatConstructor.h: 41 * runtime/IntlNumberFormat.cpp: 42 (JSC::IntlNumberFormat::IntlNumberFormat): 43 (JSC::IntlNumberFormat::destroy): Deleted. 44 * runtime/IntlNumberFormat.h: 45 * runtime/IntlNumberFormatConstructor.h: 46 * runtime/IntlPluralRules.cpp: 47 (JSC::IntlPluralRules::IntlPluralRules): 48 (JSC::IntlPluralRules::destroy): Deleted. 49 * runtime/IntlPluralRules.h: 50 * runtime/IntlPluralRulesConstructor.h: 51 * runtime/JSArrayBufferConstructor.h: 52 * runtime/JSCell.h: 53 * runtime/JSObject.h: 54 * runtime/JSTypedArrayConstructors.h: 55 * runtime/JSTypedArrayViewConstructor.h: 56 * runtime/MapConstructor.h: 57 * runtime/NativeErrorConstructor.h: 58 * runtime/NullGetterFunction.h: 59 * runtime/NullSetterFunction.h: 60 * runtime/NumberConstructor.h: 61 * runtime/ObjectConstructor.h: 62 * runtime/ProxyConstructor.h: 63 * runtime/RegExpConstructor.h: 64 * runtime/SetConstructor.h: 65 * runtime/StringConstructor.h: 66 * runtime/SymbolConstructor.h: 67 * runtime/VM.cpp: 68 (JSC::VM::VM): 69 * runtime/VM.h: 70 * runtime/WeakMapConstructor.h: 71 * runtime/WeakObjectRefConstructor.h: 72 * runtime/WeakSetConstructor.h: 73 * tools/JSDollarVM.cpp: 74 * wasm/js/JSWebAssemblyCompileError.h: 75 * wasm/js/JSWebAssemblyLinkError.h: 76 * wasm/js/JSWebAssemblyRuntimeError.h: 77 * wasm/js/WebAssemblyCompileErrorConstructor.h: 78 * wasm/js/WebAssemblyInstanceConstructor.h: 79 * wasm/js/WebAssemblyLinkErrorConstructor.h: 80 * wasm/js/WebAssemblyMemoryConstructor.h: 81 * wasm/js/WebAssemblyModuleConstructor.h: 82 * wasm/js/WebAssemblyRuntimeErrorConstructor.h: 83 * wasm/js/WebAssemblyTableConstructor.h: 84 1 85 2019-12-02 Mark Lam <mark.lam@apple.com> 2 86 -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h
r251425 r253019 56 56 ArrayConstructor(VM&, Structure*); 57 57 }; 58 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ArrayConstructor, InternalFunction); 58 59 59 60 JSArray* constructArrayWithSizeQuirk(JSGlobalObject*, ArrayAllocationProfile*, JSValue length, JSValue prototype = JSValue()); -
trunk/Source/JavaScriptCore/runtime/AsyncFunctionConstructor.h
r229413 r253019 54 54 void finishCreation(VM&, AsyncFunctionPrototype*); 55 55 }; 56 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(AsyncFunctionConstructor, InternalFunction); 56 57 57 58 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionConstructor.h
r229413 r253019 54 54 void finishCreation(VM&, AsyncGeneratorFunctionPrototype*); 55 55 }; 56 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(AsyncGeneratorFunctionConstructor, InternalFunction); 56 57 57 58 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/BigIntConstructor.h
r250005 r253019 59 59 BigIntConstructor(VM&, Structure*); 60 60 }; 61 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(BigIntConstructor, InternalFunction); 61 62 62 63 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h
r251425 r253019 52 52 BooleanConstructor(VM&, Structure*); 53 53 }; 54 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(BooleanConstructor, InternalFunction); 54 55 55 56 JSObject* constructBooleanFromImmediateBoolean(JSGlobalObject*, JSValue); -
trunk/Source/JavaScriptCore/runtime/DateConstructor.h
r251425 r253019 53 53 DateConstructor(VM&, Structure*); 54 54 }; 55 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(DateConstructor, InternalFunction); 55 56 56 57 JSObject* constructDate(JSGlobalObject*, JSValue newTarget, const ArgList&); -
trunk/Source/JavaScriptCore/runtime/DateInstance.cpp
r251852 r253019 51 51 } 52 52 53 void DateInstance::destroy(JSCell* cell)54 {55 static_cast<DateInstance*>(cell)->DateInstance::~DateInstance();56 }57 58 53 const GregorianDateTime* DateInstance::calculateGregorianDateTime(VM& vm) const 59 54 { -
trunk/Source/JavaScriptCore/runtime/DateInstance.h
r251826 r253019 21 21 #pragma once 22 22 23 #include "JS DestructibleObject.h"23 #include "JSObject.h" 24 24 25 25 namespace JSC { 26 26 27 class DateInstance final : public JSDestructibleObject { 28 protected: 29 JS_EXPORT_PRIVATE DateInstance(VM&, Structure*); 30 void finishCreation(VM&); 31 JS_EXPORT_PRIVATE void finishCreation(VM&, double); 27 class DateInstance final : public JSNonFinalObject { 28 public: 29 using Base = JSNonFinalObject; 32 30 33 JS_EXPORT_PRIVATE static void destroy(JSCell*); 31 static constexpr bool needsDestruction = true; 32 static void destroy(JSCell* cell) 33 { 34 static_cast<DateInstance*>(cell)->DateInstance::~DateInstance(); 35 } 34 36 35 public: 36 using Base = JSDestructibleObject; 37 template<typename CellType, SubspaceAccess mode> 38 static IsoSubspace* subspaceFor(VM& vm) 39 { 40 return &vm.dateInstanceSpace; 41 } 37 42 38 43 static DateInstance* create(VM& vm, Structure* structure, double date) … … 78 83 79 84 private: 85 JS_EXPORT_PRIVATE DateInstance(VM&, Structure*); 86 void finishCreation(VM&); 87 JS_EXPORT_PRIVATE void finishCreation(VM&, double); 80 88 JS_EXPORT_PRIVATE const GregorianDateTime* calculateGregorianDateTime(VM&) const; 81 89 JS_EXPORT_PRIVATE const GregorianDateTime* calculateGregorianDateTimeUTC(VM&) const; -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h
r251425 r253019 56 56 57 57 }; 58 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ErrorConstructor, InternalFunction); 58 59 59 60 static_assert(sizeof(ErrorConstructor) == sizeof(InternalFunction), ""); -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp
r251886 r253019 133 133 } 134 134 135 void ErrorInstance::destroy(JSCell* cell)136 {137 static_cast<ErrorInstance*>(cell)->ErrorInstance::~ErrorInstance();138 }139 140 135 // Based on ErrorPrototype's errorProtoFuncToString(), but is modified to 141 136 // have no observable side effects to the user (i.e. does not call proxies, -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.h
r251425 r253019 21 21 #pragma once 22 22 23 #include "JS DestructibleObject.h"23 #include "JSObject.h" 24 24 #include "RuntimeType.h" 25 25 #include "StackFrame.h" … … 27 27 namespace JSC { 28 28 29 class ErrorInstance : public JS DestructibleObject {29 class ErrorInstance : public JSNonFinalObject { 30 30 public: 31 typedef JSDestructibleObject Base;31 using Base = JSNonFinalObject; 32 32 static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames; 33 static constexpr bool needsDestruction = true; 34 35 static void destroy(JSCell* cell) 36 { 37 static_cast<ErrorInstance*>(cell)->ErrorInstance::~ErrorInstance(); 38 } 39 40 template<typename CellType, SubspaceAccess mode> 41 static IsoSubspace* subspaceFor(VM& vm) 42 { 43 return vm.errorInstanceSpace<mode>(); 44 } 33 45 34 46 enum SourceTextWhereErrorOccurred { FoundExactSource, FoundApproximateSource }; … … 76 88 bool materializeErrorInfoIfNeeded(VM&, PropertyName); 77 89 78 template<typename CellType, SubspaceAccess mode>79 static IsoSubspace* subspaceFor(VM& vm)80 {81 return vm.errorInstanceSpace<mode>();82 }83 84 90 void finalizeUnconditionally(VM&); 85 91 … … 88 94 89 95 void finishCreation(JSGlobalObject*, VM&, const String&, bool useCurrentFrame = true); 90 static void destroy(JSCell*);91 96 92 97 static bool getOwnPropertySlot(JSObject*, JSGlobalObject*, PropertyName, PropertySlot&); -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h
r251425 r253019 53 53 void finishCreation(VM&, FunctionPrototype*); 54 54 }; 55 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(FunctionConstructor, InternalFunction); 55 56 56 57 enum class FunctionConstructionMode { -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h
r242650 r253019 53 53 FunctionPrototype(VM&, Structure*); 54 54 }; 55 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(FunctionPrototype, InternalFunction); 55 56 56 57 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/GeneratorFunctionConstructor.h
r229413 r253019 60 60 void finishCreation(VM&, GeneratorFunctionPrototype*); 61 61 }; 62 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(GeneratorFunctionConstructor, InternalFunction); 62 63 63 64 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/IntlCollator.cpp
r251882 r253019 71 71 72 72 IntlCollator::IntlCollator(VM& vm, Structure* structure) 73 : JSDestructibleObject(vm, structure)73 : Base(vm, structure) 74 74 { 75 75 } … … 79 79 Base::finishCreation(vm); 80 80 ASSERT(inherits(vm, info())); 81 }82 83 void IntlCollator::destroy(JSCell* cell)84 {85 static_cast<IntlCollator*>(cell)->IntlCollator::~IntlCollator();86 81 } 87 82 -
trunk/Source/JavaScriptCore/runtime/IntlCollator.h
r251425 r253019 28 28 #if ENABLE(INTL) 29 29 30 #include "JS DestructibleObject.h"30 #include "JSObject.h" 31 31 32 32 struct UCollator; … … 37 37 class JSBoundFunction; 38 38 39 class IntlCollator final : public JS DestructibleObject {39 class IntlCollator final : public JSNonFinalObject { 40 40 public: 41 typedef JSDestructibleObject Base; 41 using Base = JSNonFinalObject; 42 43 static constexpr bool needsDestruction = true; 44 45 static void destroy(JSCell* cell) 46 { 47 static_cast<IntlCollator*>(cell)->IntlCollator::~IntlCollator(); 48 } 49 50 template<typename CellType, SubspaceAccess mode> 51 static IsoSubspace* subspaceFor(VM& vm) 52 { 53 return vm.intlCollatorSpace<mode>(); 54 } 42 55 43 56 static IntlCollator* create(VM&, Structure*); … … 56 69 IntlCollator(VM&, Structure*); 57 70 void finishCreation(VM&); 58 static void destroy(JSCell*);59 71 static void visitChildren(JSCell*, SlotVisitor&); 60 72 -
trunk/Source/JavaScriptCore/runtime/IntlCollatorConstructor.h
r250803 r253019 55 55 IntlCollatorConstructor(VM&, Structure*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(IntlCollatorConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
r251815 r253019 87 87 88 88 IntlDateTimeFormat::IntlDateTimeFormat(VM& vm, Structure* structure) 89 : JSDestructibleObject(vm, structure)89 : Base(vm, structure) 90 90 { 91 91 } … … 95 95 Base::finishCreation(vm); 96 96 ASSERT(inherits(vm, info())); 97 }98 99 void IntlDateTimeFormat::destroy(JSCell* cell)100 {101 static_cast<IntlDateTimeFormat*>(cell)->IntlDateTimeFormat::~IntlDateTimeFormat();102 97 } 103 98 -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.h
r251425 r253019 28 28 #if ENABLE(INTL) 29 29 30 #include "JS DestructibleObject.h"30 #include "JSObject.h" 31 31 #include <unicode/udat.h> 32 32 #include <unicode/uvernum.h> … … 39 39 class JSBoundFunction; 40 40 41 class IntlDateTimeFormat final : public JS DestructibleObject {41 class IntlDateTimeFormat final : public JSNonFinalObject { 42 42 public: 43 typedef JSDestructibleObject Base; 43 using Base = JSNonFinalObject; 44 45 static constexpr bool needsDestruction = true; 46 47 static void destroy(JSCell* cell) 48 { 49 static_cast<IntlDateTimeFormat*>(cell)->IntlDateTimeFormat::~IntlDateTimeFormat(); 50 } 51 52 template<typename CellType, SubspaceAccess mode> 53 static IsoSubspace* subspaceFor(VM& vm) 54 { 55 return vm.intlDateTimeFormatSpace<mode>(); 56 } 44 57 45 58 static IntlDateTimeFormat* create(VM&, Structure*); … … 61 74 IntlDateTimeFormat(VM&, Structure*); 62 75 void finishCreation(VM&); 63 static void destroy(JSCell*);64 76 static void visitChildren(JSCell*, SlotVisitor&); 65 77 -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.h
r250803 r253019 55 55 IntlDateTimeFormatConstructor(VM&, Structure*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(IntlDateTimeFormatConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
r251425 r253019 68 68 69 69 IntlNumberFormat::IntlNumberFormat(VM& vm, Structure* structure) 70 : JSDestructibleObject(vm, structure)70 : Base(vm, structure) 71 71 { 72 72 } … … 76 76 Base::finishCreation(vm); 77 77 ASSERT(inherits(vm, info())); 78 }79 80 void IntlNumberFormat::destroy(JSCell* cell)81 {82 static_cast<IntlNumberFormat*>(cell)->IntlNumberFormat::~IntlNumberFormat();83 78 } 84 79 -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormat.h
r251425 r253019 28 28 #if ENABLE(INTL) 29 29 30 #include "JS DestructibleObject.h"30 #include "JSObject.h" 31 31 #include <unicode/unum.h> 32 32 #include <unicode/uvernum.h> … … 39 39 class JSBoundFunction; 40 40 41 class IntlNumberFormat final : public JS DestructibleObject {41 class IntlNumberFormat final : public JSNonFinalObject { 42 42 public: 43 typedef JSDestructibleObject Base; 43 using Base = JSNonFinalObject; 44 45 static constexpr bool needsDestruction = true; 46 47 static void destroy(JSCell* cell) 48 { 49 static_cast<IntlNumberFormat*>(cell)->IntlNumberFormat::~IntlNumberFormat(); 50 } 51 52 template<typename CellType, SubspaceAccess mode> 53 static IsoSubspace* subspaceFor(VM& vm) 54 { 55 return vm.intlNumberFormatSpace<mode>(); 56 } 44 57 45 58 static IntlNumberFormat* create(VM&, Structure*); … … 61 74 IntlNumberFormat(VM&, Structure*); 62 75 void finishCreation(VM&); 63 static void destroy(JSCell*);64 76 static void visitChildren(JSCell*, SlotVisitor&); 65 77 -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.h
r250803 r253019 55 55 IntlNumberFormatConstructor(VM&, Structure*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(IntlNumberFormatConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/IntlPluralRules.cpp
r251425 r253019 73 73 74 74 IntlPluralRules::IntlPluralRules(VM& vm, Structure* structure) 75 : JSDestructibleObject(vm, structure)75 : Base(vm, structure) 76 76 { 77 77 } … … 81 81 Base::finishCreation(vm); 82 82 ASSERT(inherits(vm, info())); 83 }84 85 void IntlPluralRules::destroy(JSCell* cell)86 {87 static_cast<IntlPluralRules*>(cell)->IntlPluralRules::~IntlPluralRules();88 83 } 89 84 -
trunk/Source/JavaScriptCore/runtime/IntlPluralRules.h
r251425 r253019 28 28 #if ENABLE(INTL) 29 29 30 #include "JS DestructibleObject.h"30 #include "JSObject.h" 31 31 #include <unicode/unum.h> 32 32 #include <unicode/upluralrules.h> … … 41 41 class JSBoundFunction; 42 42 43 class IntlPluralRules final : public JS DestructibleObject {43 class IntlPluralRules final : public JSNonFinalObject { 44 44 public: 45 typedef JSDestructibleObject Base; 45 using Base = JSNonFinalObject; 46 47 static constexpr bool needsDestruction = true; 48 49 static void destroy(JSCell* cell) 50 { 51 static_cast<IntlPluralRules*>(cell)->IntlPluralRules::~IntlPluralRules(); 52 } 53 54 template<typename CellType, SubspaceAccess mode> 55 static IsoSubspace* subspaceFor(VM& vm) 56 { 57 return vm.intlPluralRulesSpace<mode>(); 58 } 46 59 47 60 static IntlPluralRules* create(VM&, Structure*); … … 57 70 IntlPluralRules(VM&, Structure*); 58 71 void finishCreation(VM&); 59 static void destroy(JSCell*);60 72 static void visitChildren(JSCell*, SlotVisitor&); 61 73 -
trunk/Source/JavaScriptCore/runtime/IntlPluralRulesConstructor.h
r250803 r253019 55 55 IntlPluralRulesConstructor(VM&, Structure*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(IntlPluralRulesConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.h
r250803 r253019 62 62 using JSArrayBufferConstructor = JSGenericArrayBufferConstructor<ArrayBufferSharingMode::Default>; 63 63 using JSSharedArrayBufferConstructor = JSGenericArrayBufferConstructor<ArrayBufferSharingMode::Shared>; 64 static_assert(sizeof(JSArrayBufferConstructor::Base) == sizeof(JSArrayBufferConstructor), "");65 static_assert(sizeof(JSSharedArrayBufferConstructor::Base) == sizeof(JSSharedArrayBufferConstructor), "");64 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSArrayBufferConstructor, InternalFunction); 65 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSSharedArrayBufferConstructor, InternalFunction); 66 66 67 67 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r252385 r253019 99 99 JSCell(CreatingEarlyCellTag); 100 100 101 JS_EXPORT_PRIVATE static void destroy(JSCell*); 102 101 103 protected: 102 104 JSCell(VM&, Structure*); 103 JS_EXPORT_PRIVATE static void destroy(JSCell*);104 105 105 106 public: -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r252024 r253019 1629 1629 JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION((jsName), (cppName), (attributes), NoIntrinsic) 1630 1630 1631 1632 #define STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(DerivedClass, BaseClass) \ 1633 static_assert(sizeof(DerivedClass) == sizeof(BaseClass)); \ 1634 static_assert(DerivedClass::destroy == BaseClass::destroy); 1635 1631 1636 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSTypedArrayConstructors.h
r206525 r253019 32 32 namespace JSC { 33 33 34 typedef JSGenericTypedArrayViewConstructor<JSInt8Array> JSInt8ArrayConstructor; 35 typedef JSGenericTypedArrayViewConstructor<JSInt16Array> JSInt16ArrayConstructor; 36 typedef JSGenericTypedArrayViewConstructor<JSInt32Array> JSInt32ArrayConstructor; 37 typedef JSGenericTypedArrayViewConstructor<JSUint8Array> JSUint8ArrayConstructor; 38 typedef JSGenericTypedArrayViewConstructor<JSUint8ClampedArray> JSUint8ClampedArrayConstructor; 39 typedef JSGenericTypedArrayViewConstructor<JSUint16Array> JSUint16ArrayConstructor; 40 typedef JSGenericTypedArrayViewConstructor<JSUint32Array> JSUint32ArrayConstructor; 41 typedef JSGenericTypedArrayViewConstructor<JSFloat32Array> JSFloat32ArrayConstructor; 42 typedef JSGenericTypedArrayViewConstructor<JSFloat64Array> JSFloat64ArrayConstructor; 43 typedef JSGenericTypedArrayViewConstructor<JSDataView> JSDataViewConstructor; 34 using JSInt8ArrayConstructor = JSGenericTypedArrayViewConstructor<JSInt8Array>; 35 using JSInt16ArrayConstructor = JSGenericTypedArrayViewConstructor<JSInt16Array>; 36 using JSInt32ArrayConstructor = JSGenericTypedArrayViewConstructor<JSInt32Array>; 37 using JSUint8ArrayConstructor = JSGenericTypedArrayViewConstructor<JSUint8Array>; 38 using JSUint8ClampedArrayConstructor = JSGenericTypedArrayViewConstructor<JSUint8ClampedArray>; 39 using JSUint16ArrayConstructor = JSGenericTypedArrayViewConstructor<JSUint16Array>; 40 using JSUint32ArrayConstructor = JSGenericTypedArrayViewConstructor<JSUint32Array>; 41 using JSFloat32ArrayConstructor = JSGenericTypedArrayViewConstructor<JSFloat32Array>; 42 using JSFloat64ArrayConstructor = JSGenericTypedArrayViewConstructor<JSFloat64Array>; 43 using JSDataViewConstructor = JSGenericTypedArrayViewConstructor<JSDataView>; 44 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSInt8ArrayConstructor, InternalFunction); 45 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSInt16ArrayConstructor, InternalFunction); 46 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSInt32ArrayConstructor, InternalFunction); 47 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSUint8ArrayConstructor, InternalFunction); 48 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSUint8ClampedArrayConstructor, InternalFunction); 49 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSUint16ArrayConstructor, InternalFunction); 50 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSUint32ArrayConstructor, InternalFunction); 51 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFloat32ArrayConstructor, InternalFunction); 52 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSFloat64ArrayConstructor, InternalFunction); 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSDataViewConstructor, InternalFunction); 44 54 45 55 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.h
r229413 r253019 53 53 static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype); 54 54 }; 55 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSTypedArrayViewConstructor, InternalFunction); 55 56 56 57 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/MapConstructor.h
r250803 r253019 56 56 void finishCreation(VM&, MapPrototype*, GetterSetter* speciesSymbol); 57 57 }; 58 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(MapConstructor, InternalFunction); 58 59 59 60 EncodedJSValue JSC_HOST_CALL mapPrivateFuncMapBucketHead(JSGlobalObject*, CallFrame*); -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.h
r250803 r253019 76 76 using URIErrorConstructor = NativeErrorConstructor<ErrorType::URIError>; 77 77 78 static_assert(sizeof(EvalErrorConstructor) == sizeof(InternalFunction), "");79 static_assert(sizeof(RangeErrorConstructor) == sizeof(InternalFunction), "");80 static_assert(sizeof(ReferenceErrorConstructor) == sizeof(InternalFunction), "");81 static_assert(sizeof(SyntaxErrorConstructor) == sizeof(InternalFunction), "");82 static_assert(sizeof(TypeErrorConstructor) == sizeof(InternalFunction), "");83 static_assert(sizeof(URIErrorConstructor) == sizeof(InternalFunction), "");78 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(EvalErrorConstructor, InternalFunction); 79 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(RangeErrorConstructor, InternalFunction); 80 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ReferenceErrorConstructor, InternalFunction); 81 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(SyntaxErrorConstructor, InternalFunction); 82 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(TypeErrorConstructor, InternalFunction); 83 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(URIErrorConstructor, InternalFunction); 84 84 85 85 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/NullGetterFunction.h
r252520 r253019 52 52 NullGetterFunction(VM&, Structure*); 53 53 }; 54 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(NullGetterFunction, InternalFunction); 54 55 55 56 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/NullSetterFunction.h
r252520 r253019 52 52 NullSetterFunction(VM&, Structure*); 53 53 }; 54 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(NullSetterFunction, InternalFunction); 54 55 55 56 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.h
r250005 r253019 64 64 NumberConstructor(VM&, Structure*); 65 65 }; 66 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(NumberConstructor, InternalFunction); 66 67 67 68 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h
r251425 r253019 60 60 ObjectConstructor(VM&, Structure*); 61 61 }; 62 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ObjectConstructor, InternalFunction); 62 63 63 64 inline JSFinalObject* constructEmptyObject(VM& vm, Structure* structure) -
trunk/Source/JavaScriptCore/runtime/ProxyConstructor.h
r251425 r253019 51 51 static EncodedJSValue getGetter(JSGlobalObject*, EncodedJSValue thisValue, PropertyName); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(ProxyConstructor, InternalFunction); 53 54 54 55 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h
r251483 r253019 56 56 RegExpConstructor(VM&, Structure*); 57 57 }; 58 59 static_assert(sizeof(RegExpConstructor) == sizeof(InternalFunction), ""); 58 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(RegExpConstructor, InternalFunction); 60 59 61 60 JSObject* constructRegExp(JSGlobalObject*, const ArgList&, JSObject* callee = nullptr, JSValue newTarget = jsUndefined()); -
trunk/Source/JavaScriptCore/runtime/SetConstructor.h
r250803 r253019 55 55 void finishCreation(VM&, SetPrototype*, GetterSetter* speciesSymbol); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(SetConstructor, InternalFunction); 57 58 58 59 EncodedJSValue JSC_HOST_CALL setPrivateFuncSetBucketHead(JSGlobalObject*, CallFrame*); -
trunk/Source/JavaScriptCore/runtime/StringConstructor.h
r251425 r253019 51 51 void finishCreation(VM&, StringPrototype*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(StringConstructor, InternalFunction); 53 54 54 55 JSString* JSC_HOST_CALL stringFromCharCode(JSGlobalObject*, int32_t); -
trunk/Source/JavaScriptCore/runtime/SymbolConstructor.h
r250005 r253019 59 59 SymbolConstructor(VM&, Structure*); 60 60 }; 61 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(SymbolConstructor, InternalFunction); 61 62 62 63 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r253015 r253019 40 40 #include "CustomGetterSetter.h" 41 41 #include "DFGWorklist.h" 42 #include "DateInstance.h" 42 43 #include "DirectEvalExecutable.h" 43 44 #include "Disassembler.h" … … 179 180 #endif 180 181 182 #if ENABLE(INTL) 183 #include "IntlCollator.h" 184 #include "IntlDateTimeFormat.h" 185 #include "IntlNumberFormat.h" 186 #include "IntlPluralRules.h" 187 #endif 188 181 189 namespace JSC { 182 190 … … 268 276 , cellHeapCellType(makeUnique<HeapCellType>(CellAttributes(DoesNotNeedDestruction, HeapCell::JSCell))) 269 277 , destructibleCellHeapCellType(makeUnique<HeapCellType>(CellAttributes(NeedsDestruction, HeapCell::JSCell))) 278 , dateInstanceHeapCellType(makeUnique<IsoHeapCellType<DateInstance>>()) 279 , errorInstanceHeapCellType(makeUnique<IsoHeapCellType<ErrorInstance>>()) 270 280 , stringHeapCellType(makeUnique<IsoHeapCellType<JSString>>()) 271 281 , weakMapHeapCellType(makeUnique<IsoHeapCellType<JSWeakMap>>()) … … 277 287 #ifdef JSC_GLIB_API_ENABLED 278 288 , jscCallbackFunctionHeapCellType(makeUnique<IsoHeapCellType<JSCCallbackFunction>>()) 289 #endif 290 #if ENABLE(INTL) 291 , intlCollatorHeapCellType(makeUnique<IsoHeapCellType<IntlCollator>>()) 292 , intlDateTimeFormatHeapCellType(makeUnique<IsoHeapCellType<IntlDateTimeFormat>>()) 293 , intlNumberFormatHeapCellType(makeUnique<IsoHeapCellType<IntlNumberFormat>>()) 294 , intlPluralRulesHeapCellType(makeUnique<IsoHeapCellType<IntlPluralRules>>()) 279 295 #endif 280 296 #if ENABLE(WEBASSEMBLY) … … 290 306 , destructibleObjectSpace("JSDestructibleObject", heap, destructibleObjectHeapCellType.get(), fastMallocAllocator.get()) // Hash:0x4f5ed7a9 291 307 , bigIntSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), JSBigInt) 308 , dateInstanceSpace ISO_SUBSPACE_INIT(heap, dateInstanceHeapCellType.get(), DateInstance) 292 309 , executableToCodeBlockEdgeSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ExecutableToCodeBlockEdge) // Hash:0x7b730b20 293 310 , functionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSFunction) // Hash:0x800fca72 … … 1318 1335 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(callbackFunctionSpace, cellHeapCellType.get(), JSCallbackFunction) // Hash:0xe7648ebc 1319 1336 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(customGetterSetterFunctionSpace, cellHeapCellType.get(), JSCustomGetterSetterFunction) // Hash:0x18091000 1320 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(errorInstanceSpace, destructibleObjectHeapCellType.get(), ErrorInstance) // Hash:0x3f40d4a1337 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(errorInstanceSpace, errorInstanceHeapCellType.get(), ErrorInstance) // Hash:0x3f40d4a 1321 1338 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(functionRareDataSpace, destructibleCellHeapCellType.get(), FunctionRareData) 1322 1339 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(generatorSpace, cellHeapCellType.get(), JSGenerator) … … 1338 1355 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(jscCallbackFunctionSpace, jscCallbackFunctionHeapCellType.get(), JSCCallbackFunction) 1339 1356 #endif 1357 #if ENABLE(INTL) 1358 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(intlCollatorSpace, intlCollatorHeapCellType.get(), IntlCollator) 1359 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(intlDateTimeFormatSpace, intlDateTimeFormatHeapCellType.get(), IntlDateTimeFormat) 1360 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(intlNumberFormatSpace, intlNumberFormatHeapCellType.get(), IntlNumberFormat) 1361 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(intlPluralRulesSpace, intlPluralRulesHeapCellType.get(), IntlPluralRules) 1362 #endif 1340 1363 #if ENABLE(WEBASSEMBLY) 1341 1364 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(webAssemblyCodeBlockSpace, webAssemblyCodeBlockHeapCellType.get(), JSWebAssemblyCodeBlock) // Hash:0x9ad995cd -
trunk/Source/JavaScriptCore/runtime/VM.h
r253007 r253019 110 110 class CustomGetterSetter; 111 111 class DOMAttributeGetterSetter; 112 class DateInstance; 113 class ErrorInstance; 112 114 class Exception; 113 115 class ExceptionScope; … … 121 123 class Identifier; 122 124 class Interpreter; 125 class IntlCollator; 126 class IntlDateTimeFormat; 127 class IntlNumberFormat; 128 class IntlPluralRules; 123 129 class JSCCallbackFunction; 124 130 class JSCustomGetterSetterFunction; … … 346 352 std::unique_ptr<HeapCellType> cellHeapCellType; 347 353 std::unique_ptr<HeapCellType> destructibleCellHeapCellType; 354 std::unique_ptr<IsoHeapCellType<DateInstance>> dateInstanceHeapCellType; 355 std::unique_ptr<IsoHeapCellType<ErrorInstance>> errorInstanceHeapCellType; 348 356 std::unique_ptr<IsoHeapCellType<JSString>> stringHeapCellType; 349 357 std::unique_ptr<IsoHeapCellType<JSWeakMap>> weakMapHeapCellType; … … 355 363 #ifdef JSC_GLIB_API_ENABLED 356 364 std::unique_ptr<IsoHeapCellType<JSCCallbackFunction>> jscCallbackFunctionHeapCellType; 365 #endif 366 #if ENABLE(INTL) 367 std::unique_ptr<IsoHeapCellType<IntlCollator>> intlCollatorHeapCellType; 368 std::unique_ptr<IsoHeapCellType<IntlDateTimeFormat>> intlDateTimeFormatHeapCellType; 369 std::unique_ptr<IsoHeapCellType<IntlNumberFormat>> intlNumberFormatHeapCellType; 370 std::unique_ptr<IsoHeapCellType<IntlPluralRules>> intlPluralRulesHeapCellType; 357 371 #endif 358 372 #if ENABLE(WEBASSEMBLY) … … 392 406 393 407 IsoSubspace bigIntSpace; 408 IsoSubspace dateInstanceSpace; 394 409 IsoSubspace executableToCodeBlockEdgeSpace; 395 410 IsoSubspace functionSpace; … … 443 458 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(weakSetSpace) 444 459 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(weakMapSpace) 460 #if ENABLE(INTL) 461 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(intlCollatorSpace) 462 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(intlDateTimeFormatSpace) 463 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(intlNumberFormatSpace) 464 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(intlPluralRulesSpace) 465 #endif 445 466 #if ENABLE(WEBASSEMBLY) 446 467 DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(webAssemblyCodeBlockSpace) -
trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.h
r229413 r253019 55 55 void finishCreation(VM&, WeakMapPrototype*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WeakMapConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/runtime/WeakObjectRefConstructor.h
r246596 r253019 54 54 void finishCreation(VM&, WeakObjectRefPrototype*); 55 55 }; 56 57 static_assert(sizeof(WeakObjectRefConstructor) == sizeof(InternalFunction)); 56 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WeakObjectRefConstructor, InternalFunction); 58 57 59 58 } -
trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.h
r229413 r253019 55 55 void finishCreation(VM&, WeakSetPrototype*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WeakSetConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp
r253008 r253019 106 106 // Instead, these constructors should always be ALWAYS_INLINE. 107 107 108 class JSDollarVMCallFrame : public JS DestructibleObject {109 using Base = JS DestructibleObject;108 class JSDollarVMCallFrame : public JSNonFinalObject { 109 using Base = JSNonFinalObject; 110 110 public: 111 111 JSDollarVMCallFrame(VM& vm, Structure* structure) -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyCompileError.h
r251425 r253019 34 34 class JSWebAssemblyCompileError final : public ErrorInstance { 35 35 public: 36 typedef ErrorInstance Base;36 using Base = ErrorInstance; 37 37 38 38 static JSWebAssemblyCompileError* create(JSGlobalObject*, VM&, Structure*, const String&); … … 47 47 JSWebAssemblyCompileError(VM&, Structure*); 48 48 }; 49 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSWebAssemblyCompileError, ErrorInstance); 49 50 50 51 JSObject* createJSWebAssemblyCompileError(JSGlobalObject*, VM&, const String&); -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyLinkError.h
r251425 r253019 47 47 JSWebAssemblyLinkError(VM&, Structure*); 48 48 }; 49 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSWebAssemblyLinkError, ErrorInstance); 49 50 50 51 JSObject* createJSWebAssemblyLinkError(JSGlobalObject*, VM&, const String&); -
trunk/Source/JavaScriptCore/wasm/js/JSWebAssemblyRuntimeError.h
r251425 r253019 43 43 JSWebAssemblyRuntimeError(VM&, Structure*); 44 44 }; 45 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(JSWebAssemblyRuntimeError, ErrorInstance); 45 46 46 47 JSObject* createJSWebAssemblyRuntimeError(JSGlobalObject*, VM&, const String&); -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.h
r250005 r253019 51 51 WebAssemblyCompileErrorConstructor(VM&, Structure*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyCompileErrorConstructor, InternalFunction); 53 54 54 55 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.h
r251425 r253019 55 55 WebAssemblyInstanceConstructor(VM&, Structure*); 56 56 }; 57 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyInstanceConstructor, InternalFunction); 57 58 58 59 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.h
r250005 r253019 51 51 WebAssemblyLinkErrorConstructor(VM&, Structure*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyLinkErrorConstructor, InternalFunction); 53 54 54 55 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.h
r250005 r253019 51 51 WebAssemblyMemoryConstructor(VM&, Structure*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyMemoryConstructor, InternalFunction); 53 54 54 55 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.h
r251425 r253019 56 56 WebAssemblyModuleConstructor(VM&, Structure*); 57 57 }; 58 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyModuleConstructor, InternalFunction); 58 59 59 60 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.h
r250005 r253019 51 51 WebAssemblyRuntimeErrorConstructor(VM&, Structure*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyRuntimeErrorConstructor, InternalFunction); 53 54 54 55 } // namespace JSC -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.h
r250005 r253019 51 51 WebAssemblyTableConstructor(VM&, Structure*); 52 52 }; 53 STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(WebAssemblyTableConstructor, InternalFunction); 53 54 54 55 } // namespace JSC
Note: See TracChangeset
for help on using the changeset viewer.