struct Location size
Commander Zot
no at no.no
Wed May 10 16:09:53 UTC 2023
On Wednesday, 10 May 2023 at 03:16:19 UTC, Walter Bright wrote:
> On 5/9/2023 1:35 AM, Basile B. wrote:
>> Yes, call me a madlad but in styx the filename information is
>> in the DMD equivalent of `Scope` (and the Loc is 2*32 bits,
>> {line,col}). If you do the same in DMD you can reduce the size
>> to 32 bits, i.e 2*16 bits, {line,col}.
>>
>> I'm not sure this would work for DMD but for styx the
>> rationale was
>>
>> 1. in DMD the size of Loc is a known problem, that's why it's
>> usually recommended to pass its instances by ref, let's not
>> have the same problem.
>> 2. there's much less Scopes than Loc.
>
>
> Indeed, it would eliminate the pass-by-ref of Loc.
how often do you need the _exact_ column? or to rephrase it,
wouldn't column divided by 2 or 3 be good enough to figure out
where an error happened?
More information about the Digitalmars-d
mailing list