Lines Matching defs:table
30 * Link to the next symbol in the table with the same name
39 * Link to the next symbol in the table with the same scope
74 /** Linkage in list of all headers in a given symbol table. */
101 /** Hash table containing all symbols in the symbol table. */
107 /** List of all symbol headers in the table. */
134 check_symbol_table(struct _mesa_symbol_table *table)
139 for (scope = table->current_scope; scope != NULL; scope = scope->next) {
159 _mesa_symbol_table_pop_scope(struct _mesa_symbol_table *table)
161 struct scope_level *const scope = table->current_scope;
164 table->current_scope = scope->next;
165 table->depth--;
182 check_symbol_table(table);
187 _mesa_symbol_table_push_scope(struct _mesa_symbol_table *table)
191 scope->next = table->current_scope;
192 table->current_scope = scope;
193 table->depth++;
198 find_symbol(struct _mesa_symbol_table *table, const char *name)
200 return (struct symbol_header *) hash_table_find(table->ht, name);
205 _mesa_symbol_table_iterator_ctor(struct _mesa_symbol_table *table,
209 struct symbol_header *const hdr = find_symbol(table, name);
280 _mesa_symbol_table_symbol_scope(struct _mesa_symbol_table *table,
283 struct symbol_header *const hdr = find_symbol(table, name);
291 assert(sym->depth <= table->depth);
292 return sym->depth - table->depth;
302 _mesa_symbol_table_find_symbol(struct _mesa_symbol_table *table,
305 struct symbol_header *const hdr = find_symbol(table, name);
325 _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
332 check_symbol_table(table);
334 hdr = find_symbol(table, name);
336 check_symbol_table(table);
342 hash_table_insert(table->ht, hdr, hdr->name);
343 hdr->next = table->hdr;
344 table->hdr = hdr;
347 check_symbol_table(table);
350 * be added to the table.
358 if (sym && (sym->depth == table->depth))
363 sym->next_with_same_scope = table->current_scope->symbols;
367 sym->depth = table->depth;
372 table->current_scope->symbols = sym;
374 check_symbol_table(table);
380 _mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *table,
389 check_symbol_table(table);
391 hdr = find_symbol(table, name);
393 check_symbol_table(table);
399 hash_table_insert(table->ht, hdr, hdr->name);
400 hdr->next = table->hdr;
401 table->hdr = hdr;
404 check_symbol_table(table);
407 * be added to the table.
419 for (top_scope = table->current_scope
448 check_symbol_table(table);
457 struct _mesa_symbol_table *table = calloc(1, sizeof(*table));
459 if (table != NULL) {
460 table->ht = hash_table_ctor(32, hash_table_string_hash,
463 _mesa_symbol_table_push_scope(table);
466 return table;
471 _mesa_symbol_table_dtor(struct _mesa_symbol_table *table)
476 while (table->current_scope != NULL) {
477 _mesa_symbol_table_pop_scope(table);
480 for (hdr = table->hdr; hdr != NULL; hdr = next) {
486 hash_table_dtor(table->ht);
487 free(table);