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

Igor Stasenko siguctua at gmail.com
Thu Jan 26 21:01:45 UTC 2017


On 26 January 2017 at 22:58, Nicolas Cellier <
nicolas.cellier.aka.nice at gmail.com> wrote:

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

you mean interesting in terms, like implementing a 70's era processor or
DoS simulator(s) in javascript, so you can open it on web page and have
fun? :)


>
>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>>
>
>


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


More information about the Vm-dev mailing list