x86 jitter? (One more try!)

Jan Bottorff janb at pmatrix.com
Mon Apr 9 00:29:38 UTC 2001


>FYI ... it seems as if it's simply impossible to run j3 out of a malloc()ed
>stack (which it attempts to do) on '9x. I've tried this by running Squeak's
>regular byte code interpreter using something along the lines of

Is it possible you also need to set a stack limit variable when switching 
to a heap allocated stack? I know the MSVC generated code sometimes has 
stack limit checks in function entry code. The runtime alloca also probably 
checks for stack overflow using this limit. I'd have to think a while to 
consider what happens to exception handling if you run on a  heap allocated 
stack.

Win9x potentially has some sticky issues if you switch the stacks, and call 
a OS API that eventually calls down into 16-bit code.

Overall, I'd strongly recommend NOT calling OS API's unless your running on 
a system created stack.

>Oh, and Ian recommended looking at free thread implementations but I was not
>able to find any - the Win32 pthreads are really only a layer around the
>Windows threads but if you happen to know any free implementation please
>send me a pointer.

NT/W2K has things called fibers, which are essentially non-premptive 
application scheduled threads. These were introduced in the NT4 SP3 
timeframe. I'd bet Win9x doesn't have them (I try to avoid thinking about 
Win9x whenever possible).

- Jan





More information about the Squeak-dev mailing list