[Ohrrpgce] SVN: teeemcee/8023 Fix/refactor RELOAD VLI implementation to support negative and 64bit int

Ralph Versteegen teeemcee at gmail.com
Sun May 22 18:39:58 PDT 2016


No, 'data' integers are stored as 'tagged' 1- 2- 4- or 8-byte integers
(rliByte, rliShort, etc) because the size of the int can be stored as
the node type, while VLIs are used for everything else, like encoding
string length. It's a bit weird, but it's faster and also more compact
in most cases to not use VLIs where not necessary.

On 23 May 2016 at 02:48, James Paige <Bob at hamsterrepublic.com> wrote:
> So we really had no negative VLIs in any documents? I had (mistakenly?)
> assumed that *all* integers in reload were VLI
>
>
> On Sunday, May 22, 2016, <subversion at hamsterrepublic.com> wrote:
>>
>> teeemcee
>> 2016-05-22 02:28:28 -0700 (Sun, 22 May 2016)
>> 769
>> Fix/refactor RELOAD VLI implementation to support negative and 64bit ints;
>> add lots of testcases.
>>
>> -Encoding of negative numbers was completely broken due to a typo
>>  (This typo produced a compiler warning when compiling with -gen gcc!)
>>  However RELOAD files do not contain negative VLI numbers
>> -ReadVLI only supported 32 bit ints, returning wrong answer otherwise
>>  (except in 64 bit builds)
>> -I have changed the encoding of negative numbers. Now the bitwise
>>  complement is stored rather than the negation. This allows
>>  -2^63 to be encoded. No change to the RELOAD version number is necessary.
>> -Read/WriteVLI were duplicated for two different types of file
>> input/output,
>>  so I combined them by using macros
>> -Testcases check that all these functions give expected results.
>> ---
>> U   wip/reload.bas
>> U   wip/reload.bi
>> U   wip/reloadtest.bas
>> _______________________________________________
>> Ohrrpgce mailing list
>> ohrrpgce at lists.motherhamster.org
>> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>


More information about the Ohrrpgce mailing list