[colm-users] Hardcoded word_t

Konstantin Podsvirov konstantin at podsvirov.pro
Fri May 11 09:05:56 UTC 2018



03.05.2018, 21:13, "Konstantin Podsvirov" <konstantin at podsvirov.pro>:
>>> 20:12, 3 May 2018 г., Adrian Thurston <thurston at colm.net>:
>>>> Hi Konstantin,
>>>>
>>>> code_t is the type used to encode virtual machine instructions. Just
>>>> need 1 byte for this now.
>>>>
>>>> half_t is used mostly for virtual machine instruction arguments. It
>>>> started out as 2 bytes, but has grown. It might have been made larger
>>>> than needed at the moment -- haven't looked at that in long time.
>>>>
>>>> word_t is the primary type for virtual machine values pushed to the
>>>> stack and operated on by the VM. The values are either pointers to
>>>> things or integers. The VM assumes the same size here, so whatever type
>>>> is used it needs to be the same size as a pointer or there will be some
>>>> trouble.
>>>>
>>>> Admittedly, portability needs to be improved.
>>> Hi Adrian,
>>> thank you for the clarification. I think this is enough for experiments.

After studying the code, several attempts and experiments, I want to say that adding support for 64-bit platforms is not a trivial task.

Unfortunately I do not have the time and energy to solve this issue.

>>>> On 2018-04-30 11:34, Konstantin Podsvirov wrote:
>>>>>  30.04.2018, 18:06, "Adrian Thurston" <thurston at colm.net>:
>>>>>>  Hi, yes would like to have this fixed at some point. Sorry no ETA at
>>>>>>  the moment.
>>>>>
>>>>>  But can you briefly describe what does each type code_t, word_t,
>>>>>  half_t and what are the requirements in size and made to them.
>>>>>
>>>>>>  On 2018-04-29 12:53, Konstantin Podsvirov wrote:
>>>>>>>  Hello colm developers... :-)
>>>>>>>
>>>>>>>  Currently the word_t is hardcoded in src/tree.h file as unsigned long
>>>>>>>  type, bun used to store pointers too.
>>>>>>>
>>>>>>>  On some platform (for example mingw64) size of the long (4 byte) less
>>>>>>>  then size of the void* (8 byte).
>>>>>>>
>>>>>>>  Previously i add check for this problem in CMake project file, but
>>>>>>>  not provide any solution.
>>>>>>>
>>>>>>>  What you think about this?
>>>>>>>
>>>>>>>  --
>>>>>>>  Regards,
>>>>>>>  Konstantin Podsvirov
>>>>>>>
>>>>>>>  _______________________________________________ colm-users mailing
>>>>>>>  list colm-users at colm.net
>>>>>>>  http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
>>>>>>  ,
>>>>>>
>>>>>>  _______________________________________________
>>>>>>  colm-users mailing list
>>>>>>  colm-users at colm.net
>>>>>>  http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
>>>>>
>>>>>  --
>>>>>  Regards,
>>>>>  Konstantin Podsvirov
>>>>>
>>>>>  _______________________________________________
>>>>>  colm-users mailing list
>>>>>  colm-users at colm.net
>>>>>  http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
>>>>
>>>> _______________________________________________
>>>> colm-users mailing list
>>>> colm-users at colm.net
>>>> http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
>>>
>>> _______________________________________________
>>>
>>> colm-users mailing list
>>> colm-users at colm.net
>>> http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
>>
>> Regards,
>> Konstantin Podsvirov



More information about the colm-users mailing list