Add reference equality test (only implemented for constants so far)

This commit is contained in:
John Lorentzson 2025-05-16 15:04:59 +02:00
parent e88e966521
commit 449e36e183

View file

@ -36,6 +36,9 @@
(print-unreadable-object (object stream :type t)
(format stream "~D" (ref-value object))))
(defmethod ref= ((a reference-constant) (b reference-constant))
(= (value a) (value b)))
(defmethod dereference ((ref reference-constant))
(produce-instruction 'inst-lda-immediate (ref-value ref)))