[PATCH 4/5] d3dcompiler: Pre/post increment/decrement operators are unary.

Matteo Bruni mbruni at codeweavers.com
Fri May 2 09:30:13 CDT 2014


---
 dlls/d3dcompiler_43/d3dcompiler_private.h | 10 +++++-----
 dlls/d3dcompiler_43/hlsl.y                |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h
index 1be52bc..f7403f5 100644
--- a/dlls/d3dcompiler_43/d3dcompiler_private.h
+++ b/dlls/d3dcompiler_43/d3dcompiler_private.h
@@ -826,6 +826,11 @@ enum hlsl_ir_expr_op {
 
     HLSL_IR_UNOP_SAT,
 
+    HLSL_IR_UNOP_PREINC,
+    HLSL_IR_UNOP_PREDEC,
+    HLSL_IR_UNOP_POSTINC,
+    HLSL_IR_UNOP_POSTDEC,
+
     HLSL_IR_BINOP_ADD,
     HLSL_IR_BINOP_SUB,
     HLSL_IR_BINOP_MUL,
@@ -856,11 +861,6 @@ enum hlsl_ir_expr_op {
 
     HLSL_IR_BINOP_POW,
 
-    HLSL_IR_BINOP_PREINC,
-    HLSL_IR_BINOP_PREDEC,
-    HLSL_IR_BINOP_POSTINC,
-    HLSL_IR_BINOP_POSTDEC,
-
     HLSL_IR_TEROP_LERP,
 
     HLSL_IR_SEQUENCE,
diff --git a/dlls/d3dcompiler_43/hlsl.y b/dlls/d3dcompiler_43/hlsl.y
index 1efb65b..9f2daba 100644
--- a/dlls/d3dcompiler_43/hlsl.y
+++ b/dlls/d3dcompiler_43/hlsl.y
@@ -1848,7 +1848,7 @@ postfix_expr:             primary_expr
                                 }
                                 operands[0] = $1;
                                 operands[1] = operands[2] = NULL;
-                                $$ = &new_expr(HLSL_IR_BINOP_POSTINC, operands, &loc)->node;
+                                $$ = &new_expr(HLSL_IR_UNOP_POSTINC, operands, &loc)->node;
                                 /* Post increment/decrement expressions are considered const */
                                 $$->data_type = clone_hlsl_type($$->data_type);
                                 $$->data_type->modifiers |= HLSL_MODIFIER_CONST;
@@ -1867,7 +1867,7 @@ postfix_expr:             primary_expr
                                 }
                                 operands[0] = $1;
                                 operands[1] = operands[2] = NULL;
-                                $$ = &new_expr(HLSL_IR_BINOP_POSTDEC, operands, &loc)->node;
+                                $$ = &new_expr(HLSL_IR_UNOP_POSTDEC, operands, &loc)->node;
                                 /* Post increment/decrement expressions are considered const */
                                 $$->data_type = clone_hlsl_type($$->data_type);
                                 $$->data_type->modifiers |= HLSL_MODIFIER_CONST;
@@ -2040,7 +2040,7 @@ unary_expr:               postfix_expr
                                 }
                                 operands[0] = $2;
                                 operands[1] = operands[2] = NULL;
-                                $$ = &new_expr(HLSL_IR_BINOP_PREINC, operands, &loc)->node;
+                                $$ = &new_expr(HLSL_IR_UNOP_PREINC, operands, &loc)->node;
                             }
                         | OP_DEC unary_expr
                             {
@@ -2056,7 +2056,7 @@ unary_expr:               postfix_expr
                                 }
                                 operands[0] = $2;
                                 operands[1] = operands[2] = NULL;
-                                $$ = &new_expr(HLSL_IR_BINOP_PREDEC, operands, &loc)->node;
+                                $$ = &new_expr(HLSL_IR_UNOP_PREDEC, operands, &loc)->node;
                             }
                         | unary_op unary_expr
                             {
-- 
1.8.3.2




More information about the wine-patches mailing list