![]() |
Spicy
|
#include <jit.h>
Public Member Functions | |
| JIT (const std::shared_ptr< Context > &context, bool dump_code=false) | |
| JIT (const JIT &)=delete | |
| JIT (JIT &&) noexcept=delete | |
| JIT & | operator= (const JIT &)=delete |
| JIT & | operator= (JIT &&) noexcept=delete |
| void | add (CxxCode d) |
| void | add (const hilti::rt::filesystem::path &p) |
| bool | hasInputs () |
| Result< std::shared_ptr< const Library > > | build () |
| auto | context () const |
| auto | options () const |
Just-in-time compiler.
The class provides the entry point for compiling and executing C++ code just in time.
|
explicit |
| context | compiler context to use |
| dump_code | if true, save all C++ code into files dbg.* for debugging |
| void JIT::add | ( | const hilti::rt::filesystem::path & | p | ) |
Schedules C++ for just-in-time compilation. This must be called only before compile().
| d | file to read C++ code from |
| void JIT::add | ( | CxxCode | d | ) |
Schedules C++ for just-in-time compilation. This must be called only before jit().
| d | C++ code |
| hilti::Result< std::shared_ptr< const Library > > JIT::build | ( | ) |
Compiles and links all scheduled C++ code into a shared library.
|
inline |
Returns the compiler context in use.
|
inline |
Returns true if any source files have been added that need to be compiled.
|
inline |
Returns the compiler options in use.