GNU bug report logs - #50268
28.0.50; Assertion warning during native compilation

Previous Next

Package: emacs;

Reported by: Michael Welsh Duggan <md5i <at> md5i.com>

Date: Mon, 30 Aug 2021 14:06:02 UTC

Severity: normal

Merged with 50720

Found in version 28.0.50

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50268 in the body.
You can then email your comments to 50268 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Mon, 30 Aug 2021 14:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Michael Welsh Duggan <md5i <at> md5i.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 30 Aug 2021 14:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Michael Welsh Duggan <md5i <at> md5i.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.50; Assertion warning during native compilation
Date: Mon, 30 Aug 2021 10:05:16 -0400
[Message part 1 (text/plain, inline)]
With the included file in the current working directory...

First, byte compile the file:
    emacs -Q -batch --eval '(byte-compile-file "pacproxy.el")'

Then, from 
    emacs -Q

    M-: (push default-directory load-path) RET
    M-x load-library RET pacproxy RET

For me, this results in the following warning:

    Warning (comp): /home/md5i/tmp/tmp/pacproxy.el: Error: Assertion failed (and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec)))

[pacproxy.el (application/emacs-lisp, attachment)]
[Message part 3 (text/plain, inline)]
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0)
 of 2021-08-30 built on miko
Repository revision: bc9516a6f12d21971db62ad5def51a3b4858a488
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --without-toolkit-scroll-bars --with-x-toolkit=lucid
 --with-native-compilation'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF X11 XAW3D
XDBE XIM XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  flyspell-mode: t
  display-time-mode: t
  magit-wip-initial-backup-mode: t
  magit-wip-before-change-mode: t
  magit-wip-after-apply-mode: t
  magit-wip-after-save-mode: t
  magit-wip-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Load-path shadows:
/usr/share/emacs/site-lisp/cmake-mode hides /home/md5i/.config/emacs/elpa/cmake-mode-20210104.1831/cmake-mode
/home/md5i/.config/emacs/elpa/transient-20210311.1549/transient hides /usr/local/share/emacs/28.0.50/lisp/transient

Features:
(shadow sort mail-extr gnus-msg gnus-art mm-uu mml2015 mm-view mml-smime
smime dig gnus-sum shr kinsoku svg gnus-group gnus-undo gnus-start
gnus-dbus gnus-cloud gnus-spec gnus-win emacsbug sendmail flyspell
ispell view pacproxy dbus xml descr-text cus-edit pp cus-load time
sieve-manage sasl sasl-anonymous sasl-login sasl-plain rng-loc rng-uri
rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util sgml-mode facemenu dom python tramp-sh tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat
parse-time iso8601 ls-lisp ps-print ps-print-loaddefs ps-def lpr picture
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
diff git-commit log-edit pcvs-util add-log magit-core magit-autorevert
autorevert filenotify magit-margin magit-transient magit-process
with-editor shell pcomplete server magit-mode transient format-spec
magit-git magit-section comp comp-cstr warnings rx cl-extra help-mode
benchmark magit-utils pcase which-func imenu vc-git diff-mode easy-mmode
vc-dispatcher ido crm dash nnimap nnmail gnus-int gnus-range mail-source
message rfc822 mml mml-sec epa mm-decode mm-bodies mm-encode mailabbrev
gmm-utils mailheader utf7 netrc nnoo gnus wid-edit nnheader gnus-util
rmail rmail-loaddefs time-date mail-utils gnus-o365-oauth2 oauth2
url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums
mail-prsvr url-gw nsm rmc puny plstore generated generic-x epg rfc6068
epg-config ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help
ediff-init ediff-util dired-x dired dired-loaddefs compile
text-property-search comint ring ansi-color cc-mode cc-fonts cc-guess
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs edmacro
kmacro derived debian-el finder-inf info package browse-url url
url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd 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 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 dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo x-toolkit x multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 472475 15472)
 (symbols 48 29207 0)
 (strings 32 96154 4379)
 (string-bytes 1 3212668)
 (vectors 16 46522)
 (vector-slots 8 809008 15265)
 (floats 8 664 82)
 (intervals 56 418 14)
 (buffers 992 14))

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Sat, 04 Sep 2021 14:02:02 GMT) Full text and rfc822 format available.

Message #8 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Sat, 04 Sep 2021 10:00:54 -0400
Michael Welsh Duggan <md5i <at> md5i.com> writes:

> With the included file in the current working directory...
>
> First, byte compile the file:
>     emacs -Q -batch --eval '(byte-compile-file "pacproxy.el")'
>
> Then, from 
>     emacs -Q
>
>     M-: (push default-directory load-path) RET
>     M-x load-library RET pacproxy RET
>
> For me, this results in the following warning:
>
>     Warning (comp): /home/md5i/tmp/tmp/pacproxy.el: Error: Assertion
> failed (and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec)))

I did some more testing on this.  I used the following after making the
obvious change to the first line.

(setq pacproxy-directory "/directory/containing/pacproxy")
(native-compile (concat pacproxy-directory "/pacproxy.el"))

The result was the following backtrace:

Debugger entered--Lisp error: (cl-assertion-failed ((and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec))) nil))
  cl--assertion-failed((and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec))))
  comp-limplify-lap-inst((byte-constant "DIRECT" . 0))
  comp-limplify-block(#s(comp-block-lap :name bb_0 :insns nil :closed nil :in-edges nil :out-edges nil :idom nil :df #<hash-table eql 0/65 0x158ad8eec809> :post-num nil :final-frame nil :sp 0 :addr 0 :non-ret-insn nil :no-ret nil))
  comp-limplify-function(#s(comp-func-l :name nil :c-name "F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" :byte-func #f(compiled-function (&rest) "DIRECT" #<bytecode -0x976cfd456815730>) :doc "DIRECT\n\n(fn &rest)" :int-spec nil :lap ((byte-constant "DIRECT" . 0) (byte-return . 0)) :ssa-status nil :frame-size 1 :vframe-size 0 :blocks #<hash-table eq 3/65 0x158ad8ad88f1> :lap-block #<hash-table equal 0/65 0x158ad8ad8911> :edges-h #<hash-table eql 0/65 0x158ad8e0343f> :block-cnt-gen #f(compiled-function () #<bytecode 0x1f53ba4c3e92>) :edge-cnt-gen #f(compiled-function () #<bytecode -0xfffe0ac45b3c16c>) :has-non-local nil :speed 2 :pure nil :type nil :args #s(comp-nargs :min 0 :nonrest 0 :rest t)))
  #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_69>("F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" #s(comp-func-l :name nil :c-name "F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" :byte-func #f(compiled-function (&rest) "DIRECT" #<bytecode -0x976cfd456815730>) :doc "DIRECT\n\n(fn &rest)" :int-spec nil :lap ((byte-constant "DIRECT" . 0) (byte-return . 0)) :ssa-status nil :frame-size 1 :vframe-size 0 :blocks #<hash-table eq 3/65 0x158ad8ad88f1> :lap-block #<hash-table equal 0/65 0x158ad8ad8911> :edges-h #<hash-table eql 0/65 0x158ad8e0343f> :block-cnt-gen #f(compiled-function () #<bytecode 0x1f53ba4c3e92>) :edge-cnt-gen #f(compiled-function () #<bytecode -0xfffe0ac45b3c16c>) :has-non-local nil :speed 2 :pure nil :type nil :args #s(comp-nargs :min 0 :nonrest 0 :rest t)))
  comp-limplify(nil)
  comp--native-compile("~/src/elisp/pacproxy.el" nil nil)
  native-compile("~/src/elisp/pacproxy.el")
  (progn (native-compile "~/src/elisp/pacproxy.el"))
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp(nil)
  funcall-interactively(eval-print-last-sexp nil)
  command-execute(eval-print-last-sexp)


I ran again after evaluating comp.el manually, and got the following
expanded backtrace:

Debugger entered--Lisp error: (cl-assertion-failed ((and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec))) nil))
  cl--assertion-failed((and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec))))
  (or (and (< idx (progn (or (progn (and (memq (type-of vec) cl-struct-comp-vec-tags) t)) (signal 'wrong-type-argument (list 'comp-vec vec))) (aref vec 3))) (>= idx (progn (or (progn (and (memq (type-of vec) cl-struct-comp-vec-tags) t)) (signal 'wrong-type-argument (list 'comp-vec vec))) (aref vec 2)))) (cl--assertion-failed '(and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec)))))
  (progn (or (and (< idx (progn (or (progn (and (memq (type-of vec) cl-struct-comp-vec-tags) t)) (signal 'wrong-type-argument (list 'comp-vec vec))) (aref vec 3))) (>= idx (progn (or (progn (and (memq (type-of vec) cl-struct-comp-vec-tags) t)) (signal 'wrong-type-argument (list 'comp-vec vec))) (aref vec 2)))) (cl--assertion-failed '(and (< idx (comp-vec-end vec)) (>= idx (comp-vec-beg vec))))) nil)
  comp-vec--verify-idx(#s(comp-vec :data #<hash-table eql 1/65 0x158ad87bcbdf> :beg 0 :end 1) 1)
  comp-vec-aref(#s(comp-vec :data #<hash-table eql 1/65 0x158ad87bcbdf> :beg 0 :end 1) 1)
  comp-slot-n(1)
  comp-slot()
  (list 'setimm (comp-slot) val)
  (comp-emit (list 'setimm (comp-slot) val))
  comp-emit-setimm("DIRECT")
  (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-setimm arg))
  (cond ((eq op 'TAG) (let nil nil (let* ((label-sp insn) (_TAG (if (cdr label-sp) (car-safe (prog1 label-sp (setq label-sp (cdr label-sp)))) (signal 'wrong-number-of-arguments (list '(_TAG label-num . label-sp) (length label-sp))))) (label-num (car-safe (prog1 label-sp (setq label-sp (cdr label-sp)))))) (progn (if label-sp (progn (progn (or (= (1- label-sp) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 3))) (cl--assertion-failed '(= (1- label-sp) (comp-limplify-sp comp-pass)))) nil))) (comp-emit-annotation (format "LAP TAG %d" label-num)))))) ((eq op 'byte-stack-ref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-copy-slot (- (comp-sp) arg 1)))) ((eq op 'byte-varref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call (comp-call 'symbol-value (make-comp-mvar :constant arg))))) ((eq op 'byte-varset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'set_internal (make-comp-mvar :constant arg) (comp-slot+1))))) ((eq op 'byte-varbind) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'specbind (make-comp-mvar :constant arg) (comp-slot+1))))) ((eq op 'byte-call) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))) (comp-emit-set-call (comp-callref 'funcall (1+ arg) (comp-sp))))) ((eq op 'byte-unbind) (let nil nil (comp-emit (comp-call 'helper_unbind_n (make-comp-mvar :constant arg))))) ((eq op 'byte-pophandler) (let nil nil (comp-emit '(pop-handler)))) ((eq op 'byte-pushconditioncase) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-handler (cdr (cdr insn)) 'condition-case))) ((eq op 'byte-pushcatch) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-handler (cdr (cdr insn)) 'catcher))) ((eq op 'byte-nth) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nth -1))) ((eq op 'byte-symbolp) (let nil nil (comp-emit-set-call-subr 'symbolp 0))) ((eq op 'byte-consp) (let nil nil (comp-emit-set-call-subr 'consp 0))) ((eq op 'byte-stringp) (let nil nil (comp-emit-set-call-subr 'stringp 0))) ((eq op 'byte-listp) (let nil nil (comp-emit-set-call-subr 'listp 0))) ((eq op 'byte-eq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'eq -1))) ((eq op 'byte-memq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'memq -1))) ((eq op 'byte-not) (let nil nil (comp-emit-set-call (comp-call 'eq (comp-slot-n (comp-sp)) (make-comp-mvar :constant nil))))) ((eq op 'byte-car) (let nil nil (comp-emit-set-call-subr 'car 0))) ((eq op 'byte-cdr) (let nil nil (comp-emit-set-call-subr 'cdr 0))) ((eq op 'byte-cons) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'cons -1))) ((eq op 'byte-list1) (let nil nil (comp-limplify-listn 1))) ((eq op 'byte-list2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-limplify-listn 2))) ((eq op 'byte-list3) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-limplify-listn 3))) ((eq op 'byte-list4) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -3)))) (comp-limplify-listn 4))) ((eq op 'byte-length) (let nil nil (comp-emit-set-call-subr 'length 0))) ((eq op 'byte-aref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'aref -1))) ((eq op 'byte-aset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'aset -2))) ((eq op 'byte-symbol-value) (let nil nil (comp-emit-set-call-subr 'symbol-value 0))) ((eq op 'byte-symbol-function) (let nil nil (comp-emit-set-call-subr 'symbol-function 0))) ((eq op 'byte-set) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'set -1))) ((eq op 'byte-fset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'fset -1))) ((eq op 'byte-get) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'get -1))) ((eq op 'byte-substring) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'substring -2))) ((eq op 'byte-concat2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call (comp-callref 'concat 2 (comp-sp))))) ((eq op 'byte-concat3) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call (comp-callref 'concat 3 (comp-sp))))) ((eq op 'byte-concat4) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -3)))) (comp-emit-set-call (comp-callref 'concat 4 (comp-sp))))) ((eq op 'byte-sub1) (let nil nil (comp-emit-set-call-subr '1- 0))) ((eq op 'byte-add1) (let nil nil (comp-emit-set-call-subr '1+ 0))) ((eq op 'byte-eqlsign) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '= -1))) ((eq op 'byte-gtr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '> -1))) ((eq op 'byte-lss) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '< -1))) ((eq op 'byte-leq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '<= -1))) ((eq op 'byte-geq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '>= -1))) ((eq op 'byte-diff) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '- -1))) ((eq op 'byte-negate) (let nil nil (comp-emit-set-call (comp-call 'negate (comp-slot))))) ((eq op 'byte-plus) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '+ -1))) ((eq op 'byte-max) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'max -1))) ((eq op 'byte-min) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'min -1))) ((eq op 'byte-mult) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '* -1))) ((eq op 'byte-point) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point 1))) ((eq op 'byte-goto-char) (let nil nil (comp-emit-set-call-subr 'goto-char 0))) ((eq op 'byte-insert) (let nil nil (comp-emit-set-call-subr 'insert 0))) ((eq op 'byte-point-max) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point-max 1))) ((eq op 'byte-point-min) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point-min 1))) ((eq op 'byte-char-after) (let nil nil (comp-emit-set-call-subr 'char-after 0))) ((eq op 'byte-following-char) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'following-char 1))) ((eq op 'byte-preceding-char) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'preceding-char 1))) ((eq op 'byte-current-column) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'current-column 1))) ((eq op 'byte-indent-to) (let nil nil (comp-emit-set-call (comp-call 'indent-to (comp-slot) (make-comp-mvar :constant nil))))) ((eq op 'byte-scan-buffer-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-scan-buffer-OBSOLETE")))) ((eq op 'byte-eolp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'eolp 1))) ((eq op 'byte-eobp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'eobp 1))) ((eq op 'byte-bolp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'bolp 1))) ((eq op 'byte-bobp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'bobp 1))) ((eq op 'byte-current-buffer) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'current-buffer 1))) ((eq op 'byte-set-buffer) (let nil nil (comp-emit-set-call-subr 'set-buffer 0))) ((eq op 'byte-save-current-buffer) (let nil nil (comp-emit (comp-call 'record_unwind_current_buffer)))) ((eq op 'byte-set-mark-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-set-mark-OBSOLETE")))) ((eq op 'byte-interactive-p-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-interactive-p-OBSOLETE")))) ((eq op 'byte-forward-char) (let nil nil (comp-emit-set-call-subr 'forward-char 0))) ((eq op 'byte-forward-word) (let nil nil (comp-emit-set-call-subr 'forward-word 0))) ((eq op 'byte-skip-chars-forward) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'skip-chars-forward -1))) ((eq op 'byte-skip-chars-backward) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'skip-chars-backward -1))) ((eq op 'byte-forward-line) (let nil nil (comp-emit-set-call-subr 'forward-line 0))) ((eq op 'byte-char-syntax) (let nil nil (comp-emit-set-call-subr 'char-syntax 0))) ((eq op 'byte-buffer-substring) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'buffer-substring -1))) ((eq op 'byte-delete-region) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'delete-region -1))) ((eq op 'byte-narrow-to-region) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call (comp-call 'narrow-to-region (comp-slot) (comp-slot+1))))) ((eq op 'byte-widen) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call (comp-call 'widen)))) ((eq op 'byte-end-of-line) (let nil nil (comp-emit-set-call-subr 'end-of-line 0))) ((eq op 'byte-constant2) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-constant2")))) ((eq op 'byte-goto) (let nil nil (comp-emit-uncond-jump (cdr (cdr insn))))) ((eq op 'byte-goto-if-nil) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 0 (cdr (cdr insn)) nil))) ((eq op 'byte-goto-if-not-nil) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 0 (cdr (cdr insn)) t))) ((eq op 'byte-goto-if-nil-else-pop) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 1 (cdr (cdr insn)) nil))) ((eq op 'byte-goto-if-not-nil-else-pop) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 1 (cdr (cdr insn)) t))) ((eq op 'byte-return) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (list 'return (comp-slot+1))))) ((eq op 'byte-discard) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) 'pass)) ((eq op 'byte-dup) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-copy-slot (1- (comp-sp))))) ((eq op 'byte-save-excursion) (let nil nil (comp-emit (comp-call 'record_unwind_protect_excursion)))) ((eq op 'byte-save-window-excursion-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-save-window-excursion-OBSOLETE")))) ((eq op 'byte-save-restriction) (let nil nil (comp-emit (comp-call 'helper_save_restriction)))) ((eq op 'byte-catch) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-catch")))) ((eq op 'byte-unwind-protect) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'helper_unwind_protect (comp-slot+1))))) ((eq op 'byte-condition-case) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-condition-case")))) ((eq op 'byte-temp-output-buffer-setup-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-temp-output-buffer-setup-OBSOLETE")))) ((eq op 'byte-temp-output-buffer-show-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-temp-output-buffer-show-OBSOLETE")))) ((eq op 'byte-unbind-all) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-unbind-all")))) ((eq op 'byte-set-marker) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'set-marker -2))) ((eq op 'byte-match-beginning) (let nil nil (comp-emit-set-call-subr 'match-beginning 0))) ((eq op 'byte-match-end) (let nil nil (comp-emit-set-call-subr 'match-end 0))) ((eq op 'byte-upcase) (let nil nil (comp-emit-set-call-subr 'upcase 0))) ((eq op 'byte-downcase) (let nil nil (comp-emit-set-call-subr 'downcase 0))) ((eq op 'byte-string=) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'string-equal -1))) ((eq op 'byte-string<) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'string-lessp -1))) ((eq op 'byte-equal) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'equal -1))) ((eq op 'byte-nthcdr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nthcdr -1))) ((eq op 'byte-elt) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'elt -1))) ((eq op 'byte-member) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'member -1))) ((eq op 'byte-assq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'assq -1))) ((eq op 'byte-nreverse) (let nil nil (comp-emit-set-call-subr 'nreverse 0))) ((eq op 'byte-setcar) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'setcar -1))) ((eq op 'byte-setcdr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'setcdr -1))) ((eq op 'byte-car-safe) (let nil nil (comp-emit-set-call-subr 'car-safe 0))) ((eq op 'byte-cdr-safe) (let nil nil (comp-emit-set-call-subr 'cdr-safe 0))) ((eq op 'byte-nconc) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nconc -1))) ((eq op 'byte-quo) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '/ -1))) ((eq op 'byte-rem) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '% -1))) ((eq op 'byte-numberp) (let nil nil (comp-emit-set-call-subr 'numberp 0))) ((eq op 'byte-integerp) (let nil nil (comp-emit-set-call-subr 'integerp 0))) ((eq op 'byte-listN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'list arg (comp-sp))))) ((eq op 'byte-concatN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'concat arg (comp-sp))))) ((eq op 'byte-insertN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'insert arg (comp-sp))))) ((eq op 'byte-stack-set) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-copy-slot (1+ (comp-sp)) (- (comp-sp) arg -1)))) ((eq op 'byte-stack-set2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (progn (or nil (cl--assertion-failed 'nil)) nil))) ((eq op 'byte-discardN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))))) ((eq op 'byte-switch) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-switch (comp-slot+1) (cl-first (progn (or (progn (and (memq (type-of (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2))) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2))))) (aref (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2)) 2)))))) ((eq op 'byte-constant) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-setimm arg))) ((eq op 'byte-discardN-preserve-tos) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))) (comp-copy-slot (+ arg (comp-sp))))) (t (let nil (signal 'native-ice (list "unexpected LAP op" (symbol-name op))))))
  (let ((op (car insn)) (arg (if (consp (cdr insn)) (car (cdr insn)) (cdr insn)))) (cond ((eq op 'TAG) (let nil nil (let* ((label-sp insn) (_TAG (if (cdr label-sp) (car-safe (prog1 label-sp (setq label-sp (cdr label-sp)))) (signal 'wrong-number-of-arguments (list '(_TAG label-num . label-sp) (length label-sp))))) (label-num (car-safe (prog1 label-sp (setq label-sp (cdr label-sp)))))) (progn (if label-sp (progn (progn (or (= (1- label-sp) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 3))) (cl--assertion-failed '(= (1- label-sp) (comp-limplify-sp comp-pass)))) nil))) (comp-emit-annotation (format "LAP TAG %d" label-num)))))) ((eq op 'byte-stack-ref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-copy-slot (- (comp-sp) arg 1)))) ((eq op 'byte-varref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call (comp-call 'symbol-value (make-comp-mvar :constant arg))))) ((eq op 'byte-varset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'set_internal (make-comp-mvar :constant arg) (comp-slot+1))))) ((eq op 'byte-varbind) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'specbind (make-comp-mvar :constant arg) (comp-slot+1))))) ((eq op 'byte-call) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))) (comp-emit-set-call (comp-callref 'funcall (1+ arg) (comp-sp))))) ((eq op 'byte-unbind) (let nil nil (comp-emit (comp-call 'helper_unbind_n (make-comp-mvar :constant arg))))) ((eq op 'byte-pophandler) (let nil nil (comp-emit '(pop-handler)))) ((eq op 'byte-pushconditioncase) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-handler (cdr (cdr insn)) 'condition-case))) ((eq op 'byte-pushcatch) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-handler (cdr (cdr insn)) 'catcher))) ((eq op 'byte-nth) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nth -1))) ((eq op 'byte-symbolp) (let nil nil (comp-emit-set-call-subr 'symbolp 0))) ((eq op 'byte-consp) (let nil nil (comp-emit-set-call-subr 'consp 0))) ((eq op 'byte-stringp) (let nil nil (comp-emit-set-call-subr 'stringp 0))) ((eq op 'byte-listp) (let nil nil (comp-emit-set-call-subr 'listp 0))) ((eq op 'byte-eq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'eq -1))) ((eq op 'byte-memq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'memq -1))) ((eq op 'byte-not) (let nil nil (comp-emit-set-call (comp-call 'eq (comp-slot-n (comp-sp)) (make-comp-mvar :constant nil))))) ((eq op 'byte-car) (let nil nil (comp-emit-set-call-subr 'car 0))) ((eq op 'byte-cdr) (let nil nil (comp-emit-set-call-subr 'cdr 0))) ((eq op 'byte-cons) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'cons -1))) ((eq op 'byte-list1) (let nil nil (comp-limplify-listn 1))) ((eq op 'byte-list2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-limplify-listn 2))) ((eq op 'byte-list3) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-limplify-listn 3))) ((eq op 'byte-list4) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -3)))) (comp-limplify-listn 4))) ((eq op 'byte-length) (let nil nil (comp-emit-set-call-subr 'length 0))) ((eq op 'byte-aref) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'aref -1))) ((eq op 'byte-aset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'aset -2))) ((eq op 'byte-symbol-value) (let nil nil (comp-emit-set-call-subr 'symbol-value 0))) ((eq op 'byte-symbol-function) (let nil nil (comp-emit-set-call-subr 'symbol-function 0))) ((eq op 'byte-set) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'set -1))) ((eq op 'byte-fset) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'fset -1))) ((eq op 'byte-get) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'get -1))) ((eq op 'byte-substring) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'substring -2))) ((eq op 'byte-concat2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call (comp-callref 'concat 2 (comp-sp))))) ((eq op 'byte-concat3) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call (comp-callref 'concat 3 (comp-sp))))) ((eq op 'byte-concat4) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -3)))) (comp-emit-set-call (comp-callref 'concat 4 (comp-sp))))) ((eq op 'byte-sub1) (let nil nil (comp-emit-set-call-subr '1- 0))) ((eq op 'byte-add1) (let nil nil (comp-emit-set-call-subr '1+ 0))) ((eq op 'byte-eqlsign) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '= -1))) ((eq op 'byte-gtr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '> -1))) ((eq op 'byte-lss) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '< -1))) ((eq op 'byte-leq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '<= -1))) ((eq op 'byte-geq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '>= -1))) ((eq op 'byte-diff) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '- -1))) ((eq op 'byte-negate) (let nil nil (comp-emit-set-call (comp-call 'negate (comp-slot))))) ((eq op 'byte-plus) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '+ -1))) ((eq op 'byte-max) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'max -1))) ((eq op 'byte-min) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'min -1))) ((eq op 'byte-mult) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '* -1))) ((eq op 'byte-point) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point 1))) ((eq op 'byte-goto-char) (let nil nil (comp-emit-set-call-subr 'goto-char 0))) ((eq op 'byte-insert) (let nil nil (comp-emit-set-call-subr 'insert 0))) ((eq op 'byte-point-max) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point-max 1))) ((eq op 'byte-point-min) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'point-min 1))) ((eq op 'byte-char-after) (let nil nil (comp-emit-set-call-subr 'char-after 0))) ((eq op 'byte-following-char) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'following-char 1))) ((eq op 'byte-preceding-char) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'preceding-char 1))) ((eq op 'byte-current-column) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'current-column 1))) ((eq op 'byte-indent-to) (let nil nil (comp-emit-set-call (comp-call 'indent-to (comp-slot) (make-comp-mvar :constant nil))))) ((eq op 'byte-scan-buffer-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-scan-buffer-OBSOLETE")))) ((eq op 'byte-eolp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'eolp 1))) ((eq op 'byte-eobp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'eobp 1))) ((eq op 'byte-bolp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'bolp 1))) ((eq op 'byte-bobp) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'bobp 1))) ((eq op 'byte-current-buffer) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call-subr 'current-buffer 1))) ((eq op 'byte-set-buffer) (let nil nil (comp-emit-set-call-subr 'set-buffer 0))) ((eq op 'byte-save-current-buffer) (let nil nil (comp-emit (comp-call 'record_unwind_current_buffer)))) ((eq op 'byte-set-mark-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-set-mark-OBSOLETE")))) ((eq op 'byte-interactive-p-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-interactive-p-OBSOLETE")))) ((eq op 'byte-forward-char) (let nil nil (comp-emit-set-call-subr 'forward-char 0))) ((eq op 'byte-forward-word) (let nil nil (comp-emit-set-call-subr 'forward-word 0))) ((eq op 'byte-skip-chars-forward) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'skip-chars-forward -1))) ((eq op 'byte-skip-chars-backward) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'skip-chars-backward -1))) ((eq op 'byte-forward-line) (let nil nil (comp-emit-set-call-subr 'forward-line 0))) ((eq op 'byte-char-syntax) (let nil nil (comp-emit-set-call-subr 'char-syntax 0))) ((eq op 'byte-buffer-substring) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'buffer-substring -1))) ((eq op 'byte-delete-region) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'delete-region -1))) ((eq op 'byte-narrow-to-region) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call (comp-call 'narrow-to-region (comp-slot) (comp-slot+1))))) ((eq op 'byte-widen) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-set-call (comp-call 'widen)))) ((eq op 'byte-end-of-line) (let nil nil (comp-emit-set-call-subr 'end-of-line 0))) ((eq op 'byte-constant2) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-constant2")))) ((eq op 'byte-goto) (let nil nil (comp-emit-uncond-jump (cdr (cdr insn))))) ((eq op 'byte-goto-if-nil) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 0 (cdr (cdr insn)) nil))) ((eq op 'byte-goto-if-not-nil) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 0 (cdr (cdr insn)) t))) ((eq op 'byte-goto-if-nil-else-pop) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 1 (cdr (cdr insn)) nil))) ((eq op 'byte-goto-if-not-nil-else-pop) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-cond-jump (comp-slot+1) (make-comp-mvar :constant nil) 1 (cdr (cdr insn)) t))) ((eq op 'byte-return) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (list 'return (comp-slot+1))))) ((eq op 'byte-discard) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) 'pass)) ((eq op 'byte-dup) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-copy-slot (1- (comp-sp))))) ((eq op 'byte-save-excursion) (let nil nil (comp-emit (comp-call 'record_unwind_protect_excursion)))) ((eq op 'byte-save-window-excursion-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-save-window-excursion-OBSOLETE")))) ((eq op 'byte-save-restriction) (let nil nil (comp-emit (comp-call 'helper_save_restriction)))) ((eq op 'byte-catch) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-catch")))) ((eq op 'byte-unwind-protect) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit (comp-call 'helper_unwind_protect (comp-slot+1))))) ((eq op 'byte-condition-case) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-condition-case")))) ((eq op 'byte-temp-output-buffer-setup-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-temp-output-buffer-setup-OBSOLETE")))) ((eq op 'byte-temp-output-buffer-show-OBSOLETE) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-temp-output-buffer-show-OBSOLETE")))) ((eq op 'byte-unbind-all) (let nil (signal 'native-ice (list "unsupported LAP op" '"byte-unbind-all")))) ((eq op 'byte-set-marker) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-set-call-subr 'set-marker -2))) ((eq op 'byte-match-beginning) (let nil nil (comp-emit-set-call-subr 'match-beginning 0))) ((eq op 'byte-match-end) (let nil nil (comp-emit-set-call-subr 'match-end 0))) ((eq op 'byte-upcase) (let nil nil (comp-emit-set-call-subr 'upcase 0))) ((eq op 'byte-downcase) (let nil nil (comp-emit-set-call-subr 'downcase 0))) ((eq op 'byte-string=) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'string-equal -1))) ((eq op 'byte-string<) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'string-lessp -1))) ((eq op 'byte-equal) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'equal -1))) ((eq op 'byte-nthcdr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nthcdr -1))) ((eq op 'byte-elt) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'elt -1))) ((eq op 'byte-member) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'member -1))) ((eq op 'byte-assq) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'assq -1))) ((eq op 'byte-nreverse) (let nil nil (comp-emit-set-call-subr 'nreverse 0))) ((eq op 'byte-setcar) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'setcar -1))) ((eq op 'byte-setcdr) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'setcdr -1))) ((eq op 'byte-car-safe) (let nil nil (comp-emit-set-call-subr 'car-safe 0))) ((eq op 'byte-cdr-safe) (let nil nil (comp-emit-set-call-subr 'cdr-safe 0))) ((eq op 'byte-nconc) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr 'nconc -1))) ((eq op 'byte-quo) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '/ -1))) ((eq op 'byte-rem) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-emit-set-call-subr '% -1))) ((eq op 'byte-numberp) (let nil nil (comp-emit-set-call-subr 'numberp 0))) ((eq op 'byte-integerp) (let nil nil (comp-emit-set-call-subr 'integerp 0))) ((eq op 'byte-listN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'list arg (comp-sp))))) ((eq op 'byte-concatN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'concat arg (comp-sp))))) ((eq op 'byte-insertN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- 1 arg))))) (comp-emit-set-call (comp-callref 'insert arg (comp-sp))))) ((eq op 'byte-stack-set) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (comp-copy-slot (1+ (comp-sp)) (- (comp-sp) arg -1)))) ((eq op 'byte-stack-set2) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -1)))) (progn (or nil (cl--assertion-failed 'nil)) nil))) ((eq op 'byte-discardN) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))))) ((eq op 'byte-switch) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) -2)))) (comp-emit-switch (comp-slot+1) (cl-first (progn (or (progn (and (memq (type-of (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2))) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2))))) (aref (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 2)) 2)))))) ((eq op 'byte-constant) (let nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit-setimm arg))) ((eq op 'byte-discardN-preserve-tos) (let nil nil (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) (- arg))))) (comp-copy-slot (+ arg (comp-sp))))) (t (let nil (signal 'native-ice (list "unexpected LAP op" (symbol-name op)))))))
  comp-limplify-lap-inst((byte-constant "DIRECT" . 0))
  (progn (setq inst (car inst-cell)) (setq next-inst (car-safe (cdr inst-cell))) (comp-limplify-lap-inst inst) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 4 (+ (aref v 4) 1)))) (if (comp-lap-fall-through-p inst) (progn (if (consp next-inst) (let* ((x740 (car-safe next-inst))) (if (eq x740 'TAG) (let* ((x741 (cdr-safe next-inst))) (if (consp x741) (let* ((x742 (car-safe x741)) (x743 (cdr-safe x741))) (let ((_label x742) (label-sp x743)) (if label-sp (progn (progn (or (= (1- label-sp) (comp-sp)) (cl--assertion-failed '(= (1- label-sp) (comp-sp)))) nil))) (let* ((stack-depth (if label-sp (1- label-sp) (comp-sp))) (next-bb (let ((cl-x (comp-bb-maybe-add (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) stack-depth))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block cl-x))) (aref cl-x 1))))) (if (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block bb))) (aref bb 3)) nil (comp-emit (list 'jump next-bb)))) (throw '--cl-block-nil-- nil)))))))))) (not (comp-lap-eob-p inst)))
  (and (consp inst-cell) (progn (setq inst (car inst-cell)) (setq next-inst (car-safe (cdr inst-cell))) (comp-limplify-lap-inst inst) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 4 (+ (aref v 4) 1)))) (if (comp-lap-fall-through-p inst) (progn (if (consp next-inst) (let* ((x740 (car-safe next-inst))) (if (eq x740 'TAG) (let* ((x741 (cdr-safe next-inst))) (if (consp x741) (let* ((x742 (car-safe x741)) (x743 (cdr-safe x741))) (let ((_label x742) (label-sp x743)) (if label-sp (progn (progn (or (= (1- label-sp) (comp-sp)) (cl--assertion-failed '(= (1- label-sp) (comp-sp)))) nil))) (let* ((stack-depth (if label-sp (1- label-sp) (comp-sp))) (next-bb (let ((cl-x (comp-bb-maybe-add (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) stack-depth))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block cl-x))) (aref cl-x 1))))) (if (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block bb))) (aref bb 3)) nil (comp-emit (list 'jump next-bb)))) (throw '--cl-block-nil-- nil)))))))))) (not (comp-lap-eob-p inst))))
  (while (and (consp inst-cell) (progn (setq inst (car inst-cell)) (setq next-inst (car-safe (cdr inst-cell))) (comp-limplify-lap-inst inst) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 4 (+ (aref v 4) 1)))) (if (comp-lap-fall-through-p inst) (progn (if (consp next-inst) (let* ((x740 (car-safe next-inst))) (if (eq x740 'TAG) (let* ((x741 (cdr-safe next-inst))) (if (consp x741) (let* ((x742 (car-safe x741)) (x743 (cdr-safe x741))) (let ((_label x742) (label-sp x743)) (if label-sp (progn (progn (or (= (1- label-sp) (comp-sp)) (cl--assertion-failed '(= (1- label-sp) (comp-sp)))) nil))) (let* ((stack-depth (if label-sp (1- label-sp) (comp-sp))) (next-bb (let ((cl-x (comp-bb-maybe-add (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) stack-depth))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block cl-x))) (aref cl-x 1))))) (if (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block bb))) (aref bb 3)) nil (comp-emit (list 'jump next-bb)))) (throw '--cl-block-nil-- nil)))))))))) (not (comp-lap-eob-p inst)))) (setq inst-cell (cdr inst-cell)) (setq --cl-var-- nil))
  (let* ((inst-cell (nthcdr (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) (progn (or (progn (and (memq (type-of comp-func) cl-struct-comp-func-tags) t)) (signal 'wrong-type-argument (list 'comp-func comp-func))) (aref comp-func 6)))) (inst nil) (next-inst nil) (--cl-var-- t)) (while (and (consp inst-cell) (progn (setq inst (car inst-cell)) (setq next-inst (car-safe (cdr inst-cell))) (comp-limplify-lap-inst inst) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 4 (+ (aref v 4) 1)))) (if (comp-lap-fall-through-p inst) (progn (if (consp next-inst) (let* ((x740 (car-safe next-inst))) (if (eq x740 'TAG) (let* ((x741 (cdr-safe next-inst))) (if (consp x741) (let* ((x742 (car-safe x741)) (x743 (cdr-safe x741))) (let ((_label x742) (label-sp x743)) (if label-sp (progn (progn (or (= (1- label-sp) (comp-sp)) (cl--assertion-failed '(= (1- label-sp) (comp-sp)))) nil))) (let* ((stack-depth (if label-sp (1- label-sp) (comp-sp))) (next-bb (let ((cl-x (comp-bb-maybe-add (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) stack-depth))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block cl-x))) (aref cl-x 1))))) (if (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block bb))) (aref bb 3)) nil (comp-emit (list 'jump next-bb)))) (throw '--cl-block-nil-- nil)))))))))) (not (comp-lap-eob-p inst)))) (setq inst-cell (cdr inst-cell)) (setq --cl-var-- nil)) nil)
  (catch '--cl-block-nil-- (let* ((inst-cell (nthcdr (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) (progn (or (progn (and (memq (type-of comp-func) cl-struct-comp-func-tags) t)) (signal 'wrong-type-argument (list 'comp-func comp-func))) (aref comp-func 6)))) (inst nil) (next-inst nil) (--cl-var-- t)) (while (and (consp inst-cell) (progn (setq inst (car inst-cell)) (setq next-inst (car-safe (cdr inst-cell))) (comp-limplify-lap-inst inst) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 4 (+ (aref v 4) 1)))) (if (comp-lap-fall-through-p inst) (progn (if (consp next-inst) (let* ((x740 (car-safe next-inst))) (if (eq x740 'TAG) (let* ((x741 (cdr-safe next-inst))) (if (consp x741) (let* ((x742 (car-safe x741)) (x743 (cdr-safe x741))) (let ((_label x742) (label-sp x743)) (if label-sp (progn (progn (or (= (1- label-sp) (comp-sp)) (cl--assertion-failed '(= (1- label-sp) (comp-sp)))) nil))) (let* ((stack-depth (if label-sp (1- label-sp) (comp-sp))) (next-bb (let ((cl-x (comp-bb-maybe-add (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (aref comp-pass 4)) stack-depth))) (progn (or (progn (and (memq (type-of cl-x) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block cl-x))) (aref cl-x 1))))) (if (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-tags) t)) (signal 'wrong-type-argument (list 'comp-block bb))) (aref bb 3)) nil (comp-emit (list 'jump next-bb)))) (throw '--cl-block-nil-- nil)))))))))) (not (comp-lap-eob-p inst)))) (setq inst-cell (cdr inst-cell)) (setq --cl-var-- nil)) nil))
  comp-limplify-block(#s(comp-block-lap :name bb_0 :insns nil :closed nil :in-edges nil :out-edges nil :idom nil :df #<hash-table eql 0/65 0x158ad84a5305> :post-num nil :final-frame nil :sp 0 :addr 0 :non-ret-insn nil :no-ret nil))
  (while (progn (setq next-bb (car-safe (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass) (x (aref v 6))) (prog1 x (aset v 6 (cdr x))))))) next-bb) (comp-limplify-block next-bb) (setq --cl-var-- nil))
  (let* ((next-bb nil) (--cl-var-- t)) (while (progn (setq next-bb (car-safe (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass) (x (aref v 6))) (prog1 x (aset v 6 (cdr x))))))) next-bb) (comp-limplify-block next-bb) (setq --cl-var-- nil)) nil)
  (let* ((frame-size (progn (or (progn (and (memq (type-of func) cl-struct-comp-func-tags) t)) (signal 'wrong-type-argument (list 'comp-func func))) (aref func 8))) (comp-func func) (comp-pass (make-comp-limplify :frame (comp-new-frame frame-size 0)))) (comp-fill-label-h) (comp-make-curr-block 'entry (comp-sp)) (comp-emit-annotation (concat "Lisp function: " (symbol-name (progn (or (progn (and (memq (type-of func) cl-struct-comp-func-tags) t)) (signal 'wrong-type-argument (list 'comp-func func))) (aref func 1))))) (if (progn (and (memq (type-of func) cl-struct-comp-func-l-tags) t)) (progn (let ((args (progn (or (progn (and (memq (type-of func) cl-struct-comp-func-l-tags) t)) (signal 'wrong-type-argument (list 'comp-func-l func))) (aref func 19)))) (if (progn (and (memq (type-of args) cl-struct-comp-args-tags) t)) (let* ((i 0) (--cl-var-- (progn (or (progn (and (memq (type-of args) cl-struct-comp-args-tags) t)) (signal 'wrong-type-argument (list 'comp-args args))) (aref args 2)))) (while (< i --cl-var--) (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass)) (aset v 3 (+ (comp-sp) 1)))) (comp-emit (list 'set-par-to-local (comp-slot) i)) (setq i (+ i 1))) nil) (comp-emit-narg-prologue (progn (or (progn (and (memq (type-of args) cl-struct-comp-args-base-tags) t)) (signal 'wrong-type-argument (list 'comp-args-base args))) (aref args 1)) (progn (or (progn (and (memq (type-of args) cl-struct-comp-nargs-tags) t)) (signal 'wrong-type-argument (list 'comp-nargs args))) (aref args 2)) (progn (or (progn (and (memq (type-of args) cl-struct-comp-nargs-tags) t)) (signal 'wrong-type-argument (list 'comp-nargs args))) (aref args 3))))))) (comp-emit '(jump bb_0)) (comp-bb-maybe-add 0 (comp-sp)) (let* ((next-bb nil) (--cl-var-- t)) (while (progn (setq next-bb (car-safe (progn (or (progn (and (memq (type-of comp-pass) cl-struct-comp-limplify-tags) t)) (signal 'wrong-type-argument (list 'comp-limplify comp-pass))) (let* ((v comp-pass) (x (aref v 6))) (prog1 x (aset v 6 (cdr x))))))) next-bb) (comp-limplify-block next-bb) (setq --cl-var-- nil)) nil) (let* ((addr-h (make-hash-table)) (addr nil) (--cl-var-- t)) (maphash #'(lambda (--cl-var-- bb) (setq addr (if (progn (and (memq (type-of bb) cl-struct-comp-block-lap-tags) t)) (progn (progn (or (progn (and (memq (type-of bb) cl-struct-comp-block-lap-tags) t)) (signal 'wrong-type-argument (list 'comp-block-lap bb))) (aref bb 11))))) (if addr (progn (progn (or (null (gethash addr addr-h)) (cl--assertion-failed '(null (gethash addr addr-h)))) nil) (puthash addr t addr-h))) (setq --cl-var-- nil)) (progn (or (progn (and (memq (type-of func) cl-struct-comp-func-tags) t)) (signal 'wrong-type-argument (list 'comp-func func))) (aref func 10))) nil) (comp-limplify-finalize-function func))
  comp-limplify-function(#s(comp-func-l :name nil :c-name "F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" :byte-func #f(compiled-function (&rest) "DIRECT" #<bytecode -0x976cfd456815730>) :doc "DIRECT\n\n(fn &rest)" :int-spec nil :lap ((byte-constant "DIRECT" . 0) (byte-return . 0)) :ssa-status nil :frame-size 1 :vframe-size 0 :blocks #<hash-table eq 3/65 0x158ad8ea2a3d> :lap-block #<hash-table equal 0/65 0x158ad8e035af> :edges-h #<hash-table eql 0/65 0x158ad8eebf5d> :block-cnt-gen (closure ((n . 0) cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) nil (setq n (1+ n))) :edge-cnt-gen (closure ((n . -1) cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) nil (setq n (1+ n))) :has-non-local nil :speed 2 :pure nil :type nil :args #s(comp-nargs :min 0 :nonrest 0 :rest t)))
  (closure ((_) cl-struct-comp-limplify-tags cl-struct-comp-mvar-tags cl-struct-comp-func-d-tags cl-struct-comp-func-l-tags cl-struct-comp-func-tags cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) (_ f) (comp-limplify-function f))("F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" #s(comp-func-l :name nil :c-name "F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_0" :byte-func #f(compiled-function (&rest) "DIRECT" #<bytecode -0x976cfd456815730>) :doc "DIRECT\n\n(fn &rest)" :int-spec nil :lap ((byte-constant "DIRECT" . 0) (byte-return . 0)) :ssa-status nil :frame-size 1 :vframe-size 0 :blocks #<hash-table eq 3/65 0x158ad8ea2a3d> :lap-block #<hash-table equal 0/65 0x158ad8e035af> :edges-h #<hash-table eql 0/65 0x158ad8eebf5d> :block-cnt-gen (closure ((n . 0) cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) nil (setq n (1+ n))) :edge-cnt-gen (closure ((n . -1) cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) nil (setq n (1+ n))) :has-non-local nil :speed 2 :pure nil :type nil :args #s(comp-nargs :min 0 :nonrest 0 :rest t)))
  maphash((closure ((_) cl-struct-comp-limplify-tags cl-struct-comp-mvar-tags cl-struct-comp-func-d-tags cl-struct-comp-func-l-tags cl-struct-comp-func-tags cl-struct-comp-edge-tags cl-struct-comp-block-cstr-tags cl-struct-comp-latch-tags cl-struct-comp-block-lap-tags cl-struct-comp-block-tags cl-struct-comp-nargs-tags cl-struct-comp-args-tags cl-struct-comp-args-base-tags cl-struct-comp-ctxt-tags cl-struct-comp-data-container-tags cl-struct-comp-vec-tags t) (_ f) (comp-limplify-function f)) #<hash-table equal 7/65 0x158ad8e77251>)
  comp-limplify(nil)
  funcall(comp-limplify nil)
  (setq data (funcall pass data))
  (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil))
  (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil))
  (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe (prog1 time (setq time (cdr time))))) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil)
  (condition-case err (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe (prog1 time (setq time (cdr time))))) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil) (native-compiler-skip) (t (let ((err-val (cdr err))) (if (and comp-async-compilation (not (eq (car err) 'native-compiler-error))) (progn (message (if err-val "%s: Error: %s %s" "%s: Error %s") function-or-file (get (car err) 'error-message) (car-safe err-val)) (kill-emacs -1)) (signal (car err) (if (consp err-val) (cons function-or-file err-val) (list function-or-file err-val)))))))
  (let* ((data function-or-file) (comp-native-compiling t) (byte-native-qualities nil) (byte-compile-debug t) (comp-ctxt (make-comp-ctxt :output output :with-late-load with-late-load))) (comp-log "\n\f\n" 1) (condition-case err (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe (prog1 time (setq time (cdr time))))) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil) (native-compiler-skip) (t (let ((err-val (cdr err))) (if (and comp-async-compilation (not (eq (car err) 'native-compiler-error))) (progn (message (if err-val "%s: Error: %s %s" "%s: Error %s") function-or-file (get (car err) 'error-message) (car-safe err-val)) (kill-emacs -1)) (signal (car err) (if (consp err-val) (cons function-or-file err-val) (list function-or-file err-val))))))) (if (stringp function-or-file) data (native-elisp-load data)))
  (catch 'no-native-compile (let* ((data function-or-file) (comp-native-compiling t) (byte-native-qualities nil) (byte-compile-debug t) (comp-ctxt (make-comp-ctxt :output output :with-late-load with-late-load))) (comp-log "\n\f\n" 1) (condition-case err (let* ((report nil) (t0 nil) (--cl-var-- comp-passes) (pass nil) (--cl-var-- t)) (while (progn (setq t0 (current-time)) (consp --cl-var--)) (setq pass (car --cl-var--)) (if (memq pass comp-disabled-passes) (progn) (comp-log (format "(%s) Running pass %s:\n" function-or-file pass) 2) (setq data (funcall pass data)) (setq report (cons (cons pass (float-time (time-since t0))) report)) (let* ((--cl-var-- (alist-get pass comp-post-pass-hooks)) (f nil)) (while (consp --cl-var--) (setq f (car --cl-var--)) (funcall f data) (setq --cl-var-- (cdr --cl-var--))) nil)) (setq --cl-var-- (cdr --cl-var--)) (setq --cl-var-- nil)) (if comp-log-time-report (progn (comp-log (format "Done compiling %s" data) 0) (let* ((--cl-var-- (reverse report)) (time nil) (pass nil)) (while (consp --cl-var--) (setq time (car --cl-var--) pass (car-safe (prog1 time (setq time (cdr time))))) (comp-log (format "Pass %s took: %fs." pass time) 0) (setq --cl-var-- (cdr --cl-var--))) nil))) nil) (native-compiler-skip) (t (let ((err-val (cdr err))) (if (and comp-async-compilation (not (eq (car err) 'native-compiler-error))) (progn (message (if err-val "%s: Error: %s %s" "%s: Error %s") function-or-file (get (car err) 'error-message) (car-safe err-val)) (kill-emacs -1)) (signal (car err) (if (consp err-val) (cons function-or-file err-val) (list function-or-file err-val))))))) (if (stringp function-or-file) data (native-elisp-load data))))
  comp--native-compile("~/src/elisp/pacproxy.el" nil nil)
  native-compile("~/src/elisp/pacproxy.el")
  (progn (native-compile "~/src/elisp/pacproxy.el"))
  elisp--eval-last-sexp(t)
  eval-last-sexp(t)
  eval-print-last-sexp(nil)
  funcall-interactively(eval-print-last-sexp nil)
  command-execute(eval-print-last-sexp)



-- 
Michael Welsh Duggan
(md5i <at> md5i.com)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Sun, 05 Sep 2021 15:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Michael Welsh Duggan <mwd <at> md5i.com>
To: 50268 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Sun, 05 Sep 2021 11:31:10 -0400
I was able to determine that there was a bug in the pacproxy.el code
that I included in the bug report.  Fixing that bug caused native
compilation to work.  The assertion and backtrace were not particularly
useful in determining the bug in the code, though.  The bug was in the
`pacproxy--retrieve-wpad' function when I let-bound the following
illegal lambda:

  (lambda (&rest) "DIRECT")

The fix was to change this to:

  (lambda (&rest _) "DIRECT")

Is there another part of the compiler that could have caught this and
returned a useful diagnostic?

-- 
Michael Welsh Duggan
(md5i <at> md5i.com)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Mon, 20 Sep 2021 22:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Michael Welsh Duggan <mwd <at> md5i.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Mon, 20 Sep 2021 22:12:32 +0000
Michael Welsh Duggan <mwd <at> md5i.com> writes:

> I was able to determine that there was a bug in the pacproxy.el code
> that I included in the bug report.  Fixing that bug caused native
> compilation to work.  The assertion and backtrace were not particularly
> useful in determining the bug in the code, though.  The bug was in the
> `pacproxy--retrieve-wpad' function when I let-bound the following
> illegal lambda:
>
>   (lambda (&rest) "DIRECT")
>
> The fix was to change this to:
>
>   (lambda (&rest _) "DIRECT")
>
> Is there another part of the compiler that could have caught this and
> returned a useful diagnostic?

Hi Michael & all,

I had a quick look and these are my findings:

(byte-compile '(lambda (&rest _) "DIRECT"))
=>
#[128 "\300\207" ["DIRECT"] 2 "DIRECT

(fn &rest _)"]

Here we have as encoded signature 128 (one rest arg) and the frame size
is 2 (one for the rest arg and one for the immediate). Fine...

(byte-compile '(lambda () "DIRECT"))
=>
#[0 "\300\207" ["DIRECT"] 1 "DIRECT"] 

Here we have as encoded signature 0 (no args) and the frame size is 1
(will be used by the immediate).  Fine as well.

(byte-compile '(lambda (&rest) "DIRECT"))
=>
#[128 "\300\207" ["DIRECT"] 1 "DIRECT

(fn &rest)"]

This is the problematic case that was signaled as reproducer.  Here we
have as encoded signature 128 (one rest arg) but the frame size (1) is
not accounting for this.

I think this output is a incoherent and I guess the byte compiler should
probably just raise an error and refuse to compile if the lambda list is
invalid.  Am I wrong?

Regards

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 07:51:02 GMT) Full text and rfc822 format available.

Message #17 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: Michael Welsh Duggan <mwd <at> md5i.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 07:50:35 +0000
Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs <at> gnu.org> writes:

> Michael Welsh Duggan <mwd <at> md5i.com> writes:
>
>> I was able to determine that there was a bug in the pacproxy.el code
>> that I included in the bug report.  Fixing that bug caused native
>> compilation to work.  The assertion and backtrace were not particularly
>> useful in determining the bug in the code, though.  The bug was in the
>> `pacproxy--retrieve-wpad' function when I let-bound the following
>> illegal lambda:
>>
>>   (lambda (&rest) "DIRECT")
>>
>> The fix was to change this to:
>>
>>   (lambda (&rest _) "DIRECT")
>>
>> Is there another part of the compiler that could have caught this and
>> returned a useful diagnostic?
>
> Hi Michael & all,
>
> I had a quick look and these are my findings:
>
> (byte-compile '(lambda (&rest _) "DIRECT"))
> =>
> #[128 "\300\207" ["DIRECT"] 2 "DIRECT
>
> (fn &rest _)"]
>
> Here we have as encoded signature 128 (one rest arg) and the frame size
> is 2 (one for the rest arg and one for the immediate). Fine...
>
> (byte-compile '(lambda () "DIRECT"))
> =>
> #[0 "\300\207" ["DIRECT"] 1 "DIRECT"] 
>
> Here we have as encoded signature 0 (no args) and the frame size is 1
> (will be used by the immediate).  Fine as well.
>
> (byte-compile '(lambda (&rest) "DIRECT"))
> =>
> #[128 "\300\207" ["DIRECT"] 1 "DIRECT
>
> (fn &rest)"]
>
> This is the problematic case that was signaled as reproducer.  Here we
> have as encoded signature 128 (one rest arg) but the frame size (1) is
> not accounting for this.
>
> I think this output is a incoherent and I guess the byte compiler should
> probably just raise an error and refuse to compile if the lambda list is
> invalid.  Am I wrong?

I can't verify in this moment but I guess is very possible we even
overflow in the byte interpreter when executing the mentioned bytecode.

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 07:56:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 12:18:02 GMT) Full text and rfc822 format available.

Message #23 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: 50268 <at> debbugs.gnu.org
Cc: mwd <at> md5i.com, Mattias Engdegård <mattiase <at> acm.org>,
 monnier <at> iro.umontreal.ca, Andrea Corallo <akrl <at> sdf.org>
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 13:17:18 +0100
Andrea Corallo [2021-09-21 07:50 +0000] wrote:

> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
>
>> Michael Welsh Duggan <mwd <at> md5i.com> writes:
>>
>>> I was able to determine that there was a bug in the pacproxy.el code
>>> that I included in the bug report.  Fixing that bug caused native
>>> compilation to work.  The assertion and backtrace were not particularly
>>> useful in determining the bug in the code, though.  The bug was in the
>>> `pacproxy--retrieve-wpad' function when I let-bound the following
>>> illegal lambda:
>>>
>>>   (lambda (&rest) "DIRECT")
>>>
>>> The fix was to change this to:
>>>
>>>   (lambda (&rest _) "DIRECT")
>>>
>>> Is there another part of the compiler that could have caught this and
>>> returned a useful diagnostic?
>>
>> Hi Michael & all,
>>
>> I had a quick look and these are my findings:
>>
>> (byte-compile '(lambda (&rest _) "DIRECT"))
>> =>
>> #[128 "\300\207" ["DIRECT"] 2 "DIRECT
>>
>> (fn &rest _)"]
>>
>> Here we have as encoded signature 128 (one rest arg) and the frame size
>> is 2 (one for the rest arg and one for the immediate). Fine...
>>
>> (byte-compile '(lambda () "DIRECT"))
>> =>
>> #[0 "\300\207" ["DIRECT"] 1 "DIRECT"] 
>>
>> Here we have as encoded signature 0 (no args) and the frame size is 1
>> (will be used by the immediate).  Fine as well.
>>
>> (byte-compile '(lambda (&rest) "DIRECT"))
>> =>
>> #[128 "\300\207" ["DIRECT"] 1 "DIRECT
>>
>> (fn &rest)"]
>>
>> This is the problematic case that was signaled as reproducer.  Here we
>> have as encoded signature 128 (one rest arg) but the frame size (1) is
>> not accounting for this.
>>
>> I think this output is a incoherent and I guess the byte compiler should
>> probably just raise an error and refuse to compile if the lambda list is
>> invalid.  Am I wrong?
>
> I can't verify in this moment but I guess is very possible we even
> overflow in the byte interpreter when executing the mentioned bytecode.

In the meantime I think Mattias ran into the same problem in the
following threads:

https://lists.gnu.org/r/emacs-devel/2021-09/msg01492.html
https://bugs.gnu.org/50720

Thanks,

-- 
Basil




Merged 50268 50720. Request was from Andrea Corallo <akrl <at> sdf.org> to control <at> debbugs.gnu.org. (Tue, 21 Sep 2021 15:55:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 15:57:01 GMT) Full text and rfc822 format available.

Message #28 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Andrea Corallo <akrl <at> sdf.org>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: mwd <at> md5i.com,
 Mattias Engdegård <mattiase <at> acm.org>,
 monnier <at> iro.umontreal.ca, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 15:56:30 +0000
"Basil L. Contovounesios" <contovob <at> tcd.ie> writes:

> Andrea Corallo [2021-09-21 07:50 +0000] wrote:
>
[...]
>> I can't verify in this moment but I guess is very possible we even
>> overflow in the byte interpreter when executing the mentioned bytecode.
>
> In the meantime I think Mattias ran into the same problem in the
> following threads:
>
> https://lists.gnu.org/r/emacs-devel/2021-09/msg01492.html
> https://bugs.gnu.org/50720
>
> Thanks,


Hi Basil,

thanks, if I've done it correctly this and 50720 should be merged now.

Regards

  Andrea




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 16:12:01 GMT) Full text and rfc822 format available.

Message #31 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 50720 <at> debbugs.gnu.org, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 18:11:34 +0200
Mattias Engdegård <mattiase <at> acm.org> writes:

> Now, either we fix this bug or we stop pretending that unnamed &rest
> arguments work at all and signal an error, because it's clear from the
> above that they can't have seen much use.

I did a quick grep through core and GNU ELPA, and I couldn't find any
instances of it being used, so I'd be fine with either solution (i.e.,
either fixing the bug or signalling an error).

Perhaps Eli has an opinion (added to the CCs).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 16:23:02 GMT) Full text and rfc822 format available.

Message #34 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 50720 <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.com>, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 18:22:11 +0200
21 sep. 2021 kl. 18.11 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:

> I did a quick grep through core and GNU ELPA, and I couldn't find any
> instances of it being used, so I'd be fine with either solution (i.e.,
> either fixing the bug or signalling an error).

I know how to fix it but there's no really elegant way of doing it, and unless a convincing case can be made for permitting anonymous &rest, I'd favour disallowing it.

Unless I'm mistaken it was Noam who added it (1d47d777ef24c0be9153b0a1c8ba21918fa1025a), so let's ask him.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 16:27:02 GMT) Full text and rfc822 format available.

Message #37 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: mattiase <at> acm.org, 50720 <at> debbugs.gnu.org, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 19:26:19 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: 50720 <at> debbugs.gnu.org,  50268 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> Date: Tue, 21 Sep 2021 18:11:34 +0200
> 
> Mattias Engdegård <mattiase <at> acm.org> writes:
> 
> > Now, either we fix this bug or we stop pretending that unnamed &rest
> > arguments work at all and signal an error, because it's clear from the
> > above that they can't have seen much use.
> 
> I did a quick grep through core and GNU ELPA, and I couldn't find any
> instances of it being used, so I'd be fine with either solution (i.e.,
> either fixing the bug or signalling an error).
> 
> Perhaps Eli has an opinion (added to the CCs).

I think I'd like to at least see the prototype of the fix to have an
opinion.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 17:10:02 GMT) Full text and rfc822 format available.

Message #40 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Eli Zaretskii <eliz <at> gnu.org>,
 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 13:09:24 -0400
Mattias Engdegård <mattiase <at> acm.org> writes:

> 21 sep. 2021 kl. 18.11 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:
>
>> I did a quick grep through core and GNU ELPA, and I couldn't find any
>> instances of it being used, so I'd be fine with either solution (i.e.,
>> either fixing the bug or signalling an error).
>
> I know how to fix it but there's no really elegant way of doing it,
> and unless a convincing case can be made for permitting anonymous
> &rest, I'd favour disallowing it.
>
> Unless I'm mistaken it was Noam who added it
> (1d47d777ef24c0be9153b0a1c8ba21918fa1025a), so let's ask him.

It's been a while, but looking at Bug#29165, the reason I added it is
that it was supported in Emacs 25 and earlier.  Stefan M had some
justifications there for &optional without variables, but I think they
don't apply for &rest.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 17:55:02 GMT) Full text and rfc822 format available.

Message #43 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: mattiase <at> acm.org, larsi <at> gnus.org, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 20:53:47 +0300
> From: Noam Postavsky <npostavs <at> gmail.com>
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,  Eli Zaretskii <eliz <at> gnu.org>,  50268 <at> debbugs.gnu.org
> Date: Tue, 21 Sep 2021 13:09:24 -0400
> 
> Mattias Engdegård <mattiase <at> acm.org> writes:
> 
> > 21 sep. 2021 kl. 18.11 skrev Lars Ingebrigtsen <larsi <at> gnus.org>:
> >
> >> I did a quick grep through core and GNU ELPA, and I couldn't find any
> >> instances of it being used, so I'd be fine with either solution (i.e.,
> >> either fixing the bug or signalling an error).
> >
> > I know how to fix it but there's no really elegant way of doing it,
> > and unless a convincing case can be made for permitting anonymous
> > &rest, I'd favour disallowing it.
> >
> > Unless I'm mistaken it was Noam who added it
> > (1d47d777ef24c0be9153b0a1c8ba21918fa1025a), so let's ask him.
> 
> It's been a while, but looking at Bug#29165, the reason I added it is
> that it was supported in Emacs 25 and earlier.  Stefan M had some
> justifications there for &optional without variables, but I think they
> don't apply for &rest.

Stefan, can you please chime in?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Tue, 21 Sep 2021 19:34:02 GMT) Full text and rfc822 format available.

Message #46 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mattiase <at> acm.org, larsi <at> gnus.org, Noam Postavsky <npostavs <at> gmail.com>,
 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Tue, 21 Sep 2021 15:32:32 -0400
>> It's been a while, but looking at Bug#29165, the reason I added it is
>> that it was supported in Emacs 25 and earlier.  Stefan M had some
>> justifications there for &optional without variables, but I think they
>> don't apply for &rest.
> Stefan, can you please chime in?

With my type-systems-guy hat on, I'd say we want to detect those `&rest`
without a following variable and shame the author of the code.

But at the same time we could think of `&rest` as something similar to
`&optional` and decide that it can be handy for generated code to be
able to generate (x y &optional z &rest).

The main difference I see is that

    `(x y &optional ,@args)

makes a lot of sense and will naturally occasionally lead to `&optional`
not followed by anything, whereas `&rest` only expects 1 following
identifier so it seems much less likely that the code will sometimes put
0 vars in there.  After all, we do signal an error if there's more than
1 var after `&rest`, so I think it makes sense to follow my
types-systems-guy heart here.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Wed, 22 Sep 2021 05:44:01 GMT) Full text and rfc822 format available.

Message #49 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: mattiase <at> acm.org, larsi <at> gnus.org, npostavs <at> gmail.com, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Wed, 22 Sep 2021 08:43:05 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: Noam Postavsky <npostavs <at> gmail.com>,  mattiase <at> acm.org,  larsi <at> gnus.org,
>   50268 <at> debbugs.gnu.org
> Date: Tue, 21 Sep 2021 15:32:32 -0400
> 
> With my type-systems-guy hat on, I'd say we want to detect those `&rest`
> without a following variable and shame the author of the code.
> 
> But at the same time we could think of `&rest` as something similar to
> `&optional` and decide that it can be handy for generated code to be
> able to generate (x y &optional z &rest).
> 
> The main difference I see is that
> 
>     `(x y &optional ,@args)
> 
> makes a lot of sense and will naturally occasionally lead to `&optional`
> not followed by anything, whereas `&rest` only expects 1 following
> identifier so it seems much less likely that the code will sometimes put
> 0 vars in there.  After all, we do signal an error if there's more than
> 1 var after `&rest`, so I think it makes sense to follow my
> types-systems-guy heart here.

Which basically means we should revert Noam's commit of yore, is that
right?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Thu, 23 Sep 2021 01:47:01 GMT) Full text and rfc822 format available.

Message #52 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mattiase <at> acm.org, larsi <at> gnus.org, npostavs <at> gmail.com, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Wed, 22 Sep 2021 21:46:24 -0400
> Which basically means we should revert Noam's commit of yore, is that
> right?

Not all of it, no.  Only the part which makes (&rest) acceptable.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Thu, 23 Sep 2021 06:39:01 GMT) Full text and rfc822 format available.

Message #55 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: mattiase <at> acm.org, larsi <at> gnus.org, npostavs <at> gmail.com, 50268 <at> debbugs.gnu.org
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Thu, 23 Sep 2021 09:38:27 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Cc: mattiase <at> acm.org,  larsi <at> gnus.org,  npostavs <at> gmail.com,
>   50268 <at> debbugs.gnu.org
> Date: Wed, 22 Sep 2021 21:46:24 -0400
> 
> > Which basically means we should revert Noam's commit of yore, is that
> > right?
> 
> Not all of it, no.  Only the part which makes (&rest) acceptable.

That's what I meant, sorry for not being clear enough.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Thu, 23 Sep 2021 11:10:01 GMT) Full text and rfc822 format available.

Message #58 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>,
 50268 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Thu, 23 Sep 2021 13:09:02 +0200
[Message part 1 (text/plain, inline)]
23 sep. 2021 kl. 03.46 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

> Not all of it, no.  Only the part which makes (&rest) acceptable.

Patch.

[0001-Renege-on-anonymous-rest-bug-50268-bug-50720.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Thu, 23 Sep 2021 21:04:01 GMT) Full text and rfc822 format available.

Message #61 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 50268 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Thu, 23 Sep 2021 23:03:04 +0200
Mattias Engdegård <mattiase <at> acm.org> writes:

> Allowing &rest without a variable name following turned out not to be
> very useful, and it never worked properly.  Disallow it.

Makes sense to me.  Since it's that non-invasive, I think it'd be fine
to push to Emacs 28.  Perhaps Eli has a different opinion, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Fri, 24 Sep 2021 06:08:02 GMT) Full text and rfc822 format available.

Message #64 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: mattiase <at> acm.org, monnier <at> iro.umontreal.ca, 50268 <at> debbugs.gnu.org,
 npostavs <at> gmail.com
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Fri, 24 Sep 2021 09:07:02 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,  Eli Zaretskii
>  <eliz <at> gnu.org>,  Noam Postavsky <npostavs <at> gmail.com>,
>   50268 <at> debbugs.gnu.org
> Date: Thu, 23 Sep 2021 23:03:04 +0200
> 
> Mattias Engdegård <mattiase <at> acm.org> writes:
> 
> > Allowing &rest without a variable name following turned out not to be
> > very useful, and it never worked properly.  Disallow it.
> 
> Makes sense to me.  Since it's that non-invasive, I think it'd be fine
> to push to Emacs 28.  Perhaps Eli has a different opinion, though.

Let's do it now.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50268; Package emacs. (Sat, 25 Sep 2021 00:52:02 GMT) Full text and rfc822 format available.

Message #67 received at 50268 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mattiase <at> acm.org, monnier <at> iro.umontreal.ca, 50268 <at> debbugs.gnu.org,
 npostavs <at> gmail.com
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Sat, 25 Sep 2021 02:51:13 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> Makes sense to me.  Since it's that non-invasive, I think it'd be fine
>> to push to Emacs 28.  Perhaps Eli has a different opinion, though.
>
> Let's do it now.

OK, Mattias, go ahead and push.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Sat, 25 Sep 2021 18:38:02 GMT) Full text and rfc822 format available.

Notification sent to Michael Welsh Duggan <md5i <at> md5i.com>:
bug acknowledged by developer. (Sat, 25 Sep 2021 18:38:02 GMT) Full text and rfc822 format available.

Message #72 received at 50268-done <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 50268-done <at> debbugs.gnu.org,
 Noam Postavsky <npostavs <at> gmail.com>
Subject: Re: bug#50268: 28.0.50; Assertion warning during native compilation
Date: Sat, 25 Sep 2021 20:37:11 +0200
24 sep. 2021 kl. 08.07 skrev Eli Zaretskii <eliz <at> gnu.org>:

> Let's do it now.

Thank you, pushed to master. Closing.





Reply sent to Mattias Engdegård <mattiase <at> acm.org>:
You have taken responsibility. (Sat, 25 Sep 2021 18:38:02 GMT) Full text and rfc822 format available.

Notification sent to Mattias Engdegård <mattiase <at> acm.org>:
bug acknowledged by developer. (Sat, 25 Sep 2021 18:38:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 24 Oct 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.