summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-19Use glsl_symbol_table::name_declared_this_scopeIan Romanick
Prevent most illegal name reuse.
2010-03-19Add query to determine whether a name was declared at this scopeIan Romanick
This will be used to prevent a variable and a function with the same name from being declared. As a side effect, the calls to add_{type,name,function} should never fail.
2010-03-19Use separate namespaces for types, variables, and functionsIan Romanick
This will allow types and their constructors to be easily stored in the same symbol table. This does add a potential problem that a shader could declare a variable and a function with the same name. This appears to be forbidden by the GLSL spec.
2010-03-19Add function to determine the scope where a variable is declaredIan Romanick
2010-03-19Use glsl_symbol_table instead of using _mesa_symbol_table directlyIan Romanick
2010-03-19Add a GLSL-specific facade to _mesa_symbol_tableIan Romanick
This adds some type saftey and will enable elimination of a bunch of type casts and other ugly crap in the code.
2010-03-19Don't track new type names during pass-1 parsingIan Romanick
This implementation was wrong anyway because it did not respect scoping rules. This will need to be revisited soon. The most likely result is that the grammar is going to need some significant re-work to be able to use a IDENTIFIER in all the places where a TYPE_NAME is currently used.
2010-03-15Add multiple include protection to ir.hIan Romanick
2010-03-15Trivial clean-ups to ast_type_specifier(int) constructorIan 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-15Factor ast_type_specifier code out to ast_type.cppIan Romanick
2010-03-15Factor guts of function matching code out to match_function_by_nameIan Romanick
This function will be used for matching some types of constructors as well.
2010-03-15Move ast_function_expression::hir to ast_function.cppIan Romanick
2010-03-15Remove DOA hir_function.c fileIan Romanick
2010-03-11Change type of function_identifier to silence bison warningIan Romanick
When the implementation of function_call_header and function_identifier were changed a few commits ago, the types of the production changed. This just updates the types specified for the productions to match reality.
2010-03-11Add parameters to function declarations in the correct orderIan Romanick
2010-03-11Initial pass at resolving function callsIan Romanick
The code is still really rough and *REALLY* incomplete. This at least passes the first few trivially simple test cases.
2010-03-11Default function parameters to 'in' instead of autoIan Romanick
2010-03-11Add a handful of simple tests for function calls in constructorsIan Romanick
2010-03-11Add ir_call call to represent function calls.Ian Romanick
2010-03-11Fix broken constructor of ir_instruction base classIan Romanick
Make the constructor inline-able, and don't try to initialize it as a simple_node. It hasn't been derived from simple_node in a long time.
2010-03-11Track generation of errors and halt compilation appropriatelyIan Romanick
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-10IR variable: Initial work to support GLSL built-in variablesIan Romanick
2010-03-10Include cstdlib to be sure size_t is availableIan Romanick
2010-03-10Move top-level AST to HIR conversion to _mesa_ast_to_hirIan Romanick
2010-03-10Require the shader target be specified to the driver programIan Romanick
2010-03-10Use ir_print_visitor to dump IR treeIan Romanick
2010-03-10Fix typeo in gl_FogParameters.scale (was scalre)Ian Romanick
2010-03-10AST to IR: Mark 'varying' in a vertex shader as 'out'Ian Romanick
2010-03-10ir_variable: Initialize all attribute bits to reasonable defaultsIan Romanick
This prevents variables from randomly having their 'invariant' or 'read_only' bits set, for example.
2010-03-09IR print visitor: Add some support for printing types and constantsIan Romanick
2010-03-09IR print visitor: Print assignmentsIan Romanick
2010-03-09Add assignment side-effect to the instruction streamIan Romanick
The actual assignment is a side-effect of the assignment expression. Add it to the instruction stream and return the LHS of the assignment as its rvalue.
2010-03-09IR visitor: Add initial version of ir_visitor classesIan Romanick
The ir_visitor class is the abstract base class for all visitors. ir_print_visitor contains the beginnings of a concrete visitor class that will print out an IR sequence in a Lisp / Scheme-like syntax.
2010-03-09Convert is_glsl_type_matrix to glsl_type::is_matrixIan Romanick
2010-03-09Convert is_glsl_type_vector to glsl_type::is_vectorIan Romanick
2010-03-09Convert is_glsl_type_scalar to glsl_type::is_scalarIan Romanick
2010-03-09Make glsl_type a classIan Romanick
Among other benefits, this cleans up a the hackery invovled in initializing the union field in builtin_types.h.
2010-03-08Remove unused functionIan Romanick
2010-03-08Conver IR structures to use exec_list instead of simple_nodeIan Romanick
2010-03-08Add yet-another linked list typeIan Romanick
The use of macros to access existing linked list type makes it unsuitable for its current use as a base class. Since this type and the accompanying macros are used all over the place in Mesa, we can't really change them.
2010-03-08Remove prototypes for *_to_hir functions that no longer existIan Romanick
2010-03-08Set C++ indent too.Ian Romanick
2010-03-01Make AST->HIR conversion a method of ast_node, re-enableIan Romanick
2010-02-25autoconf for the ...Ian Romanick