diff options
| author | Andrea Corallo | 2021-04-26 22:58:08 +0200 |
|---|---|---|
| committer | Andrea Corallo | 2021-04-26 23:01:39 +0200 |
| commit | edf42af2cccab9d2ea2730f721fec5d41b4700f8 (patch) | |
| tree | 8eec5a86f62f36b8f6c790db41c8487d692bfd60 | |
| parent | 4396ef5a386969580bf4685fc2e6b1e3afec0bd7 (diff) | |
| download | emacs-edf42af2cccab9d2ea2730f721fec5d41b4700f8.tar.gz emacs-edf42af2cccab9d2ea2730f721fec5d41b4700f8.zip | |
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.
| -rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/comp.el | 2 | ||||
| -rw-r--r-- | 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 d22d19ce1ec..b87cbf7e83c 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el | |||
| @@ -175,6 +175,10 @@ Return them as multiple value." | |||
| 175 | collect cstr into positives | 175 | collect cstr into positives |
| 176 | finally return (cl-values positives negatives))) | 176 | finally return (cl-values positives negatives))) |
| 177 | 177 | ||
| 178 | ;; So we can load comp-cstr.el and comp.el in non native compiled | ||
| 179 | ;; builds. | ||
| 180 | (defvar comp-ctxt) | ||
| 181 | |||
| 178 | (defvar comp-cstr-one (comp-value-to-cstr 1) | 182 | (defvar comp-cstr-one (comp-value-to-cstr 1) |
| 179 | "Represent the integer immediate one.") | 183 | "Represent the integer immediate one.") |
| 180 | 184 | ||
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index c2c9987d9e3..1fb07c66adf 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el | |||
| @@ -552,8 +552,6 @@ Useful to hook into pass checkers.") | |||
| 552 | (signal (function (symbol t) nil))) | 552 | (signal (function (symbol t) nil))) |
| 553 | "Alist used for type propagation.") | 553 | "Alist used for type propagation.") |
| 554 | 554 | ||
| 555 | (defvar comp-ctxt) ; To make comp.el loadable in non native comp builds. | ||
| 556 | |||
| 557 | (defconst comp-known-func-cstr-h | 555 | (defconst comp-known-func-cstr-h |
| 558 | (cl-loop | 556 | (cl-loop |
| 559 | with comp-ctxt = (make-comp-cstr-ctxt) | 557 | 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 d45a3e5fafd..2e4628522f4 100644 --- a/test/lisp/emacs-lisp/comp-cstr-tests.el +++ b/test/lisp/emacs-lisp/comp-cstr-tests.el | |||
| @@ -29,8 +29,6 @@ | |||
| 29 | (require 'cl-lib) | 29 | (require 'cl-lib) |
| 30 | (require 'comp-cstr) | 30 | (require 'comp-cstr) |
| 31 | 31 | ||
| 32 | (defvar comp-ctxt) ; So we can run these tests on non native compiled builds. | ||
| 33 | |||
| 34 | (cl-eval-when (compile eval load) | 32 | (cl-eval-when (compile eval load) |
| 35 | 33 | ||
| 36 | (defun comp-cstr-test-ts (type-spec) | 34 | (defun comp-cstr-test-ts (type-spec) |