glsl: remove {add,get}_type_ast from glsl_symbol_table
They are not needed since 0da1a2cc36.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -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 '}'
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user