|
|
@ -1,8 +1,8 @@ |
|
|
|
|
|
#include <malloc.h> |
|
|
|
|
|
|
|
|
#include <identList.h> |
|
|
#include <identList.h> |
|
|
#include <stmtQueue.h> |
|
|
#include <stmtQueue.h> |
|
|
|
|
|
|
|
|
typedef struct block s_block; |
|
|
|
|
|
|
|
|
|
|
|
struct block /* a stack of used blocks. */ |
|
|
struct block /* a stack of used blocks. */ |
|
|
{ |
|
|
{ |
|
|
s_stmtQueue * stmts; |
|
|
s_stmtQueue * stmts; |
|
|
@ -12,6 +12,11 @@ struct block /* a stack of used blocks. */ |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
s_identList * |
|
|
|
|
|
blockGetIdl (s_block * block) |
|
|
|
|
|
{ |
|
|
|
|
|
return block->idl; |
|
|
|
|
|
} |
|
|
s_block * |
|
|
s_block * |
|
|
blockNew (s_stmtQueue * stmts) |
|
|
blockNew (s_stmtQueue * stmts) |
|
|
{ |
|
|
{ |
|
|
@ -19,7 +24,8 @@ blockNew (s_stmtQueue * stmts) |
|
|
|
|
|
|
|
|
new->stmts = stmts; |
|
|
new->stmts = stmts; |
|
|
new->prev = NULL; |
|
|
new->prev = NULL; |
|
|
new->idl = identListNew (new); |
|
|
|
|
|
|
|
|
new->idl = identListNew (); /* !!!FIXME: i guess idl should know about |
|
|
|
|
|
its block! (Give the block as arg) */ |
|
|
|
|
|
|
|
|
return new; |
|
|
return new; |
|
|
} |
|
|
} |
|
|
|