summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-23 14:43:50 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-23 15:20:29 -0700
commit959a9ecdd8fbc3375e4149f2b44d253622ff12ee (patch)
tree3f3de6e750a43b3e33b776a85051f6901fd17ec1
parent3e24ef68a9b22918c8b21b743d81bbf86f43c119 (diff)
get_lvalue_copy doesn't need all the checking of do_assignment().
-rw-r--r--ast_to_hir.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index 613009b..c059abb 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -536,8 +536,7 @@ generate_temporary(const glsl_type *type, exec_list *instructions,
static ir_rvalue *
-get_lvalue_copy(exec_list *instructions, struct _mesa_glsl_parse_state *state,
- ir_rvalue *lvalue, YYLTYPE loc)
+get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue)
{
ir_variable *var;
ir_rvalue *var_deref;
@@ -547,7 +546,7 @@ get_lvalue_copy(exec_list *instructions, struct _mesa_glsl_parse_state *state,
var->mode = ir_var_auto;
var_deref = new ir_dereference_variable(var);
- do_assignment(instructions, state, var_deref, lvalue, loc);
+ instructions->push_tail(new ir_assignment(var_deref, lvalue, NULL));
/* Once we've created this temporary, mark it read only so it's no
* longer considered an lvalue.
@@ -1103,9 +1102,7 @@ ast_expression::hir(exec_list *instructions,
/* Get a temporary of a copy of the lvalue before it's modified.
* This may get thrown away later.
*/
- result = get_lvalue_copy(instructions, state,
- (ir_rvalue *)op[0]->clone(NULL),
- this->subexpressions[0]->get_location());
+ result = get_lvalue_copy(instructions, (ir_rvalue *)op[0]->clone(NULL));
(void)do_assignment(instructions, state,
(ir_rvalue *)op[0]->clone(NULL), temp_rhs,