diff options
author | Marek Olšák <[email protected]> | 2016-10-07 20:41:10 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-31 11:53:38 +0100 |
commit | 23e373eb4f9ca374313306701890642c30e8877e (patch) | |
tree | 5c87523b11265f6912022a9304d94e261f31daeb /src/compiler/glsl/glsl_symbol_table.cpp | |
parent | a4a93103fb8f5c21c4cd17e89f07badfab14c0ab (diff) |
glsl: use the linear allocator in glsl_symbol_table
no ralloc_free occurences
Tested-by: Edmondo Tommasina <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/glsl_symbol_table.cpp')
-rw-r--r-- | src/compiler/glsl/glsl_symbol_table.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/glsl/glsl_symbol_table.cpp b/src/compiler/glsl/glsl_symbol_table.cpp index 8922bb4effb..9ae5fd3e552 100644 --- a/src/compiler/glsl/glsl_symbol_table.cpp +++ b/src/compiler/glsl/glsl_symbol_table.cpp @@ -27,7 +27,7 @@ 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) { @@ -150,7 +150,7 @@ bool glsl_symbol_table::add_variable(ir_variable *v) * 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); @@ -162,13 +162,13 @@ bool glsl_symbol_table::add_variable(ir_variable *v) } /* 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; } @@ -179,7 +179,7 @@ bool glsl_symbol_table::add_interface(const char *name, const glsl_type *i, 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); @@ -199,7 +199,7 @@ bool glsl_symbol_table::add_function(ir_function *f) 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; } @@ -212,7 +212,7 @@ bool glsl_symbol_table::add_default_precision_qualifier(const char *type_name, 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; @@ -222,7 +222,7 @@ bool glsl_symbol_table::add_default_precision_qualifier(const char *type_name, 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; |