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

Rob Withers reefedjib at yahoo.com
Wed Oct 24 23:59:41 UTC 2007


Ok, I see what you mean.  I added #coerceTo:sim: to Symbol and I believe it 
works.  #dispatchFunctionPointer: does a perform so a symbolk seems good to 
go.

And then I hit my next issue.  In postGCAction, the gcSemaphoreIndex is nil, 
which blows up in signalSemaphoreWithIndex:.  Trying to be a bit more self 
sufficient, I put a halt in primitiveSetGCSemaphore and reran it, but it 
never breaks, so it never seems to get set.   Full stop.

cheers,
Rob

----- Original Message ----- 
From: "John M McIntosh" <johnmci at smalltalkconsulting.com>
To: "The general-purpose Squeak developers list" 
<squeak-dev at lists.squeakfoundation.org>
Sent: Wednesday, October 24, 2007 4:22 PM
Subject: Re: ByteSymbol (#primitivePushFalse) does not 
understand#coerceTo:sim:


> 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