|
|
|
|
|
by kazinator
1906 days ago
|
|
Exactly. E.g. remove this line, and incorrect optimizations ensure, so the compiler fails halfway through recompiling itself: http://www.kylheku.com/cgit/txr/tree/share/txr/stdlib/optimi... The type is fine whether or not the line is present. It's all about that invariant. None of the hair pulling I've experienced in compiler debugging had anything even remotely to do with type, which is something flushed out by testing. Whenever doing anything, like an optimization test case, I put in print statements during development to see that it's being called, and what it's doing. You'd never add a new case into a compiler that you never tested. Just from the sheer psychology of it: too much work goes into it to then not bother running it. Plus the curiosity of seeing how often the case happens over a corpus of code. |
|