Mercurial > hg > index.cgi
comparison lwasm/lwasm.h @ 195:17bd59f045af
Changed symbol table to use a binary tree.
Changed symbol table to use a binary tree. Hopefully this improves table
lookups some but the tree really needs to be balanced at some point.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 11 Mar 2012 16:05:54 -0600 |
parents | fc8386b13399 |
children | 080bb67d84f2 |
comparison
equal
deleted
inserted
replaced
194:f8b33b3a45ac | 195:17bd59f045af |
---|---|
202 int context; // symbol context (-1 for global) | 202 int context; // symbol context (-1 for global) |
203 int version; // version of the symbol (for "set") | 203 int version; // version of the symbol (for "set") |
204 int flags; // flags for the symbol | 204 int flags; // flags for the symbol |
205 sectiontab_t *section; // section the symbol is defined in | 205 sectiontab_t *section; // section the symbol is defined in |
206 lw_expr_t value; // symbol value | 206 lw_expr_t value; // symbol value |
207 struct symtabe *next; // next symbol in the table | 207 struct symtabe *left; // left subtree pointer |
208 struct symtabe *right; // right subtree pointer | |
209 struct symtabe *nextver; // next lower version | |
208 }; | 210 }; |
209 | 211 |
210 typedef struct | 212 typedef struct |
211 { | 213 { |
212 struct symtabe *head; // start of symbol table | 214 struct symtabe *head; // start of symbol table |