From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 69749@debbugs.gnu.org, eric.marsden@risk-engineering.org
Subject: bug#69749: (bindat-type sint 32 t) -> unbound variable bitlen
Date: Sat, 16 Mar 2024 13:16:17 +0200 [thread overview]
Message-ID: <861q8a77ge.fsf@gnu.org> (raw)
In-Reply-To: <jwvttl7fnq0.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Fri, 15 Mar 2024 12:51:36 -0400)
> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>, 69749@debbugs.gnu.org
> Date: Fri, 15 Mar 2024 12:51:36 -0400
>
> >> Your code ends up (via the `sint` of `bindat-type`) relying on the
> >> `lexical-binding` dialect of ELisp, which is enabled by default in
> >> `ielm` but not in your file.
> > Indeed, thanks for the fix.
> > Perhaps it would be useful for the bindat-type macro to emit a warning when
> > it is running in the dynamic-binding dialect (at least for the types that
> > require lexical binding)?
>
> Agreed. I just pushed a corresponding patch to `master`.
> It impacts only `sint` (among the predefined types).
>
> > This would have no runtime cost when byte-compiled or native-compiled,
> > I assume.
>
> The patch I installed indeed doesn't impact the performance of the code.
> The underlying detail which requires `lexical-binding` to be active does
> cause the code for `sint` to be significantly less efficient than that
> for `uint`, tho, so if performance is important, you may prefer to use
> `uint` and do the conversion to a signed integer manually elsewhere. 🙁
Thanks, should we now close this bug?
next prev parent reply other threads:[~2024-03-16 11:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-12 15:18 bug#69749: (bindat-type sint 32 t) -> unbound variable bitlen Eric Marsden
2024-03-13 11:53 ` Eli Zaretskii
2024-03-13 12:54 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
[not found] ` <4a7ccaf7-02dc-4cca-b6e7-520ffb45dcac@risk-engineering.org>
2024-03-15 16:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-16 11:16 ` Eli Zaretskii [this message]
[not found] ` <000d8acf-bad4-432a-a775-0c03225674fe@risk-engineering.org>
2024-03-17 19:13 ` Eli Zaretskii
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=861q8a77ge.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69749@debbugs.gnu.org \
--cc=eric.marsden@risk-engineering.org \
--cc=monnier@iro.umontreal.ca \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.