]> git.eshelyaron.com Git - emacs.git/commitdiff
Rework where `comp-ctxt' is defined.
authorAndrea Corallo <akrl@sdf.org>
Mon, 26 Apr 2021 20:58:08 +0000 (22:58 +0200)
committerAndrea Corallo <akrl@sdf.org>
Mon, 26 Apr 2021 21:01:39 +0000 (23:01 +0200)
* 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
lisp/emacs-lisp/comp.el
test/lisp/emacs-lisp/comp-cstr-tests.el

index d22d19ce1ec50c4918a05ed1ea8c9dc87e302f8a..b87cbf7e83cf8321c1f46850700b47dcdd7e18fa 100644 (file)
@@ -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.")
 
index c2c9987d9e35996d29c99cd5e660cfbd85e20304..1fb07c66adf797fa6d053462076a7203fb3ca5b8 100644 (file)
@@ -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)
index d45a3e5fafd2f2ba3bf72cf730d2a2a6e0a35b05..2e4628522f48914d9cd832560f8e23194b442cb0 100644 (file)
@@ -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)