aboutsummaryrefslogtreecommitdiff
path: root/include/cps/CodeGen.h
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 15:11:38 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 15:21:14 +0000
commit64622b737f070b377fdef3fb31a67c084457bd7b (patch)
tree8111bfcf325ed9162dac645a0c68536bad954820 /include/cps/CodeGen.h
parentf14b50d776ec743bd62fda22a9c154bba9588840 (diff)
feat(codegen)!: require explicit REAL to INTEGER conversion and add INT
Implicit REAL to INTEGER is now a compile error with an INT(...) hint. INT is a compiler builtin that truncates toward zero and raises a runtime error for NaN or values outside the INTEGER range. No existing test program relied on the implicit conversion. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Diffstat (limited to 'include/cps/CodeGen.h')
-rw-r--r--include/cps/CodeGen.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/cps/CodeGen.h b/include/cps/CodeGen.h
index b31cd3d..3b0296f 100644
--- a/include/cps/CodeGen.h
+++ b/include/cps/CodeGen.h
@@ -201,6 +201,7 @@ class CodeGen {
// Read a value from resolved storage.
llvm::Value *loadFromLValue(const LValueInfo &LV);
llvm::Value *emitAllocationSize(ExprAST *Expr);
+ llvm::Value *emitIntBuiltin(ExprAST *Arg, int Line);
llvm::Value *emitCall(const std::string &Callee,
const std::vector<std::unique_ptr<ExprAST>> &ArgExprs, int Line,
const std::vector<std::string> *Explicit = nullptr);