all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: Help sought: Details of byte-compile-make-closure, please.
Date: Tue, 17 May 2022 09:15:37 +0000	[thread overview]
Message-ID: <YoNnuXhb+eGgGzX9@ACM> (raw)

Hello, Emacs.

Whilst fixing bug #55323, I came across more places in the byte compiler
where we might need to strip positions from symbols.

In particular, in byte-compile-make-closure (in bytecomp.el), there are
two calls to make-byte-code.  These calls have (amongst other things) an
ARG argument and an &optional INTERACTIVE-SPEC argument.

The comments around this part of the code are rather sparse, and I can't
find any documentation for internal-make-closure.

My questions:

(i) Does byte-compile-make-closure get called at all when
lexical-binding is nil?

(ii) Is the ARG argument to make-byte-code, extracted from the parameter
FORM always in the bit-encoded form (7 bits for minimum args, 7 bits for
maximum args and 1 bit for &rest), or might it sometimes be an "old
fashioned" list of symbols?  I need to know this because such a list
might need positions stripping from these symbols.

(iii) Is there ever a non-null interactive form contained in the
parameter FORM?  (If so, it comes in in a &rest parameter and is
forwarded to make-byte-code in an &optional argument.)  Such an
interactive form may need positions stripping from its symbols too.

Thanks in advance for the help!

-- 
Alan Mackenzie (Nuremberg, Germany).



             reply	other threads:[~2022-05-17  9:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  9:15 Alan Mackenzie [this message]
2022-05-17 12:04 ` Help sought: Details of byte-compile-make-closure, please Eli Zaretskii
2022-05-17 12:33 ` Stefan Monnier

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=YoNnuXhb+eGgGzX9@ACM \
    --to=acm@muc.de \
    --cc=emacs-devel@gnu.org \
    /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.