diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-11-08 12:16:34 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-11-12 00:55:36 +0100 |
commit | 00b4e0a9bb0aa6fc6af997eeeff109cb263eddcf (patch) | |
tree | d4d8ae1cc1e4dff4cbcb729ac7145cfd1a2786dd /lisp/emacs-lisp | |
parent | 175efec0732fc7317a444a2005f7b968a972b8e6 (diff) | |
download | emacs-00b4e0a9bb0aa6fc6af997eeeff109cb263eddcf.tar.gz emacs-00b4e0a9bb0aa6fc6af997eeeff109cb263eddcf.tar.bz2 emacs-00b4e0a9bb0aa6fc6af997eeeff109cb263eddcf.zip |
* Fix limple-mode for new type and range limple semantic
* lisp/emacs-lisp/comp.el (comp-limple-branches, comp-limple-ops):
New variables.
(comp-limple-lock-keywords): Update value.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index ad0ac21389e..055adcc4973 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -242,6 +242,15 @@ Useful to hook into pass checkers.") direct-callref) "Limple operators use to call subrs.") +(defconst comp-limple-branches '(jump cond-jump) + "Limple operators use for conditional and unconditional branches.") + +(defconst comp-limple-ops `(,@comp-limple-calls + ,@comp-limple-assignments + ,@comp-limple-branches + return) + "All limple operators.") + (define-error 'native-compiler-error-dyn-func "can't native compile a non-lexically-scoped function" 'native-compiler-error) @@ -584,7 +593,8 @@ Assume allocation class 'd-default as default." (seq (or "entry_" "entry_fallback_" "bb_") (1+ num) (? "_latch"))))) (1 font-lock-constant-face)) - (,(rx "(" (group-n 1 (1+ (or word "-")))) + (,(rx-to-string + `(seq "(" (group-n 1 (or ,@(mapcar #'symbol-name comp-limple-ops))))) (1 font-lock-keyword-face))) "Highlights used by comp-limple-mode.") |