emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is byte-compiled code supposed to call `make-byte-code'?


From: Paul Pogonyshev
Subject: Is byte-compiled code supposed to call `make-byte-code'?
Date: Tue, 24 May 2016 22:58:43 +0200

Trying to disassemble a trivial function that invokes a closure:

(defun xxx (fn)
  (mapcar (lambda (x) (1+ (funcall fn x))) '(1 2 3)))
(disassemble 'xxx)

gives:

0       constant  mapcar
1       constant  make-byte-code
2       constant  257
3       constant  "\300!T\207"
4       constant  vconcat
5       constant  vector
6       stack-ref 6
8       call      1
9       constant  []
10      call      2
11      constant  3
12      constant  "\n\n(fn X)"
13      call      5
14      constant  (1 2 3)
15      call      2
16      return

Is it supposed to build closure bytecode object every time? Shouldn't
it be considered a constant?

GNU Emacs 25.1.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.3) of 2016-05-24

Paul



reply via email to

[Prev in Thread] Current Thread [Next in Thread]