[ENH][VM] Improved code generation (hopefully ;)

Andreas Raab andreas.raab at gmx.de
Tue Jul 8 11:24:00 UTC 2003


John, Tim,

Thanks for the info. I've attached a modernized version for 3.6 which fixes
a number of issues I ran into when trying to use the 3.6 version:
* SecurityPlugin>>primitiveCanWriteImage changed to use
proxy->ioCanWriteImage but the proxy doesn't export it (why was this
changed?) I reverted back to "self ioCanWriteImage".
* "isUnwindMarked" was used for both a method name and a temp name (leads to
problems if it doesn't get inlined)
* I also fixed the "nilObj" vs. "nilOop" issue reported by John

In addition, I've updated CCodeGen to include two features I always wanted
to have for C-level debugging:

* CCodeGen can now use symbolic constants instead of their values, e.g.,
	self splObj: ClassFoo
  gets translated into
	splObj(ClassFoo)
  with ClassFoo being a #define instead of a literal. This makes it much
easier to look at code if it uses things like AllButTypeMask instead
2147483647U ;-) This feature is covered by the #useSymbolicConstants
property in CCodeGen which - by default - is on.

* CCodeGen can generate dead code branches, if we want it to. This makes it
possible to do some quick C-level hacks if combined with the above, e.g.,
the generated code will now look like:

	if(DoAssertionChecks) {
	  ...
	}

and due to DoAssertionChecks being a #define it's simple to change these
things if you're experimenting with or debugging the VM. This feature is
covered by the "generateDeadCode" property of CCodeGen (by default it's on).

This time I've both compiled and run the code so I know it works but I'm
uncertain if there may be any problems with either foo or fum or fi or fee
;-) so I'd be delighted if one of you could check them out.

One more question btw: Fortunately, my "standard configuration tests" point
out that some plugins are missing from the configuration I used (which not
surprisingly includes the B3D stuff), but it also shows that the
IntegerPokerPlugin has gone away. Where can I find it and why was it removed
from VMMaker?

Cheers,
  - Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CodeGenEnh-3Point6.4.cs
Type: application/octet-stream
Size: 25287 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030708/0c09d387/CodeGenEnh-3Point6.4.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: InterpreterFixes-3Point6.2.cs
Type: application/octet-stream
Size: 9463 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030708/0c09d387/InterpreterFixes-3Point6.2.obj


More information about the Squeak-dev mailing list