Lines Matching refs: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);
281 _mesa_symbol_table_symbol_scope(struct _mesa_symbol_table *table,
284 struct symbol_header *const hdr = find_symbol(table, name);
292 assert(sym->depth <= table->depth);
293 return sym->depth - table->depth;
303 _mesa_symbol_table_find_symbol(struct _mesa_symbol_table *table,
306 struct symbol_header *const hdr = find_symbol(table, name);
326 _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *table,
333 check_symbol_table(table);
335 hdr = find_symbol(table, name);
337 check_symbol_table(table);
343 hash_table_insert(table->ht, hdr, hdr->name);
344 hdr->next = table->hdr;
345 table->hdr = hdr;
348 check_symbol_table(table);
351 * be added to the table.
359 if (sym && (sym->depth == table->depth))
364 sym->next_with_same_scope = table->current_scope->symbols;
368 sym->depth = table->depth;
373 table->current_scope->symbols = sym;
375 check_symbol_table(table);
381 _mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *table,
390 check_symbol_table(table);
392 hdr = find_symbol(table, name);
394 check_symbol_table(table);
400 hash_table_insert(table->ht, hdr, hdr->name);
401 hdr->next = table->hdr;
402 table->hdr = hdr;
405 check_symbol_table(table);
408 * be added to the table.
420 for (top_scope = table->current_scope
449 check_symbol_table(table);
458 struct _mesa_symbol_table *table = calloc(1, sizeof(*table));
460 if (table != NULL) {
461 table->ht = hash_table_ctor(32, hash_table_string_hash,
464 _mesa_symbol_table_push_scope(table);
467 return table;
472 _mesa_symbol_table_dtor(struct _mesa_symbol_table *table)
477 while (table->current_scope != NULL) {
478 _mesa_symbol_table_pop_scope(table);
481 for (hdr = table->hdr; hdr != NULL; hdr = next) {
487 hash_table_dtor(table->ht);
488 free(table);