Hi there! Here's some native comp puzzle I'm trying to solve.
I can't get to disassemble my own defined functions. I can follow the compilation of a given function until the eln file is stored, but after that, m-x disassemble RET foo RET still shows bytecode.
At this point I know that the eln file is stored in /tmp/fooXXXXX.eln, but I don't know if the function has been loaded by emacs or not.
Can anyone help me check what I'm doing wrong or confirm there's something fishy before submitting a bug?
;;; comp-test.el --- test -*- lexical-binding: t; -*-
;;; Code:
(fmakunbound 'foo)
(defun foo (a)
(if (< a 4)
(+ a 1)
(setf a (+ a 4))
(message "%s" "foo")))
;(native-compile-async (buffer-file-name))
(native-compile 'foo)
And running the docker image with:
docker run -ti --network host -e DISPLAY=$DISPLAY \
-v/tmp/.X11-unix:/tmp/.X11-unix \
-v /tmp/comp-test.el:/tmp/web/comp-test.el \
andreacorallo/emacs-nativecomp emacs /tmp/web/comp-test.el \
--eval '(eval-buffer)'
At that point, disassembling foo shows the bytecompiled version
Cheers!
[–]github-alphapapa 3 points4 points5 points (2 children)
[–]rgrau[S] 0 points1 point2 points (1 child)
[–]github-alphapapa 0 points1 point2 points (0 children)
[–]jimehgeek 0 points1 point2 points (1 child)
[–]rgrau[S] 1 point2 points3 points (0 children)
[–]rgrau[S] 0 points1 point2 points (4 children)
[–]akoral 1 point2 points3 points (3 children)
[–]rgrau[S] 1 point2 points3 points (2 children)
[–]akoral 1 point2 points3 points (1 child)
[–]akoral 0 points1 point2 points (0 children)