lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


G'day,

Not sure if this has reported previously... I happened to notice this
while looking at the diffs between 5.4.2 and 5.4.3.  It's just a
clean-up of a typo in a comment.

The diff is in one section of changes in src/ldebug.c:


    62,75c66,71
    <     unsigned int i;
    <     if (pc >= f->abslineinfo[f->sizeabslineinfo - 1].pc)
    <       i = f->sizeabslineinfo - 1;  /* instruction is after last saved one */
    <     else {  /* binary search */
    <       unsigned int j = f->sizeabslineinfo - 1;  /* pc < anchorlines[j] */
    <       i = 0;  /* abslineinfo[i] <= pc */
    <       while (i < j - 1) {
    <         unsigned int m = (j + i) / 2;
    <         if (pc >= f->abslineinfo[m].pc)
    <           i = m;
    <         else
    <           j = m;
    <       }
    <     }
    >     int i = cast_uint(pc) / MAXIWTHABS - 1;  /* get an estimate */
    >     /* estimate must be a lower bond of the correct base */
    >     lua_assert(i < 0 ||
    >               (i < f->sizeabslineinfo && f->abslineinfo[i].pc <= pc));
    >     while (i + 1 < f->sizeabslineinfo && pc >= f->abslineinfo[i + 1].pc)
    >       i++;  /* low estimate; adjust it */

I believe that the line:

    >     /* estimate must be a lower bond of the correct base */

should have "bound" or "boundary" instead of "bond":

    >     /* estimate must be a lower bound of the correct base */

I noticed this while working to expand support for Lua 5.4.3 in my
"lglicua" Tecgraf IM/CD/IUP on GNU/Linux project... I'm looking to
record, and download the latest Major.Minor.Change versions for each
of 5.1 through 5.4, by downloading, compiling and installing the
source tarball for each requested Lua version (for Ubuntu and
LinuxMint, not for CentOS 7/8).

Again, apologies if this has already been dealt with... I don't
know if the current repository is available online.

cheers,

sur-behoffski (Brenton Hoff)
programmer, Grouse Software