diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 15:15:20 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 15:21:14 +0000 |
| commit | 5a5a14be5e2683a42906da4b2ad19690e230c871 (patch) | |
| tree | 2b039a41a7ffe9ed193f88218e94d324c9fa43fd /include/cps/CodeGen.h | |
| parent | 64622b737f070b377fdef3fb31a67c084457bd7b (diff) | |
feat(codegen): short-circuit AND and OR
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
| -rw-r--r-- | include/cps/CodeGen.h | 2 |
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, |
