[colm-users] Hardcoded word_t
Adrian Thurston
thurston at colm.net
Fri May 11 17:11:32 UTC 2018
We'll get this cleaned up eventually. There is nothing about the
language design that demands certain sizes for things. It's just a
matter of me doing most of my research on a certain platform. It's
important to note that colm is still a research project. Ragel 7 depends
on it now, but that is still also a development release.
Note I've got some changes to colm to push that fix certain issues that
arise on platforms other than the one I work on mostly (amd64 ubuntu
16.04). Coming soon.
On 2018-05-11 05:05, Konstantin Podsvirov wrote:
> 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
>
> _______________________________________________
> colm-users mailing list
> colm-users at colm.net
> http://www.colm.net/cgi-bin/mailman/listinfo/colm-users
More information about the colm-users
mailing list