mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
0959b86c63
description: 1 use JSCallDispatch implments call new 2 refactor js common call issue: I5AKJU Signed-off-by: sunzhe23 <sunzhe23@huawei.com>
53 lines
1.7 KiB
C++
53 lines
1.7 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_COMPILER_RT_CALL_SIGNATURE_H
|
|
#define ECMASCRIPT_COMPILER_RT_CALL_SIGNATURE_H
|
|
|
|
#include "ecmascript/compiler/call_signature.h"
|
|
#include "ecmascript/stubs/runtime_stubs.h"
|
|
|
|
namespace panda::ecmascript::kungfu {
|
|
class RuntimeStubCSigns {
|
|
public:
|
|
enum ID {
|
|
#define DEF_RUNTIME_STUB_ID(name) ID_##name,
|
|
RUNTIME_STUB_LIST(DEF_RUNTIME_STUB_ID)
|
|
#undef DEF_RUNTIME_STUB_ID
|
|
NUM_OF_STUBS
|
|
};
|
|
|
|
enum NoGCStubID {
|
|
#define DEF_RUNTIME_STUB_ID(name) NOGCSTUB_ID_##name,
|
|
RUNTIME_ASM_STUB_LIST(DEF_RUNTIME_STUB_ID)
|
|
RUNTIME_STUB_WITHOUT_GC_LIST(DEF_RUNTIME_STUB_ID)
|
|
#undef DEF_RUNTIME_STUB_ID
|
|
NUM_OF_RTSTUBS_WITHOUT_GC
|
|
};
|
|
|
|
static void Initialize();
|
|
|
|
static void GetASMCSigns(std::vector<const CallSignature*>& callSigns);
|
|
|
|
static const CallSignature *Get(size_t index)
|
|
{
|
|
ASSERT(index < NUM_OF_RTSTUBS_WITHOUT_GC);
|
|
return &callSigns_[index];
|
|
}
|
|
private:
|
|
static CallSignature callSigns_[NUM_OF_RTSTUBS_WITHOUT_GC];
|
|
};
|
|
#define RTSTUB_ID(name) kungfu::RuntimeStubCSigns::ID_##name
|
|
} // namespace panda::ecmascript::kungfu
|
|
#endif // ECMASCRIPT_COMPILER_RT_CALL_SIGNATURE_H
|