From 5a5a14be5e2683a42906da4b2ad19690e230c871 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Thu, 22 Oct 2026 15:15:20 +0000 Subject: feat(codegen): short-circuit AND and OR Co-Authored-By: Claude Sonnet 5.5 --- include/cps/CodeGen.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/cps') diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h index 3b0296f..539a6e6 100644 --- a/include/cps/CodeGen.h +++ b/include/cps/CodeGen.h @@ -201,6 +201,8 @@ class CodeGen { // Read a value from resolved storage. llvm::Value *loadFromLValue(const LValueInfo &LV); llvm::Value *emitAllocationSize(ExprAST *Expr); + static bool isLogicalOperand(const TypeInfo *T); + llvm::Value *emitShortCircuit(BinaryExprAST *Bin, const TypeInfo *LT, const TypeInfo *RT); llvm::Value *emitIntBuiltin(ExprAST *Arg, int Line); llvm::Value *emitCall(const std::string &Callee, const std::vector> &ArgExprs, int Line, -- cgit v1.3.1-4-g156e