Lines Matching refs:sym
90 struct symbol *sym = scope->symbols;
97 while (sym != NULL) {
98 struct symbol *const next = sym->next_with_same_scope;
100 sym->name);
101 if (sym->next_with_same_name) {
105 hte->key = sym->next_with_same_name->name;
106 hte->data = sym->next_with_same_name;
109 free(sym->name);
112 free(sym);
113 sym = next;
153 struct symbol *const sym = find_symbol(table, name);
155 if (sym) {
156 assert(sym->depth <= table->depth);
157 return table->depth - sym->depth;
168 struct symbol *const sym = find_symbol(table, name);
169 if (sym)
170 return sym->data;
181 struct symbol *sym = find_symbol(table, name);
183 if (sym && sym->depth == table->depth)
186 new_sym = calloc(1, sizeof(*sym));
192 if (sym) {
194 new_sym->next_with_same_name = sym;
195 new_sym->name = sym->name;
221 struct symbol *sym = find_symbol(table, name);
224 if (sym == NULL)
227 sym->data = declaration;
237 struct symbol *sym = find_symbol(table, name);
239 while (sym) {
240 if (sym->depth == 0)
243 inner_sym = sym;
246 sym = sym->next_with_same_name;
255 sym = calloc(1, sizeof(*sym));
256 if (sym == NULL) {
265 inner_sym->next_with_same_name = sym;
267 sym->name = inner_sym->name;
269 sym->name = strdup(name);
270 if (sym->name == NULL) {
271 free(sym);
277 sym->next_with_same_scope = top_scope->symbols;
278 sym->data = declaration;
280 top_scope->symbols = sym;
282 _mesa_hash_table_insert(table->ht, sym->name, sym);