/* * 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. */ // Autogenerated file -- DO NOT EDIT! #ifndef PANDA_RUNTIME_INCLUDE_INTRINSICS_H_ #define PANDA_RUNTIME_INCLUDE_INTRINSICS_H_ #include "bridge/bridge.h" #include "include/coretypes/tagged_value.h" namespace panda { class ObjectHeader; using tagged = coretypes::TaggedValue; namespace coretypes { class Array; class String; } // namespace coretypes } // namespace panda namespace panda::intrinsics { enum class Intrinsic : uint16_t { % Runtime::intrinsics.each do |intrinsic| <%= intrinsic.enum_name %>, % end }; bool Initialize(); extern "C" void UnknownIntrinsic(); // NOLINT(readability-named-parameter) } // namespace panda::intrinsics % Runtime::intrinsics.select { |i| i.need_decl }.group_by { |i| i.impl.rpartition('::').first }.each_pair do |ns, group| namespace <%= ns %> { % group.each do |i| % impl_name = i.impl.rpartition('::').last % if i.private == true #ifndef PANDA_PRODUCT_BUILD % end extern "C" <%= i.impl_signature.ret %> <%= impl_name %>(<%= i.impl_signature.args.join(', ') %>); // NOLINT(readability-named-parameter) % if i.need_abi_wrapper? % impl_name = i.orig_impl.rpartition('::').last <%= i.orig_impl_signature.ret %> <%= impl_name %>(<%= i.orig_impl_signature.args.join(', ') %>); // NOLINT(readability-named-parameter) % end % if i.private == true #endif // PANDA_PRODUCT_BUILD % end % end } // namespace <%= ns %> % end #endif // PANDA_RUNTIME_INCLUDE_INTRINSICS_H_