]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix limple-mode for new type and range limple semantic
authorAndrea Corallo <akrl@sdf.org>
Sun, 8 Nov 2020 11:16:34 +0000 (12:16 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 11 Nov 2020 23:55:36 +0000 (00:55 +0100)
* lisp/emacs-lisp/comp.el (comp-limple-branches, comp-limple-ops):
New variables.
(comp-limple-lock-keywords): Update value.

lisp/emacs-lisp/comp.el

index ad0ac21389e28251b3d19866ca92ad8261707d4e..055adcc49737c024396166d5dd11c52e51faea01 100644 (file)
@@ -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.")