At 6:24 PM +0200 9/5/02, Leopold Toetsch wrote:
>Nicholas Clark wrote:
>
>>1: the value in the register did/didn't change
>>2: the value of the thing referenced by the register did/didn't change
>>
>>(possibly 2a and 2b being that the internals of the object didn't/might've
>>changed)
>
>
>Actually, thinking now of an optimizer, we should know these things.
>given the instruction:
>
>set P0, P1[1000]
>
>and this is the last instruction in the life cycle of P0, this 
>instruction could be deleted. But when reading the array had the 
>side effect of extending this array, it gives different results when 
>you get the array size, depending on -Ox.

The optimizer needs to be *really* careful with this sort of thing. 
Optimizing away reads and writes isn't safe in the general case, 
because code may be depending on the side effects. That's why hints 
in the AST/PIL are so important.
-- 
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                       teddy bears get drunk

Reply via email to