all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#62537: Error compiling emacs master with native compilation activated
@ 2023-03-30  7:18 Pedro Andres Aranda Gutierrez
  2023-03-30  8:50 ` Eli Zaretskii
  2023-03-30  9:28 ` Andrea Corallo
  0 siblings, 2 replies; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-03-30  7:18 UTC (permalink / raw)
  To: 62537

HI
there seems to be a problem when compiling the org-mode files with
native compilation activated

```
  ELC+ELN  org/org-plot.elc

Error: native-ice ("org/org-plot.el" "block does not end with a
branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
#s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
#s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
2) #s(comp-mvar (t) nil nil nil nil 3))) (call
record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
#s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
#s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
nil nil nil nil 3))) (call helper_unbind_n #s(comp-mvar nil nil ((1 .
1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 4)
plist-get) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t)
nil nil nil nil 0)) (setimm #s(comp-mvar (t) nil nil nil nil 6)
:transpose) (set #s(comp-mvar (t) nil nil nil nil 4) (callref funcall
#s(comp-mvar (t) nil nil nil nil 4) #s(comp-mvar (t) nil nil nil nil
5) #s(comp-mvar (t) nil nil nil nil 6))) (set #s(comp-mvar (t) nil nil
nil nil 5) #s(comp-mvar (t) nil nil nil nil 4)) (setimm #s(comp-mvar
(t) nil nil nil nil 6) #s(hash-table size 3 test eq rehash-size 1.5
rehash-threshold 0.8125 purecopy t data (y 105 yes 105 t 105)))) nil
nil nil nil #s(hash-table size 65 test eql rehash-size 1.5
rehash-threshold 0.8125 data ()) nil nil 1 72 nil nil)
org-plot/gnuplot)
  mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode
0x285567f77ae87d2>))
  debug-early-backtrace()
  debug-early(error (native-ice "org/org-plot.el" "block does not end
with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG
83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil
:range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range
nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset
(t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 3))) (call record_unwind_protect_excursion) (setimm
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t)
:valset nil :range nil :neg nil :id nil :slot 3) (callref funcall
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
:neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref
funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset
nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)
plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg
nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil
:neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset
nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref
funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
:id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg
nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil
:range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset
nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 6)
#<hash-table eq 3/3 0x155ea01696a7>)) :closed nil :in-edges nil
:out-edges nil :idom nil :df #<hash-table eql 0/65 0x155ea02c4401>
:post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil
:no-ret nil) org-plot/gnuplot))
  signal(native-ice ("org/org-plot.el" "block does not end with a
branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83")
(call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1
. 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t)
:valset nil :range nil :neg nil :id nil :slot 2) make-temp-file)
(setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil
:range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)
org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset
nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)))
(setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset
nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call
helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1))
:neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset
nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar
:typeset (t) :valset nil :range nil :neg nil :id nil :slot 5)
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
:neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t)
:valset nil :range nil :neg nil :id nil :slot 4) (callref funcall
#s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
:slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
:id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range
nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil
:range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset
(t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq
3/3 0x155ea01696a7>)) :closed nil :in-edges nil :out-edges nil :idom
nil :df #<hash-table eql 0/65 0x155ea02c4401> :post-num nil
:final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil)
org-plot/gnuplot))
  comp--native-compile("org/org-plot.el")
  batch-native-compile()
  batch-byte+native-compile()
  command-line-1(("--eval" "(setq load-prefer-newer t
byte-compile-warnings 'all)" "-l" "comp" "-f"
"batch-byte+native-compile" "org/org-plot.el"))
  command-line()
  normal-top-level()
Internal native compiler error: "org/org-plot.el", "block does not end
with a branch", #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
#s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
#s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
2) #s(comp-mvar (t) nil nil nil nil 3))) (call
record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
#s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
#s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
nil nil nil nil 3))) ...) nil nil nil nil #s(hash-table size 65 test
eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil ...),
#<symbol org-plot/gnuplot at 23521>
make[5]: *** [Makefile:327: org/org-plot.elc] Error 255
```

-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should
run a leader-deposed hook here, but we can't yet





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30  7:18 bug#62537: Error compiling emacs master with native compilation activated Pedro Andres Aranda Gutierrez
@ 2023-03-30  8:50 ` Eli Zaretskii
  2023-03-30  9:28 ` Andrea Corallo
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2023-03-30  8:50 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: 62537

merge 62537 62481
thanks

> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
> Date: Thu, 30 Mar 2023 09:18:39 +0200
> 
> HI
> there seems to be a problem when compiling the org-mode files with
> native compilation activated
> 
> ```
>   ELC+ELN  org/org-plot.elc
> 
> Error: native-ice ("org/org-plot.el" "block does not end with a
> branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> 2) #s(comp-mvar (t) nil nil nil nil 3))) (call

This is a duplicate of bug#62481.  We expect this to be solved when
emacs-29 branch is next merged to master.





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30  7:18 bug#62537: Error compiling emacs master with native compilation activated Pedro Andres Aranda Gutierrez
  2023-03-30  8:50 ` Eli Zaretskii
@ 2023-03-30  9:28 ` Andrea Corallo
  2023-03-30  9:59   ` Pedro Andres Aranda Gutierrez
  2023-03-30 10:37   ` Mattias Engdegård
  1 sibling, 2 replies; 13+ messages in thread
From: Andrea Corallo @ 2023-03-30  9:28 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Mattias Engdegård, 62537

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> HI
> there seems to be a problem when compiling the org-mode files with
> native compilation activated
>
> ```
>   ELC+ELN  org/org-plot.elc
>
> Error: native-ice ("org/org-plot.el" "block does not end with a
> branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> nil nil nil nil 3))) (call helper_unbind_n #s(comp-mvar nil nil ((1 .
> 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 4)
> plist-get) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t)
> nil nil nil nil 0)) (setimm #s(comp-mvar (t) nil nil nil nil 6)
> :transpose) (set #s(comp-mvar (t) nil nil nil nil 4) (callref funcall
> #s(comp-mvar (t) nil nil nil nil 4) #s(comp-mvar (t) nil nil nil nil
> 5) #s(comp-mvar (t) nil nil nil nil 6))) (set #s(comp-mvar (t) nil nil
> nil nil 5) #s(comp-mvar (t) nil nil nil nil 4)) (setimm #s(comp-mvar
> (t) nil nil nil nil 6) #s(hash-table size 3 test eq rehash-size 1.5
> rehash-threshold 0.8125 purecopy t data (y 105 yes 105 t 105)))) nil
> nil nil nil #s(hash-table size 65 test eql rehash-size 1.5
> rehash-threshold 0.8125 data ()) nil nil 1 72 nil nil)
> org-plot/gnuplot)
>   mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode
> 0x285567f77ae87d2>))
>   debug-early-backtrace()
>   debug-early(error (native-ice "org/org-plot.el" "block does not end
> with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG
> 83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil
> :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range
> nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset
> (t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3))) (call record_unwind_protect_excursion) (setimm
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref
> funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset
> nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)
> plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref
> funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6)
> #<hash-table eq 3/3 0x155ea01696a7>)) :closed nil :in-edges nil
> :out-edges nil :idom nil :df #<hash-table eql 0/65 0x155ea02c4401>
> :post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil
> :no-ret nil) org-plot/gnuplot))
>   signal(native-ice ("org/org-plot.el" "block does not end with a
> branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83")
> (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1
> . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 2) make-temp-file)
> (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)
> org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)))
> (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call
> helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1))
> :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset
> nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar
> :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5)
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t)
> :valset nil :range nil :neg nil :id nil :slot 4) (callref funcall
> #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range
> nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil
> :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset
> (t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq
> 3/3 0x155ea01696a7>)) :closed nil :in-edges nil :out-edges nil :idom
> nil :df #<hash-table eql 0/65 0x155ea02c4401> :post-num nil
> :final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil)
> org-plot/gnuplot))
>   comp--native-compile("org/org-plot.el")
>   batch-native-compile()
>   batch-byte+native-compile()
>   command-line-1(("--eval" "(setq load-prefer-newer t
> byte-compile-warnings 'all)" "-l" "comp" "-f"
> "batch-byte+native-compile" "org/org-plot.el"))
>   command-line()
>   normal-top-level()
> Internal native compiler error: "org/org-plot.el", "block does not end
> with a branch", #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> nil nil nil nil 3))) ...) nil nil nil nil #s(hash-table size 65 test
> eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil ...),
> #<symbol org-plot/gnuplot at 23521>
> make[5]: *** [Makefile:327: org/org-plot.elc] Error 255

Hi Pedro,

bisecting this should be due to:
"
52b67740d10df8ca539fdc2c7d50283997683141
Author:     Mattias Engdegård <mattiase@acm.org>
AuthorDate: Sat Mar 25 15:38:00 2023 +0100
Commit:     Mattias Engdegård <mattiase@acm.org>
CommitDate: Sat Mar 25 16:21:09 2023 +0100

Parent:     db7e95531ac Switch buffer in Ftreesit_query_capture
Merged:     comp-no-spawn
Follows:    emacs-28.2 (164697)

Generalise a LAP optimisation rule

* lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a
rule previously overlooked.  This is usually beneficial in code size
and almost always shortens dynamic paths.
"

I'll try to have a look as soon as I've some time.

Thanks

  Andrea





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30  9:28 ` Andrea Corallo
@ 2023-03-30  9:59   ` Pedro Andres Aranda Gutierrez
  2023-03-30 10:37   ` Mattias Engdegård
  1 sibling, 0 replies; 13+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2023-03-30  9:59 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Mattias Engdegård, 62537

Let me know when you are done. I can pull-up a VM in no time to check,
check pre-patches, etc.
I'm on master

Best, /PA

On Thu, 30 Mar 2023 at 11:28, Andrea Corallo <akrl@sdf.org> wrote:
>
> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > HI
> > there seems to be a problem when compiling the org-mode files with
> > native compilation activated
> >
> > ```
> >   ELC+ELN  org/org-plot.elc
> >
> > Error: native-ice ("org/org-plot.el" "block does not end with a
> > branch" #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> > helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> > #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> > #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> > nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> > 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> > record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> > nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> > nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> > #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> > #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> > nil nil nil nil 3))) (call helper_unbind_n #s(comp-mvar nil nil ((1 .
> > 1)) nil nil nil)) (setimm #s(comp-mvar (t) nil nil nil nil 4)
> > plist-get) (set #s(comp-mvar (t) nil nil nil nil 5) #s(comp-mvar (t)
> > nil nil nil nil 0)) (setimm #s(comp-mvar (t) nil nil nil nil 6)
> > :transpose) (set #s(comp-mvar (t) nil nil nil nil 4) (callref funcall
> > #s(comp-mvar (t) nil nil nil nil 4) #s(comp-mvar (t) nil nil nil nil
> > 5) #s(comp-mvar (t) nil nil nil nil 6))) (set #s(comp-mvar (t) nil nil
> > nil nil 5) #s(comp-mvar (t) nil nil nil nil 4)) (setimm #s(comp-mvar
> > (t) nil nil nil nil 6) #s(hash-table size 3 test eq rehash-size 1.5
> > rehash-threshold 0.8125 purecopy t data (y 105 yes 105 t 105)))) nil
> > nil nil nil #s(hash-table size 65 test eql rehash-size 1.5
> > rehash-threshold 0.8125 data ()) nil nil 1 72 nil nil)
> > org-plot/gnuplot)
> >   mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode
> > 0x285567f77ae87d2>))
> >   debug-early-backtrace()
> >   debug-early(error (native-ice "org/org-plot.el" "block does not end
> > with a branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG
> > 83") (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil
> > :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> > make-temp-file) (setimm #s(comp-mvar :typeset (t) :valset nil :range
> > nil :neg nil :id nil :slot 3) "org-plot") (set #s(comp-mvar :typeset
> > (t) :valset nil :range nil :neg nil :id nil :slot 2) (callref funcall
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 2) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 3))) (call record_unwind_protect_excursion) (setimm
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 3) org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t)
> > :valset nil :range nil :neg nil :id nil :slot 3) (callref funcall
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 3))) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> > :neg nil :id nil :slot 3) org-table-to-lisp) (set #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3) (callref
> > funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 3))) (call helper_unbind_n #s(comp-mvar :typeset nil :valset
> > nil :range ((1 . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4)
> > plist-get) (set #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> > nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil
> > :neg nil :id nil :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset
> > nil :range nil :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 4) (callref
> > funcall #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> > :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg
> > nil :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil
> > :range nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset
> > nil :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 6)
> > #<hash-table eq 3/3 0x155ea01696a7>)) :closed nil :in-edges nil
> > :out-edges nil :idom nil :df #<hash-table eql 0/65 0x155ea02c4401>
> > :post-num nil :final-frame nil :sp 1 :addr 72 :non-ret-insn nil
> > :no-ret nil) org-plot/gnuplot))
> >   signal(native-ice ("org/org-plot.el" "block does not end with a
> > branch" #s(comp-block-lap :name bb_8 :insns ((comment "LAP TAG 83")
> > (call helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1
> > . 1)) :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t)
> > :valset nil :range nil :neg nil :id nil :slot 2) make-temp-file)
> > (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 3) "org-plot") (set #s(comp-mvar :typeset (t) :valset nil
> > :range nil :neg nil :id nil :slot 2) (callref funcall #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 2)
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 3))) (call record_unwind_protect_excursion) (setimm #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)
> > org-plot/goto-nearest-table) (set #s(comp-mvar :typeset (t) :valset
> > nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3)))
> > (setimm #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 3) org-table-to-lisp) (set #s(comp-mvar :typeset (t) :valset
> > nil :range nil :neg nil :id nil :slot 3) (callref funcall #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 3))) (call
> > helper_unbind_n #s(comp-mvar :typeset nil :valset nil :range ((1 . 1))
> > :neg nil :id nil :slot nil)) (setimm #s(comp-mvar :typeset (t) :valset
> > nil :range nil :neg nil :id nil :slot 4) plist-get) (set #s(comp-mvar
> > :typeset (t) :valset nil :range nil :neg nil :id nil :slot 5)
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 0)) (setimm #s(comp-mvar :typeset (t) :valset nil :range nil
> > :neg nil :id nil :slot 6) :transpose) (set #s(comp-mvar :typeset (t)
> > :valset nil :range nil :neg nil :id nil :slot 4) (callref funcall
> > #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id nil
> > :slot 4) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil :id
> > nil :slot 5) #s(comp-mvar :typeset (t) :valset nil :range nil :neg nil
> > :id nil :slot 6))) (set #s(comp-mvar :typeset (t) :valset nil :range
> > nil :neg nil :id nil :slot 5) #s(comp-mvar :typeset (t) :valset nil
> > :range nil :neg nil :id nil :slot 4)) (setimm #s(comp-mvar :typeset
> > (t) :valset nil :range nil :neg nil :id nil :slot 6) #<hash-table eq
> > 3/3 0x155ea01696a7>)) :closed nil :in-edges nil :out-edges nil :idom
> > nil :df #<hash-table eql 0/65 0x155ea02c4401> :post-num nil
> > :final-frame nil :sp 1 :addr 72 :non-ret-insn nil :no-ret nil)
> > org-plot/gnuplot))
> >   comp--native-compile("org/org-plot.el")
> >   batch-native-compile()
> >   batch-byte+native-compile()
> >   command-line-1(("--eval" "(setq load-prefer-newer t
> > byte-compile-warnings 'all)" "-l" "comp" "-f"
> > "batch-byte+native-compile" "org/org-plot.el"))
> >   command-line()
> >   normal-top-level()
> > Internal native compiler error: "org/org-plot.el", "block does not end
> > with a branch", #s(comp-block-lap bb_8 ((comment "LAP TAG 83") (call
> > helper_unbind_n #s(comp-mvar nil nil ((1 . 1)) nil nil nil)) (setimm
> > #s(comp-mvar (t) nil nil nil nil 2) make-temp-file) (setimm
> > #s(comp-mvar (t) nil nil nil nil 3) "org-plot") (set #s(comp-mvar (t)
> > nil nil nil nil 2) (callref funcall #s(comp-mvar (t) nil nil nil nil
> > 2) #s(comp-mvar (t) nil nil nil nil 3))) (call
> > record_unwind_protect_excursion) (setimm #s(comp-mvar (t) nil nil nil
> > nil 3) org-plot/goto-nearest-table) (set #s(comp-mvar (t) nil nil nil
> > nil 3) (callref funcall #s(comp-mvar (t) nil nil nil nil 3))) (setimm
> > #s(comp-mvar (t) nil nil nil nil 3) org-table-to-lisp) (set
> > #s(comp-mvar (t) nil nil nil nil 3) (callref funcall #s(comp-mvar (t)
> > nil nil nil nil 3))) ...) nil nil nil nil #s(hash-table size 65 test
> > eql rehash-size 1.5 rehash-threshold 0.8125 data ()) nil nil ...),
> > #<symbol org-plot/gnuplot at 23521>
> > make[5]: *** [Makefile:327: org/org-plot.elc] Error 255
>
> Hi Pedro,
>
> bisecting this should be due to:
> "
> 52b67740d10df8ca539fdc2c7d50283997683141
> Author:     Mattias Engdegård <mattiase@acm.org>
> AuthorDate: Sat Mar 25 15:38:00 2023 +0100
> Commit:     Mattias Engdegård <mattiase@acm.org>
> CommitDate: Sat Mar 25 16:21:09 2023 +0100
>
> Parent:     db7e95531ac Switch buffer in Ftreesit_query_capture
> Merged:     comp-no-spawn
> Follows:    emacs-28.2 (164697)
>
> Generalise a LAP optimisation rule
>
> * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
> Accept (stack-set 1) as equivalent to (discardN-preserve-tos 1) in a
> rule previously overlooked.  This is usually beneficial in code size
> and almost always shortens dynamic paths.
> "
>
> I'll try to have a look as soon as I've some time.
>
> Thanks
>
>   Andrea



-- 
Fragen sind nicht da um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should
run a leader-deposed hook here, but we can't yet





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30  9:28 ` Andrea Corallo
  2023-03-30  9:59   ` Pedro Andres Aranda Gutierrez
@ 2023-03-30 10:37   ` Mattias Engdegård
  2023-03-30 13:35     ` Andrea Corallo
  1 sibling, 1 reply; 13+ messages in thread
From: Mattias Engdegård @ 2023-03-30 10:37 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 62537, Pedro Andres Aranda Gutierrez

30 mars 2023 kl. 11.28 skrev Andrea Corallo <akrl@sdf.org>:

> bisecting this should be due to:
> "
> 52b67740d10df8ca539fdc2c7d50283997683141

> Generalise a LAP optimisation rule

That change should be entirely safe. Perhaps it just somehow triggers an unexpected path in nativecomp?






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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30 10:37   ` Mattias Engdegård
@ 2023-03-30 13:35     ` Andrea Corallo
  2023-03-31 10:26       ` Andrea Corallo
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo @ 2023-03-30 13:35 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 62537, Pedro Andres Aranda Gutierrez

Mattias Engdegård <mattiase@acm.org> writes:

> 30 mars 2023 kl. 11.28 skrev Andrea Corallo <akrl@sdf.org>:
>
>> bisecting this should be due to:
>> "
>> 52b67740d10df8ca539fdc2c7d50283997683141
>
>> Generalise a LAP optimisation rule
>
> That change should be entirely safe. Perhaps it just somehow triggers an unexpected path in nativecomp?

That's entirely possible :)

Will look at and report.

  Andrea





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-30 13:35     ` Andrea Corallo
@ 2023-03-31 10:26       ` Andrea Corallo
  2023-03-31 15:14         ` Mattias Engdegård
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo @ 2023-03-31 10:26 UTC (permalink / raw)
  To: Mattias Engdegård; +Cc: 62537, Pedro Andres Aranda Gutierrez

Andrea Corallo <akrl@sdf.org> writes:

> Mattias Engdegård <mattiase@acm.org> writes:
>
>> 30 mars 2023 kl. 11.28 skrev Andrea Corallo <akrl@sdf.org>:
>>
>>> bisecting this should be due to:
>>> "
>>> 52b67740d10df8ca539fdc2c7d50283997683141
>>
>>> Generalise a LAP optimisation rule
>>
>> That change should be entirely safe. Perhaps it just somehow triggers an unexpected path in nativecomp?
>
> That's entirely possible :)
>
> Will look at and report.
>
>   Andrea

I haven't had time to complete the investigation/fix but as data
point...

This is the most reduced reproducer I could produce:

;;; -*- lexical-binding: t; -*-
(defun test ()
  (when (let
            ((val
              (foo)))
          (cond
           ((eq val 'x)
            t)
           ((eq val 'y)
            'y)))
    (foo))
  t)

This is the old LAP:

(byte-constant foo . 0)
(byte-call . 0)
(byte-dup)
(byte-constant #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (x 8 y 12)) . 1)
(byte-switch)
(byte-goto TAG 16 . 1)
(TAG 8 . 1)
(byte-constant t . 2)
(byte-goto TAG 17 . 2)
(TAG 12 . 1)
(byte-constant t . 2)
(byte-goto TAG 17 . 2)
(TAG 16 . 1)
(byte-constant nil . 3)
(TAG 17 . 2)
(byte-stack-set . 1)
(byte-goto-if-nil TAG 25 . 0)
(byte-constant foo . 0)
(byte-call . 0)
(byte-discard)
(TAG 25 . 0)
(byte-constant t . 2)
(byte-return . 0)

This is the new one:

(byte-constant foo . 0)
(byte-call . 0)
(byte-dup)
(byte-constant #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (x 9 y 9)) . 1)
(byte-switch)
(byte-discard)
(byte-goto TAG 13 . 0)
(TAG 9 . 1)
(byte-discard)
(byte-constant foo . 0)
(byte-call . 0)
(byte-discard)
(TAG 13 . 0)
(byte-constant t . 2)
(byte-return . 0)

At a very quick look I don't see anything wrong with it so as
anticipated most lickly is just a bug in the native compiler limplify
pass.

Best Regards

  Andrea





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-31 10:26       ` Andrea Corallo
@ 2023-03-31 15:14         ` Mattias Engdegård
  2023-04-05 17:19           ` Andrea Corallo
  0 siblings, 1 reply; 13+ messages in thread
From: Mattias Engdegård @ 2023-03-31 15:14 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: 62537, Pedro Andres Aranda Gutierrez

31 mars 2023 kl. 12.26 skrev Andrea Corallo <akrl@sdf.org>:

> At a very quick look I don't see anything wrong with it so as
> anticipated most lickly is just a bug in the native compiler limplify
> pass.

I agree, the output looks correct. Good example by the way, and it illustrates the motivation behind the change well -- the new code is much better, although it can still be improved.
Let us know what you find.






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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-03-31 15:14         ` Mattias Engdegård
@ 2023-04-05 17:19           ` Andrea Corallo
  2023-04-05 20:51             ` Mattias Engdegård
  2023-04-06 10:42             ` Mattias Engdegård
  0 siblings, 2 replies; 13+ messages in thread
From: Andrea Corallo @ 2023-04-05 17:19 UTC (permalink / raw)
  To: 62537; +Cc: Mattias Engdegård, Eli Zaretskii,
	Pedro Andres Aranda Gutierrez

Gut I finally have a fix for this!

As we suspected was a bug in the native compiler limplification pass
triggered by the new LAP emitted.

fa669c4b17c fixes bootstrap --with-native-compilation=aot here and adds
a test, is now pushed to master.  In 29 the bug never showed up
(probably because the new LAP tweak is not it) so I guess it's better to
leave the code as it is.

Now we should finally have again bootstrap for both master and 29 clean,
so any issue we might see is unexpected to me.

Best Regards

  Andrea





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-04-05 17:19           ` Andrea Corallo
@ 2023-04-05 20:51             ` Mattias Engdegård
  2023-04-05 21:12               ` Andrea Corallo
  2023-04-06 10:42             ` Mattias Engdegård
  1 sibling, 1 reply; 13+ messages in thread
From: Mattias Engdegård @ 2023-04-05 20:51 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Eli Zaretskii, 62537, Pedro Andres Aranda Gutierrez

5 apr. 2023 kl. 19.19 skrev Andrea Corallo <akrl@sdf.org>:

> As we suspected was a bug in the native compiler limplification pass
> triggered by the new LAP emitted.
> 
> fa669c4b17c fixes bootstrap --with-native-compilation=aot here and adds
> a test, is now pushed to master.  In 29 the bug never showed up
> (probably because the new LAP tweak is not it) so I guess it's better to
> leave the code as it is.

Nice! So the bug was that we optimised away switches where all jump targets are the same, without considering the fall-through case?

(Perhaps we should do something like that in the LAP optimiser. Wonder how common the opportunity is though.)

By the way, the bulk of `comp-jump-table-optimizable` should be equivalent to something like

   (apply #'= (hash-table-values jmp-table))

which is arguably clearer and definitely shorter.






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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-04-05 20:51             ` Mattias Engdegård
@ 2023-04-05 21:12               ` Andrea Corallo
  2023-04-05 21:46                 ` Mattias Engdegård
  0 siblings, 1 reply; 13+ messages in thread
From: Andrea Corallo @ 2023-04-05 21:12 UTC (permalink / raw)
  To: Mattias Engdegård
  Cc: Eli Zaretskii, 62537, Pedro Andres Aranda Gutierrez

Mattias Engdegård <mattiase@acm.org> writes:

> 5 apr. 2023 kl. 19.19 skrev Andrea Corallo <akrl@sdf.org>:
>
>> As we suspected was a bug in the native compiler limplification pass
>> triggered by the new LAP emitted.
>> 
>> fa669c4b17c fixes bootstrap --with-native-compilation=aot here and adds
>> a test, is now pushed to master.  In 29 the bug never showed up
>> (probably because the new LAP tweak is not it) so I guess it's better to
>> leave the code as it is.
>
> Nice! So the bug was that we optimised away switches where all jump targets are the same, without considering the fall-through case?

Hi Mattias,
yep that's correct :)

> (Perhaps we should do something like that in the LAP optimiser. Wonder how common the opportunity is though.)

Yeah might be a good idea even if I don't know how common this condition
is.  (We might count how many times `comp-jump-table-optimizable' returns
t in an aot build tho to get an idea).

> By the way, the bulk of `comp-jump-table-optimizable` should be equivalent to something like
>
>    (apply #'= (hash-table-values jmp-table))
>
> which is arguably clearer and definitely shorter.

True but with the downside that it conses.  I'll think about if I want
to change it, thanks for the neat suggestion tho :)

Best Regards

  Andrea





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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-04-05 21:12               ` Andrea Corallo
@ 2023-04-05 21:46                 ` Mattias Engdegård
  0 siblings, 0 replies; 13+ messages in thread
From: Mattias Engdegård @ 2023-04-05 21:46 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Eli Zaretskii, 62537, Pedro Andres Aranda Gutierrez

5 apr. 2023 kl. 23.12 skrev Andrea Corallo <akrl@sdf.org>:

>> (Perhaps we should do something like that in the LAP optimiser. Wonder how common the opportunity is though.)
> 
> Yeah might be a good idea even if I don't know how common this condition
> is.

Experimentally adding a LAP optimiser rule for it resulted in no matches during a complete lisp recompilation, so it's safe to say that it's not very common. 

I'm not going to bother, but perhaps your code works on something that has undergone further transformations and is thus more likely to trigger the rule?

>>   (apply #'= (hash-table-values jmp-table))
>> 
>> which is arguably clearer and definitely shorter.
> 
> True but with the downside that it conses.

More than the current code?






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

* bug#62537: Error compiling emacs master with native compilation activated
  2023-04-05 17:19           ` Andrea Corallo
  2023-04-05 20:51             ` Mattias Engdegård
@ 2023-04-06 10:42             ` Mattias Engdegård
  1 sibling, 0 replies; 13+ messages in thread
From: Mattias Engdegård @ 2023-04-06 10:42 UTC (permalink / raw)
  To: Andrea Corallo; +Cc: Eli Zaretskii, 62537, Pedro Andres Aranda Gutierrez

5 apr. 2023 kl. 19.19 skrev Andrea Corallo <akrl@sdf.org>:

> In 29 the bug never showed up
> (probably because the new LAP tweak is not it) so I guess it's better to
> leave the code as it is.

Actually I don't think I can prove that the LAP code will never have the pattern that triggered the bug in Emacs 29; nothing prevents it in principle from occurring anyway.

It doesn't seem safe to keep the buggy limplification in that branch -- I suggest we remove the switch-eliminating optimisation in comp.el altogether just in case. What do you think?






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

end of thread, other threads:[~2023-04-06 10:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30  7:18 bug#62537: Error compiling emacs master with native compilation activated Pedro Andres Aranda Gutierrez
2023-03-30  8:50 ` Eli Zaretskii
2023-03-30  9:28 ` Andrea Corallo
2023-03-30  9:59   ` Pedro Andres Aranda Gutierrez
2023-03-30 10:37   ` Mattias Engdegård
2023-03-30 13:35     ` Andrea Corallo
2023-03-31 10:26       ` Andrea Corallo
2023-03-31 15:14         ` Mattias Engdegård
2023-04-05 17:19           ` Andrea Corallo
2023-04-05 20:51             ` Mattias Engdegård
2023-04-05 21:12               ` Andrea Corallo
2023-04-05 21:46                 ` Mattias Engdegård
2023-04-06 10:42             ` Mattias Engdegård

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.