hobbes
a language, embedded compiler, and runtime for efficient dynamic expression evaluation, data storage and analysis
cexpr.H
Go to the documentation of this file.
1 #ifndef HOBBES_EVAL_CEXPR_HPP_INCLUDED
2 #define HOBBES_EVAL_CEXPR_HPP_INCLUDED
3 
4 #include <hobbes/eval/jitcc.H>
5 #include <hobbes/util/llvm.H>
6 #include <hobbes/lang/expr.H>
7 
8 namespace hobbes {
9 
10 llvm::Value* toLLVM(jitcc*, const ExprPtr& exp);
11 
12 // used for compiling recursive functions
13 llvm::Value* toLLVM(jitcc* e, const std::string& vname, const ExprPtr& exp);
14 
15 // used for compiling primitive integral values
16 llvm::ConstantInt* toLLVMConstantInt(const PrimitivePtr&);
17 
18 // used for compiling any constant value (if it can't be compiled as a constant, null will be returned)
19 llvm::Constant* toLLVMConstant(jitcc*, const std::string&, const ExprPtr&);
20 
21 }
22 
23 #endif
llvm::ConstantInt * toLLVMConstantInt(const PrimitivePtr &)
Definition: cexpr.C:64
Definition: boot.H:7
std::shared_ptr< Primitive > PrimitivePtr
Definition: expr.H:86
llvm::Constant * toLLVMConstant(jitcc *, const std::string &, const ExprPtr &)
Definition: cexpr.C:756
llvm::Value * toLLVM(jitcc *, const ExprPtr &exp)
Definition: cexpr.C:617
std::shared_ptr< Expr > ExprPtr
Definition: expr.H:58