Our optimistic inlining and automatic unoptimizer seem
to play havoc with error messages:
SISC (1.13.0-alpha)
#;> (define (f) (+ (/ 1 0)))
#;> (f)
Error in /: division by zero.
console:1:13: <indeterminate call>
Why can't it figure out that the "indeterminate call"
is an "argument of +" - it seems to be able to do this
elsewhere?
#;> (define (my-/ . args) (apply / args))
#;> (define (g) (+ (my-/ 1 0)))
#;> (g)
Error in /: division by zero.
console:5:16: <from call to my-/>
Now it doesn't even mention the call to + anymore!
#;> (define my-/ /)
#;> (g)
Error in /: division by zero.
console:5:16: <from call to my-/> [Repeated twice]
Same as before, but why is my-/ repeated twice now?
#;> (define (h) (+ (my-/ 1 0)))
#;> (h)
Error in my-/: division by zero.
console:9:13: <indeterminate call>
Same as first example, except there is no mention of
/!! More significantly, note how this is different from
the results for g, even though g and h have identical
bodies.
#;> (define (my-/ . args) (apply / args))
#;> (h)
Error in /: division by zero.
Now it seems to have lost track completely.
I think part of the problem may be perhaps annotations
may not get established properly when producing
FixedAppExps. There's a weird conditional in the compiler,
if (!r.dynenv.hedgedInlining) {
addAnnotations(fixedCall,
lastRand.annotations);
((OptimisticExpression)fixedCall).dropSafe();
}
I have no idea what that's for, but it looks suspicious.
I also don't understand why FixedAppExp_0 conses up an
AppExp on demand (with no annotations), rather than the
compiler supplying an appropriate AppExp.
Logged In: YES
user_id=110070
I have made some progress on this, checked into CVS.
The last example, i.e. the call to a procedure after
unoptimisation has occurred, now produces exactly the same
error as if the procedure had not been optimised in the
first place, i.e. like the second example.