[Vm-dev] Re: localIP, instructionPointer, currentBytecode data size
Ang BeePeng
beepeng86 at yahoo.com
Tue Mar 2 08:41:34 UTC 2010
Hi, Thank you so much for your detail explanation.
I saw the following in win32 VM interp.c,
# define pointerForOop(oop) ((char *)(sqMemoryBase + ((usqInt)(oop))))
...
char* localSP;
char* localIP;
sqInt currentBytecode;
browserPluginInitialiseIfNeeded();
/* begin internalizeIPandSP */
localIP = pointerForOop(instructionPointer);
//foo->instructionPointer
localSP = pointerForOop(stackPointer);
Is it true that char* in bold explain difference in both version?
localIP = pointerForOop(instructionPointer); instead of
localIP = pointerForOop(foo->instructionPointer);
In the bluebook, for example
pushReceiverVariableBytecode
| fieldIndex |
fieldIndex := self extractBits: 12 to: 15 of: currentBytecode.
I thought bytecode should be one byte, 8 bits. Why extracting from the
second byte?
Thanks.
Ang Beepeng
--
View this message in context: http://n4.nabble.com/localIP-instructionPointer-currentBytecode-data-size-tp1574626p1574737.html
Sent from the Squeak - VM mailing list archive at Nabble.com.
More information about the Vm-dev
mailing list