Working with InterpreterSimulator
Greg & Cindy Gritton
gritton at pop5.ibm.net
Wed Jan 6 06:42:22 UTC 1999
Hi,
Has anyone recently worked with the the InterpreterSimulator?
I am trying to work on some speed improvements to the interpreter,
and thought that being able to simulate the interpreter in
Smalltalk would be worthwhile, especially since a class already
existed to do so. Unfortunately, when I tried it I ran into
problems.
The first problem I ran into was in the adjustFieldsAndClassOf:by:
method. It tries to adjust all the object pointers in an object
by a fixed amount. However, the fixed amount happened to be negative,
resulting in negative value being stored in the Interpreter's "memory",
which is implemented as a bitmap. Unfortunately, the bitmap's
at:put: primitive expects a positive value. (Specifically,
in the real interpreter that I am running calls
bytecodePrimAtPut which calls stObject:at:put:,
which calls subscript:with:storing:format, which calls
positive32BitValueOf:, which fails on a negative number.
Is this failure necessary? Negative numbers make useful 32-bit values,
and the surrounding code looks like it would handle them just fine.)
I tried the 2.3 beta, and it gets past this point, but
stops soon afterwards by getting a wrong size in
InterpreterSimulator(ObjectMemory)>>ObjectAfter
which is called from InterpreterSimulator(Interpreter)>>byteSwapByteObjects.
I can continue to try to debug the problem, but I am wondering
if someone else has tried this functionality recently, or if it
is so old that there is little hope of getting it working easily.
Should I just work from within C instead?
Also, to use the InterpreterSimulator realistically, do I
need a special image?
Sincerely,
Greg Gritton
More information about the Squeak-dev
mailing list
|