class symbol_table_entry {
public:
- DECLARE_RALLOC_CXX_OPERATORS(symbol_table_entry);
+ DECLARE_LINEAR_ALLOC_CXX_OPERATORS(symbol_table_entry);
bool add_interface(const glsl_type *i, enum ir_variable_mode mode)
{
* entry includes a function, propagate that to this block - otherwise
* the new variable declaration would shadow the function.
*/
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v);
+ symbol_table_entry *entry = new(linalloc) symbol_table_entry(v);
if (existing != NULL)
entry->f = existing->f;
int added = _mesa_symbol_table_add_symbol(table, v->name, entry);
}
/* 1.20+ rules: */
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(v);
+ symbol_table_entry *entry = new(linalloc) symbol_table_entry(v);
return _mesa_symbol_table_add_symbol(table, v->name, entry) == 0;
}
bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
{
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(t);
+ symbol_table_entry *entry = new(linalloc) symbol_table_entry(t);
return _mesa_symbol_table_add_symbol(table, name, entry) == 0;
}
symbol_table_entry *entry = get_entry(name);
if (entry == NULL) {
symbol_table_entry *entry =
- new(mem_ctx) symbol_table_entry(i, mode);
+ new(linalloc) symbol_table_entry(i, mode);
bool add_interface_symbol_result =
_mesa_symbol_table_add_symbol(table, name, entry) == 0;
assert(add_interface_symbol_result);
return true;
}
}
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
+ symbol_table_entry *entry = new(linalloc) symbol_table_entry(f);
return _mesa_symbol_table_add_symbol(table, f->name, entry) == 0;
}
default_specifier->default_precision = precision;
symbol_table_entry *entry =
- new(mem_ctx) symbol_table_entry(default_specifier);
+ new(linalloc) symbol_table_entry(default_specifier);
if (!get_entry(name))
return _mesa_symbol_table_add_symbol(table, name, entry) == 0;
void glsl_symbol_table::add_global_function(ir_function *f)
{
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(f);
+ symbol_table_entry *entry = new(linalloc) symbol_table_entry(f);
int added = _mesa_symbol_table_add_global_symbol(table, f->name, entry);
assert(added == 0);
(void)added;