unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55355: TBD: inappropriate inlining, cmacro errors
@ 2022-05-10 22:57 Ivan Sokolov
  2022-05-11 12:10 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Sokolov @ 2022-05-10 22:57 UTC (permalink / raw)
  To: 55355

Hi all! I encountered inlining errors, unfortunately I have no idea what
is causing them.

Here is the code:

(cl-defstruct (foo (:constructor foo<-list ((bar _ baz))))
  bar
  baz)

(foo<-list '(1 2 3))                    ; does not work

(funcall #'foo<-list '(1 2 3))          ; does not work

(apply #'foo<-list '(1 2 3) nil)        ; does work

Here is the backtrace:

Debugger entered--Lisp error: (wrong-number-of-arguments foo<-list--cmacro 2)
  signal(wrong-number-of-arguments (foo<-list--cmacro 2))
  (if (= (length --cl-rest--) 3) (pop --cl-rest--) (signal 'wrong-number-of-arguments (list 'foo<-list--cmacro (length --cl-rest--))))
  (let* ((--cl-rest-- (if (= (length --cl-rest--) 1) (car --cl-rest--) (signal 'wrong-number-of-arguments (list 'foo<-list--cmacro (length --cl-rest--))))) (bar (if (= (length --cl-rest--) 3) (pop --cl-rest--) (signal 'wrong-number-of-arguments (list 'foo<-list--cmacro (length --cl-rest--))))) (_ (pop --cl-rest--)) (baz (car --cl-rest--))) (cl-block foo<-list--cmacro (cl--defsubst-expand '(bar _ baz) '(cl-block foo<-list (record 'foo bar baz)) nil nil nil bar _ baz)))
  foo<-list--cmacro((foo<-list '(1 2 3)) '(1 2 3))
  apply(foo<-list--cmacro (foo<-list '(1 2 3)) '(1 2 3))
  macroexp--compiler-macro(foo<-list--cmacro (foo<-list '(1 2 3)))
  #f(compiled-function (form func) #<bytecode -0x1ed89cfba17e95bb>)(((foo<-list '(1 2 3))) foo<-list)
  macroexp--expand-all((foo<-list '(1 2 3)))
  macroexp--all-forms((progn (foo<-list '(1 2 3))) 1)
  #f(compiled-function (form func) #<bytecode -0x1ed89cfba17e95bb>)(((progn (foo<-list '(1 2 3)))) progn)
  macroexp--expand-all((progn (foo<-list '(1 2 3))))
  macroexpand-all((progn (foo<-list '(1 2 3))))
  elisp--eval-last-sexp(nil)
  eval-last-sexp(nil)
  funcall-interactively(eval-last-sexp nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

Affected versions:

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)

GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6) of 2022-04-28





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-11 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-10 22:57 bug#55355: TBD: inappropriate inlining, cmacro errors Ivan Sokolov
2022-05-11 12:10 ` Lars Ingebrigtsen
2022-05-11 18:20   ` Ivan Sokolov
2022-05-11 18:42     ` Eli Zaretskii
2022-05-11 20:22   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).