[BUG][FIX] netscape browser plugin change

Tim Rowledge tim at sumeru.stanford.edu
Sun Aug 11 00:48:37 UTC 2002


John M McIntosh <johnmci at smalltalkconsulting.com> is claimed by the authorities to have written:


> foo-> isn't an issue, that's just the global structure code the 
> macintosh VM has for performance reasons.
Just a suspicion that the compiler might be screwing us up again.
> 
> Just for you I looked with GDB
> 
> Usually the code in primitiveResponse thumps checkForInterrupts which 
> resets the  interruptCheckCounter because of how the check based on 
> the clock works.
> 
> Now if you want long enough (many seconds 15 or so) then the code in 
> longUnconditionalJump might get invoked. Of course under this unix 
> system (os-x) once the browser gets hung out to dry for 5 seconds or 
> so people get real impatient and consider it broken.

> 
> So whats the story behind shortUnconditionalJump and longUnconditionalJump?
Well short unconditional jumps are for, er, short unconditional jumps.
1 to 8 bytes FORWARD only. Long jumps are for up to 1024 forwards and
1024 backwards. It's the only way to jump back in a loop like the idle
loop. If something is preventing the interruptCheckCounter from being
decremented properly, then the ide loop will not end up calling the
check for interrupts. Since interruptCheckCounter is supposed to be
reset to 1000 or less in checkInterrupts, it really shouldn't be too
long between checks. In the idleLoop there's only a dozen or so
bytecode, so every 9 or ten (ie around about 4 million time a second on
my 400Mhz powerbook, 1 million on my Acorn) there is a backwards branch,
and 1 in a 1000 times there should be an interrupt check - 4,000 times a
second.

tim

-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Debugger: A tool that substitutes afterthought for forethought.




More information about the Squeak-dev mailing list