[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master edf42af: Rework where `comp-ctxt' is defined.
From: |
Andrea Corallo |
Subject: |
master edf42af: Rework where `comp-ctxt' is defined. |
Date: |
Mon, 26 Apr 2021 17:05:13 -0400 (EDT) |
branch: master
commit edf42af2cccab9d2ea2730f721fec5d41b4700f8
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Rework where `comp-ctxt' is defined.
* test/lisp/emacs-lisp/comp-cstr-tests.el (comp-ctxt): Remove
`comp-ctxt' definition.
* lisp/emacs-lisp/comp.el (comp-ctxt): Likewise.
* lisp/emacs-lisp/comp-cstr.el (comp-ctxt): Define it here.
---
lisp/emacs-lisp/comp-cstr.el | 4 ++++
lisp/emacs-lisp/comp.el | 2 --
test/lisp/emacs-lisp/comp-cstr-tests.el | 2 --
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index d22d19c..b87cbf7 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -175,6 +175,10 @@ Return them as multiple value."
collect cstr into positives
finally return (cl-values positives negatives)))
+;; So we can load comp-cstr.el and comp.el in non native compiled
+;; builds.
+(defvar comp-ctxt)
+
(defvar comp-cstr-one (comp-value-to-cstr 1)
"Represent the integer immediate one.")
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index c2c9987..1fb07c6 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -552,8 +552,6 @@ Useful to hook into pass checkers.")
(signal (function (symbol t) nil)))
"Alist used for type propagation.")
-(defvar comp-ctxt) ; To make comp.el loadable in non native comp builds.
-
(defconst comp-known-func-cstr-h
(cl-loop
with comp-ctxt = (make-comp-cstr-ctxt)
diff --git a/test/lisp/emacs-lisp/comp-cstr-tests.el
b/test/lisp/emacs-lisp/comp-cstr-tests.el
index d45a3e5..2e46285 100644
--- a/test/lisp/emacs-lisp/comp-cstr-tests.el
+++ b/test/lisp/emacs-lisp/comp-cstr-tests.el
@@ -29,8 +29,6 @@
(require 'cl-lib)
(require 'comp-cstr)
-(defvar comp-ctxt) ; So we can run these tests on non native compiled builds.
-
(cl-eval-when (compile eval load)
(defun comp-cstr-test-ts (type-spec)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master edf42af: Rework where `comp-ctxt' is defined.,
Andrea Corallo <=