aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cps/CodeGen.h7
-rw-r--r--include/cps/Operator.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h
index 30e6d06..9b2d6c5 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -160,11 +160,18 @@ class CodeGen {
bool Ambiguous = false;
};
OperatorResolution resolveOperator(int Op, const TypeInfo *Left, const TypeInfo *Right = nullptr);
+ bool checkOperatorAccess(const FuncSig &Signature);
+ llvm::Value *materializeOperatorReceiver(llvm::Value *Value, const TypeInfo *Type);
+ llvm::Value *emitOperatorCall(const FuncSig &Signature, ExprAST *Left, ExprAST *Right = nullptr);
+ llvm::Value *emitOperatorValues(const FuncSig &Signature, llvm::Value *Left,
+ const TypeInfo *LeftType, llvm::Value *Right);
llvm::Value *emitVariadicArgument(ExprAST *Expr, const std::string &Callee, size_t Position);
bool marshalCallArgs(const FuncSig &Signature,
const std::vector<std::unique_ptr<ExprAST>> &ArgExprs,
int Line,
std::vector<llvm::Value*> &Out);
+ bool marshalCallArgs(const FuncSig &Signature, const std::vector<ExprAST*> &ArgExprs,
+ int Line, std::vector<llvm::Value*> &Out);
llvm::Value *symbolAddress(const SymbolInfo &Info);
void emitAssignment(const LValueInfo &Target, ExprAST *Expr,
const SymbolInfo *Symbol = nullptr);
diff --git a/include/cps/Operator.h b/include/cps/Operator.h
index 7cbb5d9..304793e 100644
--- a/include/cps/Operator.h
+++ b/include/cps/Operator.h
@@ -22,7 +22,7 @@ inline std::string operatorSpelling(int Op) {
}
inline std::string operatorName(int Op) {
- return "OPERATOR" + operatorSpelling(Op);
+ return "OPERATOR " + operatorSpelling(Op);
}
} // namespace cps