Tarantool development patches archive
 help / color / mirror / Atom feed
From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump
Date: Tue, 30 Jun 2026 15:27:16 +0300	[thread overview]
Message-ID: <akO2JAi8GEy8jSfA@root> (raw)
In-Reply-To: <1782820111.346121703@f764.i.mail.ru>

Evgeniy,
Thanks for the answer, see my thoughts below.

On 30.06.26, Evgeniy Temirgaleev wrote:
> Hi, Sergey!
> 
> LGTM. And please see my note about renaming issue.
> 
> > 
> > From: Sergey Kaplun <skaplun@tarantool.org>
> > To: Evgeniy Temirgaleev <e.temirgaleev@tarantool.org>
> > Cc: tarantool-patches@dev.tarantool.org, Sergey Bronnikov <sergeyb@tarantool.org
> > >
> > Date: Monday, June 29, 2026 10:21 PM +03:00

<snipped>

> > > > +
> > > > +def ctype_isrefarray(info):
> > > > + return (info & (CTMASK_NUM | CTF_VECTOR | CTF_COMPLEX)) == \
> > > > + ctinfo(CT_ARRAY, 0)
> > > > +
> > > > +
> > > > +def ctype_cid(info):
> > > >
> > >
> > > Let’s put these function definitions in the ‘lj_ctype.h’ order?
> > > May we group the definitions by corresponding C files also? # lj_ctype.h
> > … # lj_cdata.h … # lj_xxx.c …
> > 
> > 
> > Sorted as you suggested. The sorting is the following:
> > * lj_ctype.h
> > * lj_cdata.h -- `cdata_getptr()`
> > * lj_obj.h -- `cdataptr()`
> > 
> 
> Thanks! We can add a comment with file name before each block to improve readability slightly more. Feel free to ignore.

I suppose that ctags or whatsoever will do the trick. Ignoring since you
don't insist.

<snipped>

> > > >
> > >
> > > Also, it seems, it will be easy to read to code, if it will be possible
> > to distinguish between ported functions and extension itself ones. May be
> > by use the ‘dbg_’ prefix for extension function names.
> > 
> > I suppose this refactoring can be done in the separate issue. Since it
> > is related to all functions. Also, the `dbg` is already used for the
> > instance of the corresponding class. `dump_` prefix looks common for all
> > dumpers of our extension.
> > 
> 
> Agreed. And I vote for this patch.
> May be it will be several documented prefixes. It will be more verbosely, but I think it will be very helpful in a long perspective for supporting the extension to quick distinguish LuaJIT-ported routine e.g. `ctype_preplit` with extension routine e.g. `cdata_val_int64`.
> Can you offer some prefix name good for you now? May be we can start naming with it at this point, what do you think?

For now we have several "prefixes":
* `dbg.` for the debugger implementation defined helpers.
* `dump_` for the dumper function of any kind (even helpers).
* `LJ*` for the classes to be the entry points for our extensions.

I'm not sure that ctype_preplit -> dump_ctype_preplit helps for find the
original logic for this dumper from the LuaJIT source code. So, I'm open
to ideas ;).

I prefer if the refactoring of names will be done separately so there
is no a part of the naming in this patch series and another part in the
next one. At least this is inconsistent.

<snipped>

> 
> --
> Best regards,
> Evgeniy Temirgaleev

-- 
Best regards,
Sergey Kaplun

  reply	other threads:[~2026-06-30 12:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 20:29 [Tarantool-patches] [PATCH luajit 0/3] Extend debug extension Sergey Kaplun via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 1/3] dbg: introduce lj-ir, lj-jslots, lj-trace dumpers Sergey Kaplun via Tarantool-patches
2026-06-28  1:03   ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-28 16:32     ` Sergey Kaplun via Tarantool-patches
2026-06-29 16:35       ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:45   ` Sergey Bronnikov via Tarantool-patches
2026-06-30 16:01     ` Sergey Kaplun via Tarantool-patches
2026-07-01 11:23       ` Sergey Bronnikov via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump Sergey Kaplun via Tarantool-patches
2026-06-29 13:55   ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-29 19:20     ` Sergey Kaplun via Tarantool-patches
2026-06-30 11:48       ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 12:27         ` Sergey Kaplun via Tarantool-patches [this message]
2026-06-30 13:07           ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:03             ` Sergey Kaplun via Tarantool-patches
2026-06-30 15:07               ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-30 14:53   ` Sergey Bronnikov via Tarantool-patches
2026-06-30 15:03     ` Sergey Kaplun via Tarantool-patches
2026-07-01  8:25       ` Sergey Kaplun via Tarantool-patches
2026-07-01 11:20         ` Sergey Bronnikov via Tarantool-patches
2026-06-25 20:29 ` [Tarantool-patches] [PATCH luajit 3/3] test: add verbose mode for debug extension tests Sergey Kaplun via Tarantool-patches
2026-06-28  1:31   ` Evgeniy Temirgaleev via Tarantool-patches
2026-06-28 15:19     ` Sergey Kaplun via Tarantool-patches
2026-06-30 14:54   ` Sergey Bronnikov via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=akO2JAi8GEy8jSfA@root \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=e.temirgaleev@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 2/3] dbg: introduce lj-ctype command, extend cdata dump' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox