/* * 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_STUB_INL_H #define ECMASCRIPT_COMPILER_STUB_INL_H #include "ecmascript/compiler/stub.h" #include "mem/region_space.h" namespace panda::ecmascript::kungfu { using LabelImpl = Stub::Label::LabelImpl; using JSTaggedValue = JSTaggedValue; using JSFunction = panda::ecmascript::JSFunction; using PropertyBox = panda::ecmascript::PropertyBox; void Stub::Label::Seal() { return impl_->Seal(); } void Stub::Label::WriteVariable(Stub::Variable *var, GateRef value) { impl_->WriteVariable(var, value); } GateRef Stub::Label::ReadVariable(Stub::Variable *var) { return impl_->ReadVariable(var); } void Stub::Label::Bind() { impl_->Bind(); } void Stub::Label::MergeAllControl() { impl_->MergeAllControl(); } void Stub::Label::MergeAllDepend() { impl_->MergeAllDepend(); } void Stub::Label::AppendPredecessor(const Stub::Label *predecessor) { impl_->AppendPredecessor(predecessor->GetRawLabel()); } std::vector Stub::Label::GetPredecessors() const { std::vector