[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 2ee2fb5 07/17: * Prune now unnecessary byte-code obj
From: |
Andrea Corallo |
Subject: |
feature/native-comp 2ee2fb5 07/17: * Prune now unnecessary byte-code objects |
Date: |
Fri, 15 May 2020 15:07:55 -0400 (EDT) |
branch: feature/native-comp
commit 2ee2fb5a86a8933b1105a1dc5b597ebb8ce57e40
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* Prune now unnecessary byte-code objects
* lisp/emacs-lisp/comp.el (comp-finalize-container): Prune
byte-code that was lambdas.
(comp-compile-ctxt-to-file): Remove fixme.
---
lisp/emacs-lisp/comp.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 705225d..3bcfdc9 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2117,7 +2117,16 @@ These are substituted with a normal 'set' op."
for obj each hash-keys of h
for i from 0
do (puthash obj i h)
- collect obj)))
+ ;; Prune byte-code objects coming from lambdas.
+ ;; These are not anymore necessary as they will be
+ ;; replaced at load time by native-elisp-subrs.
+ ;; Note: we leave the objects in the idx hash table
+ ;; to still be able to retrieve the correct index
+ ;; from the corresponding m-var.
+ collect (if (gethash obj
+ (comp-ctxt-byte-func-to-func-h
comp-ctxt))
+ nil
+ obj))))
(defun comp-finalize-relocs ()
"Finalize data containers for each relocation class.
@@ -2159,7 +2168,6 @@ Update all insn accordingly."
"Compile as native code the current context naming it NAME.
Prepare every function for final compilation and drive the C back-end."
(let ((dir (file-name-directory name)))
- ;; FIXME: Strip bytecompiled functions here.
(comp-finalize-relocs)
(unless (file-exists-p dir)
;; In case it's created in the meanwhile.
- feature/native-comp 392a6f9 05/17: * Split emit_const_lisp_obj logic, (continued)
- feature/native-comp 392a6f9 05/17: * Split emit_const_lisp_obj logic, Andrea Corallo, 2020/05/15
- feature/native-comp 5bf685f 03/17: * Rename emit_mvar_val -> emit_mvar_rval, Andrea Corallo, 2020/05/15
- feature/native-comp 49f0331 09/17: * Render all immediates as comments at comp-debug > 2, Andrea Corallo, 2020/05/15
- feature/native-comp 27b80ae 11/17: * Better Vcomp_sym_subr_c_name_h test function + doc, Andrea Corallo, 2020/05/15
- feature/native-comp 44b0ce6 10/17: Add anonymous lambdas reload mechanism, Andrea Corallo, 2020/05/15
- feature/native-comp e351a12 14/17: Sanity check on lambdas fixups, Andrea Corallo, 2020/05/15
- feature/native-comp ff9e40e 15/17: * Add check_comp_unit_relocs, Andrea Corallo, 2020/05/15
- feature/native-comp 9a64585 16/17: * Allow for logging async compilation command line, Andrea Corallo, 2020/05/15
- feature/native-comp d6f6353 17/17: * Do not refuse to compile if a dynamic lambda is encountered, Andrea Corallo, 2020/05/15
- feature/native-comp c12831a 06/17: * Rework comp-spill-lap-function, Andrea Corallo, 2020/05/15
- feature/native-comp 2ee2fb5 07/17: * Prune now unnecessary byte-code objects,
Andrea Corallo <=
- feature/native-comp 6eb14da 08/17: * Dump log and intemediate GCC IRs only at comp-debug 3, Andrea Corallo, 2020/05/15
- feature/native-comp e5b24b8 12/17: * Native compiler test update, Andrea Corallo, 2020/05/15
- feature/native-comp 2b064c7 13/17: * Fix speed 2 bootstrap, Andrea Corallo, 2020/05/15