[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 23791cf 09/19: * Allow for modifying insn-cell insid
From: |
Andrea Corallo |
Subject: |
feature/native-comp 23791cf 09/19: * Allow for modifying insn-cell inside `comp-loop-insn-in-block' |
Date: |
Mon, 21 Dec 2020 14:52:39 -0500 (EST) |
branch: feature/native-comp
commit 23791cf74da9c2e6369f2c15ef180ef2a8c21656
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Allow for modifying insn-cell inside `comp-loop-insn-in-block'
* lisp/emacs-lisp/comp.el (comp-loop-insn-in-block): Update.
---
lisp/emacs-lisp/comp.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 8791759..e8db238 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -759,14 +759,15 @@ VERBOSITY is a number between 0 and 3."
(defmacro comp-loop-insn-in-block (basic-block &rest body)
"Loop over all insns in BASIC-BLOCK executing BODY.
-Inside BODY `insn' can be used to read or set the current
-instruction."
+Inside BODY `insn' and `insn-cell'can be used to read or set the
+current instruction or its cell."
(declare (debug (form body))
(indent defun))
- (let ((sym-cell (gensym "cell-")))
- `(cl-symbol-macrolet ((insn (car ,sym-cell)))
- (cl-loop for ,sym-cell on (comp-block-insns ,basic-block)
- do ,@body))))
+ `(cl-symbol-macrolet ((insn (car insn-cell)))
+ (let ((insn-cell (comp-block-insns ,basic-block)))
+ (while insn-cell
+ ,@body
+ (setf insn-cell (cdr insn-cell))))))
;;; spill-lap pass specific code.
- feature/native-comp bad18f5 02/19: * Improve comp-fwprop pass, (continued)
- feature/native-comp bad18f5 02/19: * Improve comp-fwprop pass, Andrea Corallo, 2020/12/21
- feature/native-comp a0c0daf 03/19: * Fix a number of type specifier simplification tests, Andrea Corallo, 2020/12/21
- feature/native-comp 34c1d75 05/19: * Enumerate and split type specifier tests in comp-tests.el to ease debug, Andrea Corallo, 2020/12/21
- feature/native-comp 7074988 06/19: * Add a type specifier test to comp-cstr-tests.el, Andrea Corallo, 2020/12/21
- feature/native-comp 0255108 08/19: * Rename comp-cond-cstr into comp-add-cstrs, Andrea Corallo, 2020/12/21
- feature/native-comp 48d43f5 04/19: * Improve constraint simplification logic in comp-cstr.el, Andrea Corallo, 2020/12/21
- feature/native-comp 07b75de 10/19: Enhance type inference constraining function arguments, Andrea Corallo, 2020/12/21
- feature/native-comp e0f20da 14/19: Simplify correctly (or (integer 1 1) (not (integer 1 1))) as t, Andrea Corallo, 2020/12/21
- feature/native-comp 6f3570c 16/19: Fix value type inference for doubly negate constraints, Andrea Corallo, 2020/12/21
- feature/native-comp d072ee9 07/19: * Two minors in comp.el, Andrea Corallo, 2020/12/21
- feature/native-comp 23791cf 09/19: * Allow for modifying insn-cell inside `comp-loop-insn-in-block',
Andrea Corallo <=
- feature/native-comp 9bbe6ea 15/19: Fix native compiler tests when they are bytecompiled, Andrea Corallo, 2020/12/21
- feature/native-comp 8e816b0 11/19: Symplify type specifier (not t) as nil, Andrea Corallo, 2020/12/21
- feature/native-comp c70c080 12/19: * Allow for overlapping src and dst in cstr set operations, Andrea Corallo, 2020/12/21
- feature/native-comp 5376563 17/19: Fix `comp-add-call-cstr' and add a test, Andrea Corallo, 2020/12/21
- feature/native-comp ebf8963 18/19: * Fix a bunch of known type specifiers, Andrea Corallo, 2020/12/21
- feature/native-comp 9676e4d 19/19: * Fix a test in auth-source-tests.el, Andrea Corallo, 2020/12/21
- feature/native-comp 3540b1f 13/19: * Guarantee fwprop convergence and termination, Andrea Corallo, 2020/12/21