parallel-rsp/debug_jit.hpp
Hans-Kristian Arntzen b7d23a9d07 Run clang format.
2020-01-29 21:39:26 +01:00

32 lines
514 B
C++

#ifndef DEBUG_JIT_HPP__
#define DEBUG_JIT_HPP__
#include <memory>
#include <stdint.h>
#include <string>
#include <unordered_map>
namespace JIT
{
using Func = void (*)(void *, void *);
class DebugBlock
{
public:
DebugBlock(const std::unordered_map<std::string, uint64_t> &symbol_table);
~DebugBlock();
bool compile(uint64_t hash, const std::string &source);
Func get_func() const
{
return block;
}
private:
struct Impl;
std::unique_ptr<Impl> impl;
Func block = nullptr;
};
} // namespace JIT
#endif