* \param var the variable to associate with the IR node
*/
static void
-slang_attach_storage(slang_ir_node *n, slang_variable *var)
+_slang_attach_storage(slang_ir_node *n, slang_variable *var)
{
assert(n);
assert(var);
n = new_node0(IR_VAR);
if (n) {
- var->used = GL_TRUE;
- slang_attach_storage(n, var);
+ _slang_attach_storage(n, var);
}
return n;
}
oper->var = _slang_locate_variable(oper->locals,
(const slang_atom) oper->a_id,
GL_TRUE);
- if (oper->var)
- oper->var->used = GL_TRUE;
}
}
assert(!is_sampler_type(&var->type));
n = new_node0(IR_VAR_DECL);
if (n) {
- slang_attach_storage(n, var);
+ _slang_attach_storage(n, var);
assert(var->aux);
assert(n->Store == var->aux);
}
/* copy the declarator qualifier type, parse the identifier */
- var->global = C->global_scope;
var->type.qualifier = type->qualifier;
var->a_name = parse_identifier(C);
if (var->a_name == SLANG_ATOM_NULL)
struct slang_operation_ *initializer; /**< Optional initializer code */
GLuint address; /**< Storage location */
GLuint size; /**< Variable's size in bytes */
- GLboolean global; /**< A global var? */
- GLboolean used; /**< Ever referenced by code? */
GLboolean isTemp; /**< a named temporary (__resultTmp) */
void *aux; /**< Used during code gen */
} slang_variable;