[Vm-dev] Re: Incorrect return type of positive64BitIntegerFor in FilePlugin.c

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sat Jan 4 17:15:45 UTC 2014


2014/1/4 Eliot Miranda <eliot.miranda at gmail.com>

>
> 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.
>

Currently, it's not preferable, it's mandatory because the return type is
inferred as sqLong which is incorrect.


>
>>  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/20140104/d3ed1760/attachment.htm


More information about the Vm-dev mailing list