[squeak-dev] Crash

David T. Lewis lewis at mail.msen.com
Mon Feb 14 23:21:12 UTC 2022


On Mon, Feb 14, 2022 at 09:46:35PM +0100, J??rg Belger wrote:
> 
> Seems there is something wrong with the forward pointers. I assume the
> longAt(referent) fails? I guess it is a macro, but VS could not find
> the definition.
> 

Yes, it is a macro defined in platforms/Cross/vm/sqMemoryAccess.h

If implemented as a C function, it can be written like this (translated
from the MemoryAccess package in the VMMaker repository, which is a
slang implementation of the sqMemoryAccess.h macros):

/*	Answer the object memory word, an sqInt, located at an object memory location.
	In the original 32-bit object memory implemention, word size was equivalent
	to C type long. For 64-bit object memory, the method name may be misleading
	because the sqInt value is of C type long long. */

static sqInt longAt(sqInt oop) {
	return ((sqInt) ((((sqInt *) ((sqMemoryBase) + oop)))[0]));
}


Dave



More information about the Squeak-dev mailing list