diff options
author | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-09 02:57:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:56 -0700 |
commit | 8d121d51b6f88e90d166af84d098c6e3af066a87 (patch) | |
tree | 46a807115ba29f029fe2370808a459aa243075d6 /expression.h | |
parent | Now that inlining works, make the return handling work properly too, (diff) | |
download | sparse-8d121d51b6f88e90d166af84d098c6e3af066a87.tar.gz sparse-8d121d51b6f88e90d166af84d098c6e3af066a87.tar.bz2 sparse-8d121d51b6f88e90d166af84d098c6e3af066a87.zip |
Split tree evaluation into two phases: the first phase
does type evaluation, the second one does value evaluation
and inline expansion.
This has the advantage that by the time we do value evaluation
and inline expansion, we have traversed the tree fully once,
which allows us to take advantage of function-global information,
ie we know whether symbols have ever been accessed etc.
Diffstat (limited to 'expression.h')
-rw-r--r-- | expression.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/expression.h b/expression.h index 8a5ea3b..a9245ca 100644 --- a/expression.h +++ b/expression.h @@ -125,6 +125,8 @@ extern struct symbol *evaluate_symbol(struct symbol *sym); extern struct symbol *evaluate_statement(struct statement *stmt); extern struct symbol *evaluate_expression(struct expression *); +extern void expand_symbol(struct symbol *); + static inline struct expression *alloc_expression(struct position pos, int type) { struct expression *expr = __alloc_expression(0); |