Closed lkuper closed 8 years ago
It would be nice to have line numbers in warning messages as well.
We previously had a mechanism to catch exceptions and just run the regular Julia function but that only worked with the old direct call to "accelerate" rather than @acc. I've updated CompilerTools to catch exceptions from optimization passes and to print the failing function and optimization pass and then revert to the regular Julia function.
I've also added something to print a warning when @acc is used on an expression with no calls in it whatsoever but given that operators convert to functions this is likely never going to happen.
Yes, line numbers would be nice and we can work toward that but I think what I just checked in greatly improves the situation so I'm still going to close the ticket.
@acc
annotations should only be on function definitions, function calls, orbegin ... end
blocks. We should try to produce a reasonable error message when someone tries to put@acc
on, say, an assignment, as happened in #64.