Explicit representation of ASTs for all the functions in a compile unit.
Added AST and Function classes. Now, we parse the whole file and build up the AST for all of the functions in the Module before we emit IR for the functions (vs. before, when we generated IR along the way as we parsed the source file.)
This commit is contained in:
11
ctx.h
11
ctx.h
@@ -59,14 +59,15 @@ struct CFInfo;
|
||||
class FunctionEmitContext {
|
||||
public:
|
||||
/** Create a new FunctionEmitContext.
|
||||
@param returnType The return type of the function
|
||||
@param function LLVM function in the current module that corresponds
|
||||
@param function The Function object representing the function
|
||||
@param sym Symbol that corresponds to the function
|
||||
@param llvmFunction LLVM function in the current module that corresponds
|
||||
to the function
|
||||
@param funSym Symbol that corresponds to the function
|
||||
@param firstStmtPos Source file position of the first statement in the
|
||||
function
|
||||
*/
|
||||
FunctionEmitContext(const Type *returnType, llvm::Function *function, Symbol *funSym,
|
||||
FunctionEmitContext(Function *function, Symbol *funSym,
|
||||
llvm::Function *llvmFunction,
|
||||
SourcePos firstStmtPos);
|
||||
~FunctionEmitContext();
|
||||
|
||||
@@ -86,6 +87,8 @@ public:
|
||||
/** Returns the current mask value */
|
||||
llvm::Value *GetMask();
|
||||
|
||||
void SetMaskPointer(llvm::Value *p);
|
||||
|
||||
/** Provides the value of the mask at function entry */
|
||||
void SetEntryMask(llvm::Value *val);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user