summaryrefslogtreecommitdiff
path: root/ir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-05-19 13:52:29 +0200
committerIan Romanick <ian.d.romanick@intel.com>2010-05-26 15:23:25 -0700
commit36ea28646c666ac2af9b43c47e65f9f53ffcc390 (patch)
tree093bdb4d42b16b95201b2fa852dcb53ace32ae32 /ir.cpp
parent7fe3de6fde0cb7e73ef36d0d600f00f4793ced0d (diff)
Refactor ir_dereference data fields to subclasses
Diffstat (limited to 'ir.cpp')
-rw-r--r--ir.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ir.cpp b/ir.cpp
index f6f2558bc0..a147339b1a 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -235,7 +235,7 @@ ir_dereference_array::ir_dereference_array(ir_rvalue *value,
ir_rvalue *array_index)
: ir_dereference(ir_reference_array)
{
- this->selector.array_index = array_index;
+ this->array_index = array_index;
this->set_array(value);
}
@@ -244,7 +244,7 @@ ir_dereference_array::ir_dereference_array(ir_variable *var,
ir_rvalue *array_index)
: ir_dereference(ir_reference_array)
{
- this->selector.array_index = array_index;
+ this->array_index = array_index;
this->set_array(new ir_dereference_variable(var));
}
@@ -252,11 +252,11 @@ ir_dereference_array::ir_dereference_array(ir_variable *var,
void
ir_dereference_array::set_array(ir_rvalue *value)
{
- this->var = value;
+ this->array = value;
this->type = glsl_type::error_type;
- if (this->var != NULL) {
- const glsl_type *const vt = this->var->type;
+ if (this->array != NULL) {
+ const glsl_type *const vt = this->array->type;
if (vt->is_array()) {
type = vt->element_type();
@@ -273,10 +273,10 @@ ir_dereference_record::ir_dereference_record(ir_rvalue *value,
const char *field)
: ir_dereference(ir_reference_record)
{
- this->var = value;
- this->selector.field = field;
- this->type = (this->var != NULL)
- ? this->var->type->field_type(field) : glsl_type::error_type;
+ this->record = value;
+ this->field = field;
+ this->type = (this->record != NULL)
+ ? this->record->type->field_type(field) : glsl_type::error_type;
}
@@ -284,10 +284,10 @@ ir_dereference_record::ir_dereference_record(ir_variable *var,
const char *field)
: ir_dereference(ir_reference_record)
{
- this->var = new ir_dereference_variable(var);
- this->selector.field = field;
- this->type = (this->var != NULL)
- ? this->var->type->field_type(field) : glsl_type::error_type;
+ this->record = new ir_dereference_variable(var);
+ this->field = field;
+ this->type = (this->record != NULL)
+ ? this->record->type->field_type(field) : glsl_type::error_type;
}