[Vm-dev] Sometimes it's too easy, part II

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Thu Jan 26 20:58:18 UTC 2017


2017-01-26 21:46 GMT+01:00 Igor Stasenko <siguctua at gmail.com>:

>
>
>
> On 26 January 2017 at 22:32, Nicolas Cellier <nicolas.cellier.aka.nice@
> gmail.com> wrote:
>
>>
>>
>>
>> 2017-01-26 21:20 GMT+01:00 Igor Stasenko <siguctua at gmail.com>:
>>
>>>
>>> +1
>>>
>>> with C i was always wondering, why C standard does not provides
>>> an unsigned integer type which size strictly corresponds to size of
>>> pointer type, e.g.
>>> sizeof(some standard uint) == sizeof(void*)
>>> that would solve so many problems and make thing so much easier..
>>>
>>>
>> In C99, there is intptr_t (and all the accompanying MACROS for
>> printf/scanf formats, maximum value etc...)
>>
>> i guess, you meant *uintptr_t* then
> but it was introduced only in C99.. and compilers started supporting C99
> years later..
> but the problem is that AFAIK, first lines of Squeak were written around
> '96
> and people had to deal with what they had..
>
> And then there's a people, whose main argument for using C is 'its
> portable'.. Hell yes, except it wasn't when portable things, like
> our VM were written first :)
>
>
If not all compilers support C99, most support at least uintptr_t
But because we are really caring of obsolete configurations, we have
introduced a usqIntptr_t...

However, an oop is not necessarily a usqIntptr_t, for example if we have
32bits image on 64bits VM, which might still be an interesting case.


>
> --
> Best regards,
> Igor Stasenko.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170126/f252f46d/attachment-0001.html>


More information about the Vm-dev mailing list