* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
@ 2021-03-09 17:59 Eli Zaretskii
2021-03-09 20:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-03-09 17:59 UTC (permalink / raw)
To: 47025
I've noticed that the native-comp branch preloads pcase:
Loading files (native compiled elisp)...
Loading emacs-lisp/macroexp (native compiled elisp)...
Loading emacs-lisp/pcase...
Loading emacs-lisp/macroexp (native compiled elisp)...
whereas on master this doesn't happen. Why is that? Do we really
need to preload pcase? If that's unavoidable, it should be added to
shortlisp, so that we eln-compile it.
In GNU Emacs 28.0.50 (build 1076, i686-pc-mingw32)
of 2021-03-09 built on HOME-C4E4A596F7
Repository revision: 40d8f83e53ba64355035da78967c994d09a7802d
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 5.1.2600
System Description: Microsoft Windows XP Service Pack 3 (v5.1.0.2600)
Configured using:
'configure -C --prefix=/d/usr --with-wide-int --with-modules
--enable-checking=yes,glyphs 'CFLAGS=-O0 -gdwarf-4 -g3''
Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NOTIFY
W32NOTIFY PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XPM
ZLIB
Important settings:
value of $LANG: ENU
locale-coding-system: cp1255
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win
w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads w32notify
w32 lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 56671 11176)
(symbols 48 7803 1)
(strings 16 21563 1999)
(string-bytes 1 626919)
(vectors 16 13076)
(vector-slots 8 172294 12605)
(floats 8 23 106)
(intervals 40 263 114)
(buffers 888 10))
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
2021-03-09 17:59 bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled Eli Zaretskii
@ 2021-03-09 20:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-10 13:10 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-09 20:21 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 47025
Eli Zaretskii <eliz@gnu.org> writes:
> I've noticed that the native-comp branch preloads pcase:
>
> Loading files (native compiled elisp)...
> Loading emacs-lisp/macroexp (native compiled elisp)...
> Loading emacs-lisp/pcase...
> Loading emacs-lisp/macroexp (native compiled elisp)...
>
> whereas on master this doesn't happen. Why is that?
Mmhh, I think is because of this from loadup.el:
====
(load "emacs-lisp/macroexp")
(if (byte-code-function-p (symbol-function 'macroexpand-all))
nil
;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
;; fail until pcase is explicitly loaded. This also means that we have to
;; disable eager macro-expansion while loading pcase.
(let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
(let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
(load "emacs-lisp/macroexp")))
====
> need to preload pcase?
I fear I don't have an answer as ATM I don't uderstand why it should be
different compared to master.
Andrea
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
2021-03-09 20:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-03-10 13:10 ` Eli Zaretskii
2021-03-10 14:02 ` Stefan Monnier
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2021-03-10 13:10 UTC (permalink / raw)
To: Andrea Corallo, Stefan Monnier; +Cc: 47025
> From: Andrea Corallo <akrl@sdf.org>
> Cc: 47025@debbugs.gnu.org
> Date: Tue, 09 Mar 2021 20:21:21 +0000
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I've noticed that the native-comp branch preloads pcase:
> >
> > Loading files (native compiled elisp)...
> > Loading emacs-lisp/macroexp (native compiled elisp)...
> > Loading emacs-lisp/pcase...
> > Loading emacs-lisp/macroexp (native compiled elisp)...
> >
> > whereas on master this doesn't happen. Why is that?
>
> Mmhh, I think is because of this from loadup.el:
>
> ====
> (load "emacs-lisp/macroexp")
> (if (byte-code-function-p (symbol-function 'macroexpand-all))
> nil
> ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
> ;; fail until pcase is explicitly loaded. This also means that we have to
> ;; disable eager macro-expansion while loading pcase.
> (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
> ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
> (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
> (load "emacs-lisp/macroexp")))
> ====
>
> > need to preload pcase?
>
> I fear I don't have an answer as ATM I don't uderstand why it should be
> different compared to master.
Stefan, any ideas why this happens on the native-comp branch but not
on master?
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
2021-03-10 13:10 ` Eli Zaretskii
@ 2021-03-10 14:02 ` Stefan Monnier
2021-03-10 15:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2021-03-10 14:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 47025, Andrea Corallo
>> (load "emacs-lisp/macroexp")
>> (if (byte-code-function-p (symbol-function 'macroexpand-all))
>> nil
>> ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
>> ;; fail until pcase is explicitly loaded. This also means that we have to
>> ;; disable eager macro-expansion while loading pcase.
>> (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
>> ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
>> (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
>> (load "emacs-lisp/macroexp")))
>> ====
>>
>> > need to preload pcase?
>>
>> I fear I don't have an answer as ATM I don't uderstand why it should be
>> different compared to master.
>
> Stefan, any ideas why this happens on the native-comp branch but not
> on master?
It's probably the `byte-code-function-p` which tries to distinguish the
case where macroexp has not yet been compiled, but on the native branch,
I suspect that (byte-code-function-p (symbol-function 'macroexpand-all))
will return nil when macroexp has been compiled because it's now
a `subrp`.
So we could replace
(byte-code-function-p (symbol-function 'macroexpand-all))
with
(or (byte-code-function-p (symbol-function 'macroexpand-all))
(subrp (symbol-function 'macroexpand-all)))
or with
(not (consp (symbol-function 'macroexpand-all)))
-- Stefan
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
2021-03-10 14:02 ` Stefan Monnier
@ 2021-03-10 15:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-10 16:12 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-03-10 15:22 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 47025, Eli Zaretskii
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> (load "emacs-lisp/macroexp")
>>> (if (byte-code-function-p (symbol-function 'macroexpand-all))
>>> nil
>>> ;; Since loaddefs is not yet loaded, macroexp's uses of pcase will simply
>>> ;; fail until pcase is explicitly loaded. This also means that we have to
>>> ;; disable eager macro-expansion while loading pcase.
>>> (let ((macroexp--pending-eager-loads '(skip))) (load "emacs-lisp/pcase"))
>>> ;; Re-load macroexp so as to eagerly macro-expand its uses of pcase.
>>> (let ((max-lisp-eval-depth (* 2 max-lisp-eval-depth)))
>>> (load "emacs-lisp/macroexp")))
>>> ====
>>>
>>> > need to preload pcase?
>>>
>>> I fear I don't have an answer as ATM I don't uderstand why it should be
>>> different compared to master.
>>
>> Stefan, any ideas why this happens on the native-comp branch but not
>> on master?
>
> It's probably the `byte-code-function-p` which tries to distinguish the
> case where macroexp has not yet been compiled, but on the native branch,
> I suspect that (byte-code-function-p (symbol-function 'macroexpand-all))
> will return nil when macroexp has been compiled because it's now
> a `subrp`.
Ops should have spotted that :/ thanks for the suggestion.
711b2c8349 fix this for me.
Eli let me know if we are okay to close.
Thanks
Andrea
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled
2021-03-10 15:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-03-10 16:12 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2021-03-10 16:12 UTC (permalink / raw)
To: Andrea Corallo; +Cc: 47025-done, monnier
> From: Andrea Corallo <akrl@sdf.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 47025@debbugs.gnu.org
> Date: Wed, 10 Mar 2021 15:22:45 +0000
>
> > It's probably the `byte-code-function-p` which tries to distinguish the
> > case where macroexp has not yet been compiled, but on the native branch,
> > I suspect that (byte-code-function-p (symbol-function 'macroexpand-all))
> > will return nil when macroexp has been compiled because it's now
> > a `subrp`.
>
> Ops should have spotted that :/ thanks for the suggestion.
>
> 711b2c8349 fix this for me.
>
> Eli let me know if we are okay to close.
This is fixed, closing.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-10 16:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-09 17:59 bug#47025: 28.0.50; [feature/native-comp] pcase is preloaded, but not eln-compiled Eli Zaretskii
2021-03-09 20:21 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-10 13:10 ` Eli Zaretskii
2021-03-10 14:02 ` Stefan Monnier
2021-03-10 15:22 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-10 16:12 ` Eli Zaretskii
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.