sig writes:
VMMaker-sig.70 Exupery-sig.262
To see, how globals table generated look at CCodeGenerator>>emitGlobalTablesOn:methodList:
Unfortunately as it stands it will only work on Windows.
The major problem is the "foo" structure on other platforms that's used to hold most of the interpreter's variables.
That's why the accessor methods used to call addressOf: rather than just being "self cCode: '&foo->activeContext'" which is what I originally did until Andreas tried to do a quick Windows port. He created addressOf: to provide a platform neutral way of getting the address of an interpreter structure.
#returnPrefixFromVariable: will return the right form for a variable on any platform. Unfortunately, you can't dereference foo in another structure's initialiser.
Andreas created #generateAddressOf:on:indent: to translate the sender #addressOf: into the appropriate C expression.
I'm not sure about your change to Win32VMMaker>>sourceDirectory. If I add that to Exupery's VMMaker what will it do to people with existing Windows build environments?
I like the changes to Exupery itself, it makes the names much more consistant between the image and the VM but until it will run on all plaforms I can not accept it.
Bryce