[squeak-dev] Alien FFI
Eliot Miranda
eliot.miranda at gmail.com
Sun Mar 22 02:39:32 UTC 2009
On Sat, Mar 21, 2009 at 5:40 PM, John M McIntosh <
johnmci at smalltalkconsulting.com> wrote:
> Alien-Core has this, so is the one you've attached superceeds that?
Yes. The old one doesn't support primitive:moduleName:error: et al.
(apologies)
> pragmaLiteral: selectorSoFar
> "Read a pragma literal. As a nicety we allow a variable name
> (rather
> than a literal string) as the second argument to primitive:error:"
>
> (hereType == #string or: [ hereType == #literal or: [ hereType ==
> #number ] ])
> ifTrue: [ ^ self advance ].
> (here == $# and: [ tokenType == #word ])
> ifTrue: [ ^ self advance ].
> (here == #- and: [ tokenType == #number ])
> ifTrue: [ ^ (self advance; advance) negated ].
> (here = 'true' or: [ here = 'false' or: [ here = 'nil' ] ])
> ifTrue: [ ^ Compiler evaluate: self advance ].
> ((selectorSoFar = 'primitive:error:') and: [hereType == #word])
> ifTrue:
> [^self advance].
> ^ self expected: 'Literal constant'
>
>
>
> On 21-Mar-09, at 2:19 PM, Eliot Miranda wrote:
>
> Hi Ang,
>>
>> On Sat, Mar 21, 2009 at 6:16 AM, Ang Beepeng <beepeng86 at yahoo.com> wrote:
>>
>> I'm trying to load Alien-core into my image, in Windows. It complaint
>> about
>> syntax error.
>>
>> Ccalloc: byteSize "<Integer> ^<Integer>"
>> <primitive: 'primCalloc' error: Literal constant expected
>> ->errorCode
>> module: 'IA32ABI'>
>> ^self primitiveFailed
>>
>> You are missing some pragma support. The relevant method in my image
>> (unofficial) that accepts a variable name in that position is attached.
>>
>> HTH
>>
>> Eliot
>>
>>
>> Similar error occur to many other methods. What should I do to correct it?
>>
>> Thanks.
>>
>> Ang Beepeng
>> --
>> View this message in context:
>> http://www.nabble.com/Alien-FFI-tp22635925p22635925.html
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>>
>>
>>
>> <Parser-pragmaLiteral.st>
>>
>
> --
> ===========================================================================
> John M. McIntosh <johnmci at smalltalkconsulting.com>
> Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
> ===========================================================================
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090321/dd8ce6bc/attachment.htm
More information about the Squeak-dev
mailing list
|