plugify 1.2.6
Loading...
Searching...
No Matches
helpers.hpp
1#pragma once
2
3#include <asmjit/core.h>
4#include <plugify/method.hpp>
5
10 template<typename T>
11 constexpr asmjit::TypeId GetTypeIdx() noexcept {
12 return static_cast<asmjit::TypeId>(asmjit::TypeUtils::TypeIdOfT<T>::kTypeId);
13 }
14
15 bool HasHiArgSlot(asmjit::TypeId typeId) noexcept;
16
17 asmjit::TypeId GetValueTypeId(ValueType valueType) noexcept;
18
19 asmjit::TypeId GetRetTypeId(ValueType valueType) noexcept;
20
21 asmjit::CallConvId GetCallConv([[maybe_unused]] std::string_view conv) noexcept;
22
23 struct SimpleErrorHandler : asmjit::ErrorHandler {
24 asmjit::Error error{asmjit::kErrorOk};
25 const char* code{};
26
27 void handleError(asmjit::Error err, const char* message, asmjit::BaseEmitter* ) override {
28 error = err;
29 code = message;
30 }
31 };
32} // namespace plugify::JitUtils
33
Namespace containing utility functions of jit related things.
Definition helpers.hpp:9