X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCval.h;h=906bc7e5b603d198ff94c1d72b2b6cf5007c787e;hb=916b7e4011f58680d6006400c274310fb1659a7e;hp=77ea58cd5802ddab6cb2eede172d2bfc8669c29f;hpb=29779804200986ce903b5086441b49265a122dc5;p=fw%2Fsdcc diff --git a/src/SDCCval.h b/src/SDCCval.h index 77ea58cd..906bc7e5 100644 --- a/src/SDCCval.h +++ b/src/SDCCval.h @@ -20,10 +20,11 @@ You are forbidden to forbid anyone else to use, share and improve what you give them. Help stamp out software-hoarding! -------------------------------------------------------------------------*/ -#include "SDCCsymt.h" #ifndef SDCCVAL_H #define SDCCVAL_H +#include "SDCCsymt.h" + /* value wrapper */ typedef struct value { @@ -37,6 +38,14 @@ typedef struct value } value; +typedef struct literalList +{ + double literalValue; + unsigned count; + struct literalList *next; +} literalList; + + enum { INIT_NODE, @@ -49,6 +58,7 @@ typedef struct initList { int type; int lineno; + char *filename; union { struct ast *node; @@ -89,18 +99,22 @@ value *valCompare (value *, value *, int); value *valBitwise (value *, value *, int); value *valLogicAndOr (value *, value *, int); value *valCastLiteral (sym_link *, double); -value *valueFromLit (float); +value *valueFromLit (double); initList *newiList (int, void *); initList *revinit (initList *); initList *copyIlist (initList *); double list2int (initList *); value *list2val (initList *); struct ast *list2expr (initList *); -void resolveIvalSym (initList *); +void resolveIvalSym (initList *, sym_link *); value *valFromType (sym_link *); value *constFloatVal (char *); +value *constFixed16x16Val (char *); int getNelements (sym_link *, initList *); value *valForArray (struct ast *); value *valForStructElem (struct ast *, struct ast *); value *valForCastAggr (struct ast *, sym_link *, struct ast *, int); +value *valForCastArr (struct ast * , sym_link *); +bool convertIListToConstList(initList *src, literalList **lList); +literalList *copyLiteralList(literalList *src); #endif