- return throwError(exec, createSyntaxError(exec, "Syntax error"));
-}
-
-class StrictModeTypeErrorFunction : public InternalFunction {
-public:
- StrictModeTypeErrorFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& message)
- : InternalFunction(&exec->globalData(), globalObject, structure, exec->globalData().propertyNames->emptyIdentifier)
- , m_message(message)
- {
- }
-
- static EncodedJSValue JSC_HOST_CALL constructThrowTypeError(ExecState* exec)
- {
- throwTypeError(exec, static_cast<StrictModeTypeErrorFunction*>(exec->callee())->m_message);
- return JSValue::encode(jsNull());
- }
-
- ConstructType getConstructData(ConstructData& constructData)
- {
- constructData.native.function = constructThrowTypeError;
- return ConstructTypeHost;
- }
-
- static EncodedJSValue JSC_HOST_CALL callThrowTypeError(ExecState* exec)
- {
- throwTypeError(exec, static_cast<StrictModeTypeErrorFunction*>(exec->callee())->m_message);
- return JSValue::encode(jsNull());
- }
-
- CallType getCallData(CallData& callData)
- {
- callData.native.function = callThrowTypeError;
- return CallTypeHost;
- }
-
-private:
- UString m_message;
-};
-
-ASSERT_CLASS_FITS_IN_CELL(StrictModeTypeErrorFunction);
-
-JSValue createTypeErrorFunction(ExecState* exec, const UString& message)
-{
- return new (exec) StrictModeTypeErrorFunction(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->internalFunctionStructure(), message);
+ return throwError(exec, createSyntaxError(exec, ASCIILiteral("Syntax error")));
+}
+
+const ClassInfo StrictModeTypeErrorFunction::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(StrictModeTypeErrorFunction) };
+
+void StrictModeTypeErrorFunction::destroy(JSCell* cell)
+{
+ static_cast<StrictModeTypeErrorFunction*>(cell)->StrictModeTypeErrorFunction::~StrictModeTypeErrorFunction();