Hi,

> In practice the space between a watchpoint and the subsequent label is
> almost never smaller than maxJumpReplacementSize, which means we pretty
> much never need to emit a nop.  The mechanism largely exists as a safety
> net, to ensure correct behaviour in very unlikely cases.  Switching to
> inserting nops after watchpoints would add a large number of unnecessary
> instructions to the code.

Hm, perhaps I misunderstand the whole concept. If I understand correctly
now, you have a sequence of instructions without labels, which you might
replace with an optimized block. When this replacement happens, a direct
branch to the optimized code is written to the beginning of the
instruction sequence, which overwrites the original instructions (so it
cannot be restored anymore, which is no problem since the new code should
be faster anyway). The optimized code can jump back the original code if
necessary. Am I right?

Regards,
Zoltan


_______________________________________________
squirrelfish-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/squirrelfish-dev

Reply via email to