summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-03-20 15:45:12 +0800
committerChia-I Wu <[email protected]>2014-03-28 10:59:49 +0800
commite7f75745984937d004bf3ce08a2a8fd2149801d1 (patch)
treec3135a88c9a9cfc09241d061b4ab5152873db6e4
parente3418562940f7021b6d4d981666918964c84abb7 (diff)
glsl: remove {add,get}_type_ast from glsl_symbol_table
They are not needed since 0da1a2cc369052643ccaea75a1722cc37652d82a. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Matt Turner <[email protected]>
-rw-r--r--src/glsl/glsl_parser.yy1
-rw-r--r--src/glsl/glsl_symbol_table.cpp25
-rw-r--r--src/glsl/glsl_symbol_table.h2
3 files changed, 0 insertions, 28 deletions
diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
index faaf4388c54..2d0e7be5489 100644
--- a/src/glsl/glsl_parser.yy
+++ b/src/glsl/glsl_parser.yy
@@ -1901,7 +1901,6 @@ struct_specifier:
$$ = new(ctx) ast_struct_specifier($2, $4);
$$->set_location_range(@2, @5);
state->symbols->add_type($2, glsl_type::void_type);
- state->symbols->add_type_ast($2, new(ctx) ast_type_specifier($$));
}
| STRUCT '{' struct_declaration_list '}'
{
diff --git a/src/glsl/glsl_symbol_table.cpp b/src/glsl/glsl_symbol_table.cpp
index 11569f47eda..a052362035b 100644
--- a/src/glsl/glsl_symbol_table.cpp
+++ b/src/glsl/glsl_symbol_table.cpp
@@ -162,23 +162,6 @@ bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
}
-static char *make_ast_name(const char *name)
-{
- char *ast_name = new char[strlen("#ast.") + strlen(name) + 1];
- strcpy(ast_name, "#ast.");
- strcat(ast_name + strlen("#ast."), name);
- return ast_name;
-}
-
-bool glsl_symbol_table::add_type_ast(const char *name, const class ast_type_specifier *a)
-{
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(a);
- char *ast_name = make_ast_name(name);
- bool ret = _mesa_symbol_table_add_symbol(table, -1, ast_name, entry) == 0;
- delete [] ast_name;
- return ret;
-}
-
bool glsl_symbol_table::add_interface(const char *name, const glsl_type *i,
enum ir_variable_mode mode)
{
@@ -230,14 +213,6 @@ const glsl_type *glsl_symbol_table::get_type(const char *name)
return entry != NULL ? entry->t : NULL;
}
-const class ast_type_specifier *glsl_symbol_table::get_type_ast(const char *name)
-{
- char *ast_name = make_ast_name(name);
- symbol_table_entry *entry = get_entry(ast_name);
- delete [] ast_name;
- return entry != NULL ? entry->a : NULL;
-}
-
const glsl_type *glsl_symbol_table::get_interface(const char *name,
enum ir_variable_mode mode)
{
diff --git a/src/glsl/glsl_symbol_table.h b/src/glsl/glsl_symbol_table.h
index 0e62448e2e7..f323fc305fa 100644
--- a/src/glsl/glsl_symbol_table.h
+++ b/src/glsl/glsl_symbol_table.h
@@ -98,7 +98,6 @@ public:
/*@{*/
bool add_variable(ir_variable *v);
bool add_type(const char *name, const glsl_type *t);
- bool add_type_ast(const char *name, const class ast_type_specifier *t);
bool add_function(ir_function *f);
bool add_interface(const char *name, const glsl_type *i,
enum ir_variable_mode mode);
@@ -115,7 +114,6 @@ public:
/*@{*/
ir_variable *get_variable(const char *name);
const glsl_type *get_type(const char *name);
- const class ast_type_specifier *get_type_ast(const char *name);
ir_function *get_function(const char *name);
const glsl_type *get_interface(const char *name,
enum ir_variable_mode mode);