Switching to use foo struct on Windows VM

Andreas Raab andreas.raab at gmx.de
Sun Jul 15 02:45:40 UTC 2007


sig wrote:
> I tried to introduce VM pointers table for use by Exupery, but found
> that there's no common way for adding this code because all platforms,
> except win32 using foo struct for globals.

Can you say what the requirements for this patch are? E.g., why exactly 
does it matter if the VM is compiled with struct foo or not?

> benchmark shows no noticeable difference using foo struct or not.
> Maybe this is bad benchmark for this case..

This result is quite surprising. When John originally introduced this 
option, x86 was significantly slower when compiling with than without 
it. As a matter of fact, given that probably some 90+% of all Squeak 
platforms are now x86 I was thinking about removing it altogether (after 
all, it's just a pointless memory dereferencing which is only 
advantageous on platforms that don't have direct addressing modes).

> Please , let me know, if my patch is acceptable, from this depends the
> way how i implement VM pointers table. :)

To be blunt, there are two things I don't like about it: First, it 
introduces the need for another dereferencing in an already 
register-deprived model. Second, anything containing "struct foo fum" is 
immediately on my list of things I never want to see in my code. 
Changing these names to something sensible would make it a lot easier to 
convince me about the changes.

However, I can probably fix up the support code so that it's possible to 
compile a "struct foo VM", which I presume is your main need. Although, 
given that a "struct foo VM" will compile trivially without the 
indirection, it may be easier for you to compile Unix and Mac VMs 
without the extra indirection.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list