summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-06-01 11:38:12 -0700
committercolin <colin@cicadas.surf>2024-06-01 11:38:12 -0700
commit4bc773964ae3c48b806fc2ad30dd5811571d902a (patch)
treef47f8714fb298d51be9ae8131d8f5b8dd540309f
parent1ff8ffb793a988de0bea7b3c7e663886801e9ce9 (diff)
Add: note about why we append _ to some instr class names
-rw-r--r--src/instr.lisp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/instr.lisp b/src/instr.lisp
index db13941..fe80ecb 100644
--- a/src/instr.lisp
+++ b/src/instr.lisp
@@ -18,6 +18,10 @@
(defun expand-instr-plist (plist)
(destructuring-bind (&key instr code type) plist
(let* ((class-name
+ ;; `select` names two instructions, so we add this
+ ;; machinery to check for two instructions with the
+ ;; same name, and to append `_` to the class name
+ ;; whenever name collision is detected
(let ((class-name (intern (string-upcase (first instr)))))
(cl:if (gethash class-name defined)
(intern (format nil "~a_" class-name))