[Vm-dev] Fwd: squeak 32bit clean, no? yes?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Sep 8 20:48:14 UTC 2010


Let me try that with the correct email address... 

Begin forwarded message:

> From: John M McIntosh <johnmci at smalltalkconsulting.com>
> Date: September 8, 2010 2:20:29 AM PDT
> To: Squeak VM Developers <squeak-vmdev at lists.sourceforge.net>
> Subject: squeak 32bit clean, no? yes? 
> Reply-To: johnmci at smalltalkconsulting.com
> 
> It's 2:05am I should be in bed but I'm confused. 
> 
> given BaseHeaderSize is 4 
> foo->newMethod is a usqInt  (unsigned) 
> 
> I see in a interp.c 
> Automatically generated from Squeak on #(27 April 2009 5:35:31 pm)
> 
> sqInt activateNewMethod(void) {
> register struct foo * foo = &fum;
>    sqInt initialIP;
>    sqInt newContext;
>    sqInt where;
>    sqInt methodHeader;
>    sqInt tempCount;
>    sqInt i;
>    sqInt nilOop;
>    sqInt tmp;
> 
> 	methodHeader = longAt((foo->newMethod + BaseHeaderSize) + (HeaderIndex << ShiftForWord));
> 
> 
> So that is a longAt: ( unsigned sqInt + 4)   
> 
> But in  the interp.c code I generated in July I have 
> 	methodPointer (a sqInt) =  foo->newMethod (a usqint) 
> 	then 
> 	methodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));
> 
> So that is a longAt: (sqInt + 4). 
> 
> Er so if  foo->newMethod is > 0x7FFFFFFF  won't that +4 not do what we think it should do? 
> Or should I go to bed now? 
> 
> 
> /* Automatically generated from Squeak on 8 July 2010 12:32:36 pm 
>   by VMMaker 4.2.6
> */
> 
> 
> sqInt activateNewMethod(void) {
> register struct foo * foo = &fum;
>    sqInt tempCount;
>    sqInt nilOop;
>    sqInt where;
>    sqInt initialIP;
>    sqInt i;
>    sqInt newContext;
>    sqInt methodHeader;
>    sqInt methodPointer;
>    sqInt tmp;
>    sqInt activeCntx;
>    sqInt valuePointer;
>    sqInt valuePointer1;
> 
> 	/* begin headerOf: */
> 	methodPointer = foo->newMethod;
> 	methodHeader = longAt((methodPointer + (BASE_HEADER_SIZE)) + (HeaderIndex << (SHIFT_FOR_WORD)));
> 
> 
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
> 
> 
> 
> 

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3829 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100908/83543e23/smime.bin


More information about the Vm-dev mailing list