Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (240245 => 240246)
--- trunk/Source/_javascript_Core/ChangeLog 2019-01-22 01:18:28 UTC (rev 240245)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-01-22 01:30:05 UTC (rev 240246)
@@ -1,3 +1,21 @@
+2019-01-21 Yusuke Suzuki <[email protected]>
+
+ [JSC] StrictModeTypeErrorFunction is no longer used
+ https://bugs.webkit.org/show_bug.cgi?id=193662
+
+ Reviewed by Mark Lam.
+
+ StrictModeTypeErrorFunction is no longer used. This patch drops it. Furthermore, it also allows us to drop
+ strictModeTypeErrorFunctionSpace from VM.
+
+ * runtime/Error.cpp:
+ (JSC::StrictModeTypeErrorFunction::destroy): Deleted.
+ * runtime/Error.h:
+ (): Deleted.
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ * runtime/VM.h:
+
2019-01-21 Caio Lima <[email protected]>
DoesGC rule is wrong for nodes with BigIntUse
Modified: trunk/Source/_javascript_Core/runtime/Error.cpp (240245 => 240246)
--- trunk/Source/_javascript_Core/runtime/Error.cpp 2019-01-22 01:18:28 UTC (rev 240245)
+++ trunk/Source/_javascript_Core/runtime/Error.cpp 2019-01-22 01:30:05 UTC (rev 240246)
@@ -361,14 +361,6 @@
return error;
}
-
-const ClassInfo StrictModeTypeErrorFunction::s_info = { "Function", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(StrictModeTypeErrorFunction) };
-
-void StrictModeTypeErrorFunction::destroy(JSCell* cell)
-{
- static_cast<StrictModeTypeErrorFunction*>(cell)->StrictModeTypeErrorFunction::~StrictModeTypeErrorFunction();
-}
-
} // namespace JSC
namespace WTF {
Modified: trunk/Source/_javascript_Core/runtime/Error.h (240245 => 240246)
--- trunk/Source/_javascript_Core/runtime/Error.h 2019-01-22 01:18:28 UTC (rev 240245)
+++ trunk/Source/_javascript_Core/runtime/Error.h 2019-01-22 01:30:05 UTC (rev 240246)
@@ -104,59 +104,6 @@
inline EncodedJSValue throwVMRangeError(ExecState* state, ThrowScope& scope, const String& errorMessage) { return JSValue::encode(throwRangeError(state, scope, errorMessage)); }
inline EncodedJSValue throwVMDOMAttributeGetterTypeError(ExecState* state, ThrowScope& scope, const ClassInfo* classInfo, PropertyName propertyName) { return JSValue::encode(throwDOMAttributeGetterTypeError(state, scope, classInfo, propertyName)); }
-class StrictModeTypeErrorFunction final : public InternalFunction {
-private:
- StrictModeTypeErrorFunction(VM& vm, Structure* structure, const String& message)
- : InternalFunction(vm, structure, callThrowTypeError, constructThrowTypeError)
- , m_message(message)
- {
- }
-
- static void destroy(JSCell*);
-
-public:
- typedef InternalFunction Base;
-
- template<typename CellType>
- static IsoSubspace* subspaceFor(VM& vm)
- {
- return &vm.strictModeTypeErrorFunctionSpace;
- }
-
- static StrictModeTypeErrorFunction* create(VM& vm, Structure* structure, const String& message)
- {
- StrictModeTypeErrorFunction* function = new (NotNull, allocateCell<StrictModeTypeErrorFunction>(vm.heap)) StrictModeTypeErrorFunction(vm, structure, message);
- function->finishCreation(vm, String());
- return function;
- }
-
- static EncodedJSValue JSC_HOST_CALL constructThrowTypeError(ExecState* exec)
- {
- VM& vm = exec->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- throwTypeError(exec, scope, static_cast<StrictModeTypeErrorFunction*>(exec->jsCallee())->m_message);
- return JSValue::encode(jsNull());
- }
-
- static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec)
- {
- VM& vm = exec->vm();
- auto scope = DECLARE_THROW_SCOPE(vm);
- throwTypeError(exec, scope, static_cast<StrictModeTypeErrorFunction*>(exec->jsCallee())->m_message);
- return JSValue::encode(jsNull());
- }
-
- DECLARE_INFO;
-
- static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
- {
- return Structure::create(vm, globalObject, prototype, TypeInfo(InternalFunctionType, StructureFlags), info());
- }
-
-private:
- String m_message;
-};
-
} // namespace JSC
namespace WTF {
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (240245 => 240246)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2019-01-22 01:18:28 UTC (rev 240245)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2019-01-22 01:30:05 UTC (rev 240246)
@@ -319,7 +319,6 @@
, propertyTableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), PropertyTable)
, proxyRevokeSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), ProxyRevoke)
, regExpConstructorSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), RegExpConstructor)
- , strictModeTypeErrorFunctionSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), StrictModeTypeErrorFunction)
, structureRareDataSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), StructureRareData)
, structureSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), Structure)
, weakSetSpace ISO_SUBSPACE_INIT(heap, destructibleObjectHeapCellType.get(), JSWeakSet)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (240245 => 240246)
--- trunk/Source/_javascript_Core/runtime/VM.h 2019-01-22 01:18:28 UTC (rev 240245)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2019-01-22 01:30:05 UTC (rev 240246)
@@ -394,7 +394,6 @@
IsoSubspace propertyTableSpace;
IsoSubspace proxyRevokeSpace;
IsoSubspace regExpConstructorSpace;
- IsoSubspace strictModeTypeErrorFunctionSpace;
IsoSubspace structureRareDataSpace;
IsoSubspace structureSpace;
IsoSubspace weakSetSpace;