mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-12-02 16:07:20 +00:00
c29332c1d9
Merge pull request !1833 from zhaozhibo/master Change-Id: I1e83c46e25d0a7c342e5c8e7ca5ff61c745b7582
48 lines
1.9 KiB
C++
48 lines
1.9 KiB
C++
/*
|
|
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
#ifndef ECMASCRIPT_BUILTINS_BUILTINS_FUNCTION_H
|
|
#define ECMASCRIPT_BUILTINS_BUILTINS_FUNCTION_H
|
|
|
|
#include "ecmascript/base/builtins_base.h"
|
|
#include "ecmascript/js_tagged_value-inl.h"
|
|
|
|
namespace panda::ecmascript::builtins {
|
|
class BuiltinsFunction : public base::BuiltinsBase {
|
|
public:
|
|
// ecma 19.2.1 Function (p1, p2, ... , pn, body)
|
|
static JSTaggedValue FunctionConstructor(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3 The Function prototype object is itself a built-in function object.
|
|
static JSTaggedValue FunctionPrototypeInvokeSelf(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3.1 Function.prototype.apply (thisArg, argArray)
|
|
static JSTaggedValue FunctionPrototypeApply(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3.2 Function.prototype.bind (thisArg , ...args)
|
|
static JSTaggedValue FunctionPrototypeBind(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3.3 Function.prototype.call (thisArg , ...args)
|
|
static JSTaggedValue FunctionPrototypeCall(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3.5 Function.prototype.toString ()
|
|
static JSTaggedValue FunctionPrototypeToString(EcmaRuntimeCallInfo *argv);
|
|
|
|
// ecma 19.2.3.6 Function.prototype[@@hasInstance] (V)
|
|
static JSTaggedValue FunctionPrototypeHasInstance(EcmaRuntimeCallInfo *argv);
|
|
};
|
|
} // namespace panda::ecmascript::builtins
|
|
#endif // ECMASCRIPT_BUILTINS_BUILTINS_FUNCTION_H
|