Hi Nicolas,


On Wed, Jan 1, 2014 at 1:16 AM, Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com> wrote:
 

2013/12/31 Nicolas Cellier <nicolas.cellier.aka.nice@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@gmail.com>
positive64BitIntegerFor return type is declared sqLong, but should be sqInt (it returns an oop).

--
best,
Eliot