X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fir_function_detect_recursion.cpp;h=5813315b613e1cb7528e67e7e674ab1e758f11f6;hb=8b4f6fada2f13e42a289f63a469450fb41a5968e;hp=5df3ac51883baaf57b07193470f935a9999d5afc;hpb=4d7899fe81b6ffc521c6f9688e25bcde4012e556;p=mesa.git diff --git a/src/glsl/ir_function_detect_recursion.cpp b/src/glsl/ir_function_detect_recursion.cpp index 5df3ac51883..5813315b613 100644 --- a/src/glsl/ir_function_detect_recursion.cpp +++ b/src/glsl/ir_function_detect_recursion.cpp @@ -127,6 +127,8 @@ #include "program/hash_table.h" #include "program.h" +namespace { + struct call_node : public exec_node { class function *func; }; @@ -139,25 +141,7 @@ public: /* empty */ } - - /* Callers of this ralloc-based new need not call delete. It's - * easier to just ralloc_free 'ctx' (or any of its ancestors). */ - static void* operator new(size_t size, void *ctx) - { - void *node; - - node = ralloc_size(ctx, size); - assert(node != NULL); - - return node; - } - - /* If the user *does* call delete, that's OK, we will just - * ralloc_free in that case. */ - static void operator delete(void *node) - { - ralloc_free(node); - } + DECLARE_RALLOC_CXX_OPERATORS(function) ir_function_signature *sig; @@ -240,6 +224,8 @@ public: bool progress; }; +} /* anonymous namespace */ + static void destroy_links(exec_list *list, function *f) { @@ -319,7 +305,6 @@ emit_errors_linked(const void *key, void *data, void *closure) linker_error(prog, "function `%s' has static recursion.\n", proto); ralloc_free(proto); - prog->LinkStatus = false; }