aboutsummaryrefslogtreecommitdiff
path: root/include/cps/CodeGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-18 06:09:01 +0000
committer_ov4 <ov4@ov4.org>2026-10-18 06:09:01 +0000
commitb17f101cfc75565f9991c856ec62f1e17b0ab104 (patch)
tree6c925f06c45dbaa557a0451cfca33f17be71ec67 /include/cps/CodeGen.h
parent16231050058131860f710073c17d3bca7c6637eb (diff)
feat(operators): add member and unary overloads with explicit calls
Select member and global candidates together, enforce private access, and reuse argument marshalling. Materialize temporary receivers for chaining and register them for the existing object cleanup mechanism. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
-rw-r--r--include/cps/CodeGen.h7
1 files changed, 7 insertions, 0 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);