|
From: tim R. <ti...@su...> - 2004-07-10 00:15:10
|
> 1. If everything worked right, is it the case that a current system > should be able to simulate itself? What this means is that, provided > that the plugin interface all works (and fails) properly, does all > the necessary failure code exist such that the system will run > completely and with integrity? If this is not so, then a further > question is, apart from whatever fixes may be needed, how much new > code would need to be written? > With the two fixes I sent you in between packing boxes and disconnecting computers it should simulate about as well as can be expected right now. As you've discovered, there are parts of some plugins which were not written with support for the simulator in mind. For example, 6 methods send strlen: and 7 strcmp: - neither of which are simulated. BalloonEngine>>#primInitializeBuffer: looks suspicious to me from a quick scan mainly because resetGraphicsEngineStats fills up 'workBuffer' which most likely needs to be wrapped in a CArrayAccessor in the BalloonEngineSimulation code. See BalloonEngineSimulation>smallSqrtTable for an example involving a small array. Interpreter>primitiveTruncated fails for utterly obvious reasons - the line self cCode:'pushInteger((int) trunc)' inSmalltalk:[self pushInteger: rcvr truncated]] quite obviously doesn't do a range test on the truncated number and since a very large float can easily exceed an acceptable 32bit int, kaboom. All of the improvements Ned (&I) proposed in april when you started looking at 64bitness are in the VMMaker3-7b5 package. The extra two fixes compensate for the latest work on dispatching direct function addresses in the message sending. Aside from some places where the perpetrator of code can remember doing something unsimulable, the only real answer is to run till it breaks and find a fix each time. Ny experience is that this is tedious, time consuming and utterly unappreciated work that nobody cares about until they have a problem. Much like most VM work in fact :-) I'm not in a position to do anything much with this for now; I'm still unpacking, setting up and trying to find everything. tim |