slang_operation_construct(oper);
slang_operation_copy(oper, inlined);
#else
- *oper = *inlined;
+ *oper = *inlined; /* XXX slang_operation_copy() */
#endif
*/
fun = _slang_first_function(A->space.funcs, name);
if (!_slang_adapt_call(oper, fun, &A->space, A->atoms, A->log)) {
- slang_info_log_error(A->log, "Undefined function '%s'", name);
+ slang_info_log_error(A->log, "Function '%s' not found (check argument types)", name);
return NULL;
}
assert(fun);
return GL_TRUE; /* not an error */
}
-#if 1
- printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name);
-#endif
#if 0
+ printf("\n*********** codegen_function %s\n", (char *) fun->header.a_name);
slang_print_function(fun, 1);
#endif
/* fold constant expressions, etc. */
_slang_simplify(fun->body, &A->space, A->atoms);
+#if 0
+ printf("\n*********** simplified %s\n", (char *) fun->header.a_name);
+ slang_print_function(fun, 1);
+#endif
+
/* Create an end-of-function label */
A->curFuncEndLabel = _slang_label_new("__endOfFunc__main");
printf("************* IR for %s *******\n", (char*)fun->header.a_name);
slang_print_ir(n, 0);
#endif
-#if 1
+#if 0
printf("************* End codegen function ************\n\n");
#endif