Begin refactoring ir_dereference
Create separate subclasses of ir_dereference for variable, array, and
record dereferences. As a side effect, array and record dereferences
no longer point to ir_variable objects directly. Instead they each
point to an ir_dereference_variable object.
This is the first of several steps in the refactoring process. The
intention is that ir_dereference will eventually become an abstract
base class.
diff --git a/ast_function.cpp b/ast_function.cpp
index 7931633..300108c 100644
--- a/ast_function.cpp
+++ b/ast_function.cpp
@@ -200,7 +200,7 @@
const int c = component / src->type->column_type()->vector_elements;
const int r = component % src->type->column_type()->vector_elements;
ir_constant *const col_index = new ir_constant(glsl_type::int_type, &c);
- ir_dereference *const col = new ir_dereference(src, col_index);
+ ir_dereference *const col = new ir_dereference_array(src, col_index);
col->type = src->type->column_type();