David Storrs wrote:

> This discussion seems to contain two separate problems, and I'm not
> always sure which one is being addressed.  The components I see are:
> 
> 1) Detecting when the assumptions have been violated and the code has
>    to be changed; and,
> 
> 2) Actually making the change after we know that we need to.
> 
> 
> I have at least a vague idea of why #1 would be difficult.  As to
> #2...assuming that the original source is available (or can be
> recovered), then regenerating the expression does not seem difficult.
> Or am I missing something?

David,

Recompiling isn't hard (assuming that compiling is already implemented).
Nor is notification of changes truly very difficult.

What you're missing is what I was trying to demonstrate with my plugin
example, and what Dan also pointed out with his mutating a subroutine
that returns a constant (and was presumably inlined). If the routine is
RUNNING at the time an assumption made by the optimizer becomes invalid,
then the stack frame needs to be munged from the old, optimized version
compilation to the new, pessimized version. THAT is the hard
problem--one of register & variable remapping and PC mutation--and it is
impossible to solve after code motion optimizations, for the same reason
that C++ debuggers get horribly confused when running over -O3 code.

--
 
Gordon Henriksen
IT Manager
ICLUBcentral Inc.
[EMAIL PROTECTED]


Reply via email to