xo-jit: + compile Apply expressions [wip]

This commit is contained in:
Roland Conybeare 2024-06-13 16:21:19 -04:00
commit 69dfaa931a
3 changed files with 91 additions and 0 deletions

View file

@ -11,6 +11,7 @@
#include "xo/expression/Expression.hpp"
#include "xo/expression/ConstantInterface.hpp"
#include "xo/expression/PrimitiveInterface.hpp"
#include "xo/expression/Apply.hpp"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/BasicBlock.h"
@ -50,6 +51,7 @@ namespace xo {
llvm::Value * codegen_constant(ref::brw<xo::ast::ConstantInterface> expr);
llvm::Function * codegen_primitive(ref::brw<xo::ast::PrimitiveInterface> expr);
llvm::Value * codegen_apply(ref::brw<xo::ast::Apply> expr);
llvm::Value * codegen(ref::brw<Expression> expr);
@ -64,6 +66,8 @@ namespace xo {
* each with its own LLVMContext
**/
std::unique_ptr<llvm::LLVMContext> llvm_cx_;
/** builder for intermediate-representation objects **/
std::unique_ptr<llvm::IRBuilder<>> llvm_ir_builder_;
/** a module (aka library) being prepared by llvm.
* - function names are unique within a module.
**/