[Vm-dev] Re: Incorrect return type of positive64BitIntegerFor in
FilePlugin.c
Eliot Miranda
eliot.miranda at gmail.com
Sat Jan 4 05:19:57 UTC 2014
Hi Nicolas,
On Wed, Jan 1, 2014 at 1:16 AM, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:
>
>
> 2013/12/31 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
>
>> I forgot to tell this was in COG branch.
>> This file is generated, and the type is inferred from
>> InterpreterProxy>>positive64BitIntegerFor:
>> I guess that a correct <returnTypeC:#sqInt> annotation is missing here.
>>
>>
>> The question is why using InterpreterProxy from the plugin code generator?
> I find it strange to scatter (and duplicate) C-generation hints in a code
> that is not intended to be C-generated...
>
The problem is that the InterpreterProxy interface wasn't well-documented
in Smalltalk. Instead the definitive code is in
platforms/Cross/vm/sqVirtualMachine.[ch]. I think it is better to have
InterpreterProxy define the return types (via the pragmas) and to use these
definitions for tests.
See VMInterfaceConsistencyTests>>#testInterpreterProxyInterface.
Since the default return type is sqInt there's no pragma to specify it.
But I agree it would be preferrable to be explicit.
> 2013/12/31 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
>>
>>> positive64BitIntegerFor return type is declared sqLong, but should be
>>> sqInt (it returns an oop).
>>>
>>
--
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140103/13d37d2e/attachment.htm
More information about the Vm-dev
mailing list