aboutsummaryrefslogtreecommitdiff
path: root/include/cps
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 15:15:20 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 15:21:14 +0000
commit5a5a14be5e2683a42906da4b2ad19690e230c871 (patch)
tree2b039a41a7ffe9ed193f88218e94d324c9fa43fd /include/cps
parent64622b737f070b377fdef3fb31a67c084457bd7b (diff)
feat(codegen): short-circuit AND and OR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps')
-rw-r--r--include/cps/CodeGen.h2
1 files changed, 2 insertions, 0 deletions
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<std::unique_ptr<ExprAST>> &ArgExprs, int Line,