1 /** 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef MERGE_ABC_ASSEMBLY_FUNCTION_H 17 #define MERGE_ABC_ASSEMBLY_FUNCTION_H 18 19 #include "arena_allocator.h" 20 #include "assemblyDebugProto.h" 21 #include "assemblyFileLocationProto.h" 22 #include "assemblyFunction.pb.h" 23 #include "assemblyInsProto.h" 24 #include "assemblyLabelProto.h" 25 #include "assemblyTypeProto.h" 26 #include "assembly-program.h" 27 #include "ideHelpersProto.h" 28 #include "metaProto.h" 29 30 namespace panda::proto { 31 class CatchBlock { 32 public: 33 static void Serialize(const panda::pandasm::Function::CatchBlock &block, protoPanda::CatchBlock &protoBlock); 34 static void Deserialize(const protoPanda::CatchBlock &protoBlock, panda::pandasm::Function::CatchBlock &block); 35 }; 36 37 class Parameter { 38 public: 39 static void Serialize(const panda::pandasm::Function::Parameter ¶m, protoPanda::Parameter &protoParam); 40 static void Deserialize(const protoPanda::Parameter &protoParam, panda::pandasm::Function::Parameter ¶m, 41 panda::ArenaAllocator *allocator); 42 }; 43 44 class Function { 45 public: 46 static void Serialize(const panda::pandasm::Function &function, protoPanda::Function &protoFunction); 47 static void Deserialize(const protoPanda::Function &protoFunction, panda::pandasm::Function &function, 48 panda::ArenaAllocator *allocator); 49 }; 50 } // panda::proto 51 #endif 52