mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
7fb2c016d7
1. Add object_fast_operator file as the middle layer. 2. move store/load method from fast_runtime_stubs to object_fast_operator 3. delete fast_runtime_stubs fastGet/SetProperty methods, and move them to object_fast_operator Issues: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I6AZSI Signed-off-by: weng-xi <wengxi1@huawei.com> Change-Id: If4aebd3a0723eda641e214d81838caebf193aac2
68 lines
3.3 KiB
C++
68 lines
3.3 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_INTERPRETER_FAST_RUNTIME_STUB_H
|
|
#define ECMASCRIPT_INTERPRETER_FAST_RUNTIME_STUB_H
|
|
|
|
#include <memory>
|
|
|
|
#include "ecmascript/frames.h"
|
|
#include "ecmascript/js_tagged_value.h"
|
|
|
|
namespace panda::ecmascript {
|
|
class GlobalEnv;
|
|
class PropertyAttributes;
|
|
|
|
class FastRuntimeStub {
|
|
public:
|
|
static inline JSTaggedValue FastMul(JSTaggedValue left, JSTaggedValue right);
|
|
static inline JSTaggedValue FastDiv(JSTaggedValue left, JSTaggedValue right);
|
|
static inline JSTaggedValue FastMod(JSTaggedValue left, JSTaggedValue right);
|
|
static inline JSTaggedValue FastEqual(JSTaggedValue left, JSTaggedValue right);
|
|
static inline JSTaggedValue FastTypeOf(JSThread *thread, JSTaggedValue obj);
|
|
static inline JSTaggedValue FastStrictEqual(JSTaggedValue left, JSTaggedValue right);
|
|
static inline JSTaggedValue NewLexicalEnv(JSThread *thread, ObjectFactory *factory, uint16_t numVars);
|
|
static inline JSTaggedValue GetGlobalOwnProperty(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue GetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue GetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue GetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue SetPropertyByName(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
|
JSTaggedValue value);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue SetPropertyByValue(JSThread *thread, JSTaggedValue receiver, JSTaggedValue key,
|
|
JSTaggedValue value);
|
|
template<bool UseOwn = false>
|
|
static inline JSTaggedValue SetPropertyByIndex(JSThread *thread, JSTaggedValue receiver, uint32_t index,
|
|
JSTaggedValue value);
|
|
|
|
static inline JSTaggedValue NewThisObject(JSThread *thread, JSTaggedValue ctor, JSTaggedValue newTarget,
|
|
InterpretedFrame* state);
|
|
static inline JSTaggedValue CallGetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue holder,
|
|
JSTaggedValue value);
|
|
|
|
private:
|
|
friend class ICRuntimeStub;
|
|
|
|
static inline JSTaggedValue CallSetter(JSThread *thread, JSTaggedValue receiver, JSTaggedValue value,
|
|
JSTaggedValue accessorValue);
|
|
};
|
|
} // namespace panda::ecmascript
|
|
|
|
#endif // ECMASCRIPT_INTERPRETER_OBJECT_OPERATOR_INL_H
|