ByteSymbol (#primitivePushFalse) does not understand #coerceTo:sim:

John M McIntosh johnmci at smalltalkconsulting.com
Wed Oct 24 23:22:04 UTC 2007


well
primitiveFunctionPointer := self functionPointerFor: primitiveIndex  
inClass: lkupClass.
	
in C code returns a 'void *'
the self cCoerce: primitiveFunctionPointer to: 'long'
would make that a othervalue  = (long)(void*) value

I note the
InterpreterSimulator>>functionPointerFor: primIndex inClass: lookupClass
	"Override Interpreter to handle the external primitives caching.   
See also 	internalExecuteNewMethod."

	^(primIndex between: 1 and: MaxPrimitiveIndex)
		ifTrue: [primitiveTable at: primIndex + 1]

which instead of an address being return we get a Symbol ByteSymbol  
(#primitivePushFalse)

I'd guess you need a #coerceTo:sim:.  on Symbol to return self.
This of course depends on what primitiveFunctionPointer is used for  
later.


On Oct 24, 2007, at 4:03 PM, Rob Withers wrote:

> primitiveFunctionPointer

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





More information about the Squeak-dev mailing list