From 92be2fdd177503e315ae433b30bdc1c0c21faf38 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Thu, 30 Jul 2015 21:32:43 -0400 Subject: start improving constants support --- lisc/lisc.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lisc/lisc.h') diff --git a/lisc/lisc.h b/lisc/lisc.h index d1c25f0..7f558b0 100644 --- a/lisc/lisc.h +++ b/lisc/lisc.h @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include @@ -13,6 +13,7 @@ typedef struct Ins Ins; typedef struct Phi Phi; typedef struct Blk Blk; typedef struct Sym Sym; +typedef struct Const Const; typedef struct Fn Fn; enum { @@ -158,9 +159,20 @@ struct Sym { int hint; }; +struct Const { + enum { + CUndef, + CNum, + CAddr, + } type; + char label[NString]; + int64_t val; +}; + struct Fn { Blk *start; Sym *sym; + Const *cst; int ntmp; int nblk; Blk **rpo; -- cgit 1.4.1