glsl: Add assert to check variable_entry referenced_count after construction.
[mesa.git] / src / glsl / ir_function.cpp
index 28a5c399f15f461ed724b2b1e094ad2c827e8016..dfdec144b2feb3ace2740ac8975fe0dc2b900ee4 100644 (file)
@@ -94,13 +94,13 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
    int total_score = 0;
 
    for (/* empty */
-       ; !node_a->is_tail_sentinal()
+       ; !node_a->is_tail_sentinel()
        ; node_a = node_a->next, node_b = node_b->next) {
       /* If all of the parameters from the other parameter list have been
        * exhausted, the lists have different length and, by definition,
        * do not match.
        */
-      if (node_b->is_tail_sentinal())
+      if (node_b->is_tail_sentinel())
         return -1;
 
 
@@ -139,6 +139,9 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
          */
         score = (type_compare(actual->type, param->type) == 0) ? 0 : -1;
         break;
+
+      default:
+        assert(false);
       }
 
       if (score < 0)
@@ -151,7 +154,7 @@ parameter_lists_match(const exec_list *list_a, const exec_list *list_b)
     * exhausted, the lists have different length and, by definition, do not
     * match.
     */
-   if (!node_b->is_tail_sentinal())
+   if (!node_b->is_tail_sentinel())
       return -1;
 
    return total_score;
@@ -192,7 +195,7 @@ parameter_lists_match_exact(const exec_list *list_a, const exec_list *list_b)
    const exec_node *node_b = list_b->head;
 
    for (/* empty */
-       ; !node_a->is_tail_sentinal() && !node_b->is_tail_sentinal()
+       ; !node_a->is_tail_sentinel() && !node_b->is_tail_sentinel()
        ; node_a = node_a->next, node_b = node_b->next) {
       ir_variable *a = (ir_variable *) node_a;
       ir_variable *b = (ir_variable *) node_b;
@@ -207,7 +210,7 @@ parameter_lists_match_exact(const exec_list *list_a, const exec_list *list_b)
    /* Unless both lists are exhausted, they differ in length and, by
     * definition, do not match.
     */
-   return (node_a->is_tail_sentinal() == node_b->is_tail_sentinal());
+   return (node_a->is_tail_sentinel() == node_b->is_tail_sentinel());
 }
 
 ir_function_signature *