summaryrefslogtreecommitdiff
path: root/ast.h
AgeCommit message (Collapse)Author
2010-06-23ast_node: Add new talloc-based new()Carl Worth
And use the talloc-based new for all of the ast objects created by the parser. This closes a lot of memory leaks, and will allow us to use these ast objects as talloc parents in the future, (for things like exec_nodes, etc.). This closes 164 leaks in the glsl-orangebook-ch06-bump.frag test: total heap usage: 55,623 allocs, 14,553 frees (was 14,389 frees)
2010-06-23ast_node: Remove empty destructor.Carl Worth
This wasn't serving any purpose. So delete it.
2010-05-10Convert ast_node use of simple_node to exec_list and exec_nodeIan Romanick
2010-05-10Store AST function call parameters in expressionsIan Romanick
Previously the list of function call parameters was stored as a circular list in ast_expression::subexpressions[1]. They are now stored as a regular list in ast_expression::expressions.
2010-04-28Begin converting structure definitions to IRIan Romanick
2010-04-07Generate correct IR for do-while loopsIan Romanick
Previously the same code was generated for a while loop and a do-while loop. This pulls the code that generates the conditional break into a separate method. This method is called either at the beginning or the end depending on the loop type. Reported-by: Kenneth Graunke <kenneth@whitecape.org>
2010-04-07Process ast_iteration_statement into ir_loopIan Romanick
This causes the following tests to pass: glslparsertest/shaders/dowhile.frag glslparsertest/shaders/while.frag glslparsertest/shaders/while1.frag glslparsertest/shaders/while2.frag
2010-04-02Additional void parameter checksIan Romanick
If there is a void parameter it must not have a name, and it must be the only parameter.
2010-04-02Require that function formal parameters have namesIan Romanick
2010-04-02Remove ast_node::typeIan Romanick
It isn't a type (is was enum specifying the kind of node), it was unused, and it was easily confused with actual type fields. Kill with fire.
2010-03-31Set source locations on AST nodes so error messages print locations.Kenneth Graunke
I haven't verified that these are all correct, but it's still a lot better than not having anything. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2010-03-31Add ast_function::hirIan Romanick
ast_function::hir consists of bits pulled out of ast_function_definition::hir. In fact, the later uses the former to do a lot of its processing. Several class private data fields were added to ast_function to facilitate communicate between the two. This causes the following tests to pass: glslparsertest/shaders/CorrectModule.frag This causes the following tests to fail. These shaders were previously failing to compile, but they were all failing for the wrong reasons. glslparsertest/shaders/function9.frag glslparsertest/shaders/function10.frag
2010-03-31Move type_specifier_to_glsl_type to ast_type_specifier::glsl_typeIan Romanick
This make is easily accessible from other modules.
2010-03-29Add parser support for texture rectangle typesIan Romanick
2010-03-29Implement ir_if (for if-statments) and conversion from ASTIan Romanick
The following tests now pass: glslparsertest/shaders/if1.frag glslparsertest/shaders/if2.frag The following tests that used to pass now fail. It appears that most of these fail because ast_nequal and ast_equal are not converted to HIR. shaders/glsl-unused-varying.frag shaders/glsl-fs-sqrt-branch.frag
2010-03-26Add new abstract ir_rvalue class; rework accordingly.Kenneth Graunke
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-19Initial bits for converting AST return nodes to IR return instructionsIan Romanick
2010-03-15Add new constructors for ast_type_specifierIan Romanick
Add a constructor that uses an ast_struct_specifier and one that uses a type name. This saves a (trivial) bit of code, but it also ensures some of the class invariants (i.e., type_name != NULL) are met.
2010-03-15Ensure that ast_type always has type_name setIan Romanick
For built-in types, type_name would be NULL. This ensures that type_name is set even for the built-in types. This simplifies code in a few places and centralizes the name setting code.
2010-03-10Differentiate in ast_function_expression between constructors and func. callsIan Romanick
2010-03-10Tell emacs that C++ .h files are C++Ian Romanick
2010-03-10Make ast_function_expression subclass of ast_expressionIan Romanick
2010-03-10Simplified constructor for identifier expressionsIan Romanick
2010-03-10Move top-level AST to HIR conversion to _mesa_ast_to_hirIan Romanick
2010-03-08Conver IR structures to use exec_list instead of simple_nodeIan Romanick
2010-03-08Remove prototypes for *_to_hir functions that no longer existIan Romanick
2010-03-01Make AST->HIR conversion a method of ast_node, re-enableIan Romanick
2010-02-25Replace tacky wrapper macros with tacky in-line type-castsIan Romanick
2010-02-22Add ast_expression_bin subclass of ast_expressionIan Romanick
The ast_expression_bin subclass is used for all binary expressions such as addition, subtraction, and comparisons. Several other subclasses are soon to follow.
2010-02-22Initial commit. lolIan Romanick