MysoreScript
Namespaces | Typedefs | Functions
compiler.cc File Reference
#include <functional>
#include "interpreter.hh"
#include "compiler.hh"
#include "ast.hh"
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#include <llvm/IR/LegacyPassManager.h>
#include <llvm/Support/TargetSelect.h>
Include dependency graph for compiler.cc:

Go to the source code of this file.

Namespaces

 anonymous_namespace{compiler.cc}
 

Typedefs

typedef std::function< Value *(Compiler::Context &c, Value *, Value *)> anonymous_namespace{compiler.cc}::BinOpFn
 A function type that is used by the compileBinaryOp function. More...
 

Functions

template<typename T >
Value * anonymous_namespace{compiler.cc}::staticAddress (Compiler::Context &c, T *ptr, Type *ty)
 Helper function that turns a pointer that is known at compile time into a constant in the code. More...
 
Value * anonymous_namespace{compiler.cc}::compileSmallInt (Compiler::Context &c, Value *i)
 Generate a small integer object from an integer value. More...
 
Value * anonymous_namespace{compiler.cc}::compileSmallInt (Compiler::Context &c, intptr_t i)
 Generate a small integer object from an integer constant. More...
 
Value * anonymous_namespace{compiler.cc}::getAsObject (Compiler::Context &c, Value *i)
 Get the specified value as the LLVM type used for object pointers. More...
 
Value * anonymous_namespace{compiler.cc}::getAsSmallInt (Compiler::Context &c, Value *i)
 Get the specified value as the LLVM type used for small integer objects. More...
 
Value * anonymous_namespace{compiler.cc}::compileCompare (Compiler::Context &c, CmpInst::Predicate Op, Value *LHS, Value *RHS)
 Helper function that inserts all of the code required for comparison operations. More...
 
Value * anonymous_namespace{compiler.cc}::compileBinaryOp (Compiler::Context &c, Value *LHS, Value *RHS, Instruction::BinaryOps Op, const char *slowCallFnName)
 Helper function that inserts all of the code required for small integer operations, either calling the relevant method or doing the arithmetic. More...