basic file compilation working

This commit is contained in:
Andrea Corallo 2019-09-07 11:17:02 +02:00
parent 37a794ce21
commit 29fcb6ca12
3 changed files with 45 additions and 17 deletions

View file

@ -563,8 +563,9 @@ Each element is (INDEX . VALUE)")
(defvar byte-compile-depth 0 "Current depth of execution stack.")
(defvar byte-compile-maxdepth 0 "Maximum depth of execution stack.")
;; These are use by comp.el to spill
;; These are use by comp.el to spill data out of here
(defvar byte-native-compiling nil)
(defvar byte-to-native-names nil)
(defvar byte-to-native-lap-output nil)
(defvar byte-to-native-bytecode-output nil)
@ -2271,6 +2272,10 @@ we output that argument and the following argument
QUOTED says that we have to put a quote before the
list that represents a doc string reference.
`defvaralias', `autoload' and `custom-declare-variable' need that."
(when byte-native-compiling
;; Spill output for the native compiler here
(push name byte-to-native-names)
(push (apply #'vector form) byte-to-native-bytecode-output))
;; We need to examine byte-compile-dynamic-docstrings
;; in the input buffer (now current), not in the output buffer.
(let ((dynamic-docstrings byte-compile-dynamic-docstrings))
@ -3121,9 +3126,8 @@ for symbols generated by the byte compiler itself."
(out (list 'byte-code (byte-compile-lapcode byte-compile-output)
byte-compile-vector byte-compile-maxdepth)))
(when byte-native-compiling
;; Spill output for the native compiler here
(push byte-compile-output byte-to-native-lap-output)
(push out byte-to-native-bytecode-output))
;; Spill output for the native compiler here
(push byte-compile-output byte-to-native-lap-output))
out))
;; it's a trivial function
((cdr body) (cons 'progn (nreverse body)))