#include "list.h"
#include "glsl_parser_extras.h"
-struct ir_instruction;
struct _mesa_glsl_parse_state;
struct YYLTYPE;
extern void
_mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state);
-extern struct ir_rvalue *
-_mesa_ast_field_selection_to_hir(const struct ast_expression *expr,
+extern ir_rvalue *
+_mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
struct _mesa_glsl_parse_state *state);
assert(operations[this->oper] == ir_binop_mod);
- struct ir_rvalue *temp_rhs;
+ ir_rvalue *temp_rhs;
temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
op[0], op[1]);
type = arithmetic_result_type(op[0], op[1], false, state, & loc);
- struct ir_rvalue *temp_rhs;
+ ir_rvalue *temp_rhs;
temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
op[0], op[1]);
type = arithmetic_result_type(op[0], op[1], false, state, & loc);
- struct ir_rvalue *temp_rhs;
+ ir_rvalue *temp_rhs;
temp_rhs = new(ctx) ir_expression(operations[this->oper], type,
op[0], op[1]);
static void
apply_type_qualifier_to_variable(const struct ast_type_qualifier *qual,
- struct ir_variable *var,
+ ir_variable *var,
struct _mesa_glsl_parse_state *state,
YYLTYPE *loc)
{
foreach_list_typed (ast_declaration, decl, link, &this->declarations) {
const struct glsl_type *var_type;
- struct ir_variable *var;
+ ir_variable *var;
/* FINISHME: Emit a warning if a variable declaration shadows a
* FINISHME: declaration at a higher scope.
unsigned i;
} type_qualifier;
- struct ast_node *node;
- struct ast_type_specifier *type_specifier;
- struct ast_fully_specified_type *fully_specified_type;
- struct ast_function *function;
- struct ast_parameter_declarator *parameter_declarator;
- struct ast_function_definition *function_definition;
- struct ast_compound_statement *compound_statement;
- struct ast_expression *expression;
- struct ast_declarator_list *declarator_list;
- struct ast_struct_specifier *struct_specifier;
- struct ast_declaration *declaration;
+ ast_node *node;
+ ast_type_specifier *type_specifier;
+ ast_fully_specified_type *fully_specified_type;
+ ast_function *function;
+ ast_parameter_declarator *parameter_declarator;
+ ast_function_definition *function_definition;
+ ast_compound_statement *compound_statement;
+ ast_expression *expression;
+ ast_declarator_list *declarator_list;
+ ast_struct_specifier *struct_specifier;
+ ast_declaration *declaration;
struct {
- struct ast_node *cond;
- struct ast_expression *rest;
+ ast_node *cond;
+ ast_expression *rest;
} for_rest_statement;
/* Line 1455 of yacc.c */
#line 1193 "glsl_parser.ypp"
{
- (yyval.node) = (struct ast_node *) (yyvsp[(1) - (1)].declarator_list);
+ (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].declarator_list);
(yyvsp[(1) - (1)].declarator_list)->link.self_link();
;}
break;
/* Line 1455 of yacc.c */
#line 1198 "glsl_parser.ypp"
{
- (yyval.node) = (struct ast_node *) (yyvsp[(1) - (2)].node);
+ (yyval.node) = (ast_node *) (yyvsp[(1) - (2)].node);
(yyval.node)->link.insert_before(& (yyvsp[(2) - (2)].declarator_list)->link);
;}
break;
/* Line 1455 of yacc.c */
#line 1263 "glsl_parser.ypp"
- { (yyval.node) = (struct ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
break;
case 234:
/* Line 1455 of yacc.c */
#line 1297 "glsl_parser.ypp"
- { (yyval.node) = (struct ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
+ { (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].compound_statement); ;}
break;
case 242:
/* Line 1455 of yacc.c */
#line 1385 "glsl_parser.ypp"
{
- (yyval.node) = (struct ast_node *) (yyvsp[(1) - (1)].expression);
+ (yyval.node) = (ast_node *) (yyvsp[(1) - (1)].expression);
;}
break;
unsigned i;
} type_qualifier;
- struct ast_node *node;
- struct ast_type_specifier *type_specifier;
- struct ast_fully_specified_type *fully_specified_type;
- struct ast_function *function;
- struct ast_parameter_declarator *parameter_declarator;
- struct ast_function_definition *function_definition;
- struct ast_compound_statement *compound_statement;
- struct ast_expression *expression;
- struct ast_declarator_list *declarator_list;
- struct ast_struct_specifier *struct_specifier;
- struct ast_declaration *declaration;
+ ast_node *node;
+ ast_type_specifier *type_specifier;
+ ast_fully_specified_type *fully_specified_type;
+ ast_function *function;
+ ast_parameter_declarator *parameter_declarator;
+ ast_function_definition *function_definition;
+ ast_compound_statement *compound_statement;
+ ast_expression *expression;
+ ast_declarator_list *declarator_list;
+ ast_struct_specifier *struct_specifier;
+ ast_declaration *declaration;
struct {
- struct ast_node *cond;
- struct ast_expression *rest;
+ ast_node *cond;
+ ast_expression *rest;
} for_rest_statement;
unsigned i;
} type_qualifier;
- struct ast_node *node;
- struct ast_type_specifier *type_specifier;
- struct ast_fully_specified_type *fully_specified_type;
- struct ast_function *function;
- struct ast_parameter_declarator *parameter_declarator;
- struct ast_function_definition *function_definition;
- struct ast_compound_statement *compound_statement;
- struct ast_expression *expression;
- struct ast_declarator_list *declarator_list;
- struct ast_struct_specifier *struct_specifier;
- struct ast_declaration *declaration;
+ ast_node *node;
+ ast_type_specifier *type_specifier;
+ ast_fully_specified_type *fully_specified_type;
+ ast_function *function;
+ ast_parameter_declarator *parameter_declarator;
+ ast_function_definition *function_definition;
+ ast_compound_statement *compound_statement;
+ ast_expression *expression;
+ ast_declarator_list *declarator_list;
+ ast_struct_specifier *struct_specifier;
+ ast_declaration *declaration;
struct {
- struct ast_node *cond;
- struct ast_expression *rest;
+ ast_node *cond;
+ ast_expression *rest;
} for_rest_statement;
}
struct_declaration_list:
struct_declaration
{
- $$ = (struct ast_node *) $1;
+ $$ = (ast_node *) $1;
$1->link.self_link();
}
| struct_declaration_list struct_declaration
{
- $$ = (struct ast_node *) $1;
+ $$ = (ast_node *) $1;
$$->link.insert_before(& $2->link);
}
;
;
statement_matched:
- compound_statement { $$ = (struct ast_node *) $1; }
+ compound_statement { $$ = (ast_node *) $1; }
| simple_statement
;
;
statement_no_new_scope:
- compound_statement_no_new_scope { $$ = (struct ast_node *) $1; }
+ compound_statement_no_new_scope { $$ = (ast_node *) $1; }
| simple_statement
;
condition:
expression
{
- $$ = (struct ast_node *) $1;
+ $$ = (ast_node *) $1;
}
| fully_specified_type IDENTIFIER '=' initializer
{
#include "ast.h"
#include "glsl_types.h"
-struct ir_rvalue *
+ir_rvalue *
_mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
struct _mesa_glsl_parse_state *state)