/* * Copyright (c) 2022 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_MEM_VISITOR_H #define ECMASCRIPT_MEM_VISITOR_H #include #include #include namespace panda::ecmascript { enum class Root { ROOT_FRAME, ROOT_HANDLE, ROOT_VM, ROOT_STRING, ROOT_INTERNAL_CALL_PARAMS, }; enum class VisitObjectArea { NORMAL, NATIVE_POINTER, IN_OBJECT }; enum class VisitType : size_t { SEMI_GC_VISIT, OLD_GC_VISIT, SNAPSHOT_VISIT }; using RootVisitor = std::function; using RootRangeVisitor = std::function; using RootBaseAndDerivedVisitor = std::function; using EcmaObjectRangeVisitor = std::function; using WeakRootVisitor = std::function; } // namespace panda::ecmascript #endif // ECMASCRIPT_MEM_VISITOR_H