ir_variable: Add method to get string representing interpolation qualifier
[mesa.git] / ast.h
diff --git a/ast.h b/ast.h
index d899fb1d090a831a98bc90e49f940066668af239..1cf80af9144fc0af39ba9c902bfd3ebef55af6ac 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -26,7 +26,6 @@
 #ifndef AST_H
 #define AST_H
 
-#include "main/simple_list.h"
 #include "list.h"
 #include "glsl_parser_extras.h"
 
@@ -35,7 +34,7 @@ struct _mesa_glsl_parse_state;
 
 struct YYLTYPE;
 
-class ast_node : public simple_node {
+class ast_node {
 public:
    virtual ~ast_node();
    virtual void print(void) const;
@@ -81,6 +80,8 @@ public:
       unsigned column;
    } location;
 
+   exec_node link;
+
 protected:
    ast_node(void);
 };
@@ -178,9 +179,10 @@ public:
 
 
    /**
-    * List of expressions for an \c ast_sequence.
+    * List of expressions for an \c ast_sequence or parameters for an
+    * \c ast_function_call
     */
-   struct simple_node expressions;
+   exec_list expressions;
 };
 
 class ast_expression_bin : public ast_expression {
@@ -246,7 +248,7 @@ public:
                          struct _mesa_glsl_parse_state *state);
 
    int new_scope;
-   struct simple_node statements;
+   exec_list statements;
 };
 
 class ast_declaration : public ast_node {
@@ -289,8 +291,11 @@ public:
    ast_struct_specifier(char *identifier, ast_node *declarator_list);
    virtual void print(void) const;
 
+   virtual ir_rvalue *hir(exec_list *instructions,
+                         struct _mesa_glsl_parse_state *state);
+
    char *name;
-   struct simple_node declarations;
+   exec_list declarations;
 };
 
 
@@ -378,6 +383,8 @@ public:
 
    virtual void print(void) const;
 
+   ir_rvalue *hir(exec_list *, struct _mesa_glsl_parse_state *);
+
    enum ast_types type_specifier;
 
    const char *type_name;
@@ -408,7 +415,7 @@ public:
                          struct _mesa_glsl_parse_state *state);
 
    ast_fully_specified_type *type;
-   struct simple_node declarations;
+   exec_list declarations;
 
    /**
     * Special flag for vertex shader "invariant" declarations.
@@ -433,7 +440,7 @@ public:
    int is_array;
    ast_expression *array_size;
 
-   static void parameters_to_hir(simple_node *ast_parameters,
+   static void parameters_to_hir(exec_list *ast_parameters,
                                 bool formal, exec_list *ir_parameters,
                                 struct _mesa_glsl_parse_state *state);
 
@@ -462,7 +469,7 @@ public:
    ast_fully_specified_type *return_type;
    char *identifier;
 
-   struct simple_node parameters;
+   exec_list parameters;
 
 private:
    /**
@@ -548,7 +555,7 @@ public:
 class ast_switch_statement : public ast_node {
 public:
    ast_expression *expression;
-   struct simple_node statements;
+   exec_list statements;
 };
 
 class ast_iteration_statement : public ast_node {