From 77c71f5aedd9598021b14c796e0ea540e8fddf57 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Mon, 16 Dec 2024 22:01:02 +0530 Subject: Add typechecker phase for signed, unsigned --- src/cljcc/schema.clj | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/cljcc/schema.clj') diff --git a/src/cljcc/schema.clj b/src/cljcc/schema.clj index 936a0ea..6a4fb1f 100644 --- a/src/cljcc/schema.clj +++ b/src/cljcc/schema.clj @@ -295,15 +295,25 @@ [:type [:= :int-init]] [:value int?]]) +(def UIntInit + [:map + [:type [:= :uint-init]] + [:value int?]]) + (def LongInit [:map [:type [:= :long-init]] [:value int?]]) +(def ULongInit + [:map + [:type [:= :ulong-init]] + [:value int?]]) + (def Initial [:map [:type [:= :initial]] - [:static-init [:or IntInit LongInit]]]) + [:static-init [:or IntInit LongInit UIntInit ULongInit]]]) (def InitialValue [:or @@ -336,6 +346,8 @@ [:ident->symbol #'SymbolMap] [:program #'Program]]) +;;;; Tacky Schema + (def TackyVar [:map [:type [:= :variable]] -- cgit v1.2.3