]>
git.saurik.com Git - apple/javascriptcore.git/blob - kjs/function_object.h
1 // -*- c-basic-offset: 2 -*-
3 * This file is part of the KDE libraries
4 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
5 * Copyright (C) 2006 Apple Computer, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23 #ifndef FUNCTION_OBJECT_H_
24 #define FUNCTION_OBJECT_H_
26 #include "object_object.h"
34 * The initial value of Function.prototype (and thus all objects created
35 * with the Function constructor)
37 class FunctionPrototype
: public InternalFunctionImp
{
39 FunctionPrototype(ExecState
*);
41 virtual JSValue
* callAsFunction(ExecState
*, JSObject
*, const List
&);
47 * The initial value of the the global variable's "Function" property
49 class FunctionObjectImp
: public InternalFunctionImp
{
51 FunctionObjectImp(ExecState
*, FunctionPrototype
*);
53 virtual bool implementsConstruct() const;
54 virtual JSObject
* construct(ExecState
*, const List
&);
55 virtual JSObject
* construct(ExecState
*, const List
&, const Identifier
& functionName
, const UString
& sourceURL
, int lineNumber
);
56 virtual JSValue
* callAsFunction(ExecState
*, JSObject
*, const List
&);
61 #endif // _FUNCTION_OBJECT_H_