blob: 6af48611d7b28f295a7e5c7d4f53efef27e2b8e0 [file] [log] [blame]
kocienda66a6d362001-08-24 14:24:45 +00001/*
kocienda66a6d362001-08-24 14:24:45 +00002 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
darin@apple.com8281d832008-09-21 02:29:12 +00003 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
kocienda66a6d362001-08-24 14:24:45 +00004 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
mjscdff33b2006-01-23 21:41:36 +000017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
mjs6f821c82002-03-22 00:31:57 +000018 *
kocienda66a6d362001-08-24 14:24:45 +000019 */
20
weinig@apple.com2ce2a7f2008-06-28 21:22:01 +000021#ifndef FunctionConstructor_h
22#define FunctionConstructor_h
kocienda66a6d362001-08-24 14:24:45 +000023
weinig@apple.comf0ea3552008-07-01 01:11:22 +000024#include "InternalFunction.h"
kocienda66a6d362001-08-24 14:24:45 +000025
cwzwarich@webkit.org3f782f62008-09-08 01:28:33 +000026namespace JSC {
kocienda66a6d362001-08-24 14:24:45 +000027
weinig@apple.com2ce2a7f2008-06-28 21:22:01 +000028 class FunctionPrototype;
weinig@apple.com8a6ccbd2008-02-12 01:24:02 +000029
weinig@apple.com2ce2a7f2008-06-28 21:22:01 +000030 class FunctionConstructor : public InternalFunction {
weinig@apple.com415e1c522008-01-17 19:27:33 +000031 public:
oliver@apple.com5dea6152010-05-21 18:19:42 +000032 FunctionConstructor(ExecState*, JSGlobalObject*, NonNullPassRefPtr<Structure>, FunctionPrototype*);
weinig@apple.com0e2d66e2008-07-06 05:26:58 +000033
darin@apple.com1edff432008-06-24 05:23:17 +000034 private:
mrowe@apple.com2f6dfdf2008-05-22 01:20:45 +000035 virtual ConstructType getConstructData(ConstructData&);
darin@apple.com1edff432008-06-24 05:23:17 +000036 virtual CallType getCallData(CallData&);
weinig@apple.com415e1c522008-01-17 19:27:33 +000037 };
mjs6f821c82002-03-22 00:31:57 +000038
weinig@apple.com2ce2a7f2008-06-28 21:22:01 +000039 JSObject* constructFunction(ExecState*, const ArgList&, const Identifier& functionName, const UString& sourceURL, int lineNumber);
40 JSObject* constructFunction(ExecState*, const ArgList&);
41
cwzwarich@webkit.org3f782f62008-09-08 01:28:33 +000042} // namespace JSC
mjs6f821c82002-03-22 00:31:57 +000043
weinig@apple.com2ce2a7f2008-06-28 21:22:01 +000044#endif // FunctionConstructor_h