summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/symbol_table.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-21 16:50:52 +1100
committerTimothy Arceri <[email protected]>2016-10-24 21:40:39 +1100
commit6dbe8a1b9fd750b4c1bb600a0bb43129d95e6eca (patch)
treee94d879f69543871534f59c3ffbfb6adf49efdce /src/mesa/program/symbol_table.h
parent907ace57986733add2aebfa9dd7c83c67efed70e (diff)
glsl/mesa: remove unused namespace support from the symbol table
Namespace support seems to have been unused for a very long time. Previously the hash table entry was never removed and the symbol name wasn't freed until the symbol table was destroyed. In theory this could reduced the number of times we need to copy a string as duplicate names are reused. However in practice there is likely only a limited number of symbols that are the same and this is likely to cause other less than optimal behaviour such as the hash_table continuously growing. Along with dropping namespace support this change removes entries from the hash table as they become unused. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src/mesa/program/symbol_table.h')
-rw-r--r--src/mesa/program/symbol_table.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/program/symbol_table.h b/src/mesa/program/symbol_table.h
index 1027f476110..ff1e6f2065a 100644
--- a/src/mesa/program/symbol_table.h
+++ b/src/mesa/program/symbol_table.h
@@ -30,17 +30,18 @@ extern void _mesa_symbol_table_push_scope(struct _mesa_symbol_table *table);
extern void _mesa_symbol_table_pop_scope(struct _mesa_symbol_table *table);
extern int _mesa_symbol_table_add_symbol(struct _mesa_symbol_table *symtab,
- int name_space, const char *name, void *declaration);
+ const char *name, void *declaration);
-extern int _mesa_symbol_table_add_global_symbol(
- struct _mesa_symbol_table *symtab, int name_space, const char *name,
- void *declaration);
+extern int
+_mesa_symbol_table_add_global_symbol(struct _mesa_symbol_table *symtab,
+ const char *name,
+ void *declaration);
extern int _mesa_symbol_table_symbol_scope(struct _mesa_symbol_table *table,
- int name_space, const char *name);
+ const char *name);
-extern void *_mesa_symbol_table_find_symbol(
- struct _mesa_symbol_table *symtab, int name_space, const char *name);
+extern void *_mesa_symbol_table_find_symbol(struct _mesa_symbol_table *symtab,
+ const char *name);
extern struct _mesa_symbol_table *_mesa_symbol_table_ctor(void);