Add reference equality test (only implemented for constants so far)
This commit is contained in:
parent
e88e966521
commit
449e36e183
1 changed files with 3 additions and 0 deletions
|
@ -36,6 +36,9 @@
|
||||||
(print-unreadable-object (object stream :type t)
|
(print-unreadable-object (object stream :type t)
|
||||||
(format stream "~D" (ref-value object))))
|
(format stream "~D" (ref-value object))))
|
||||||
|
|
||||||
|
(defmethod ref= ((a reference-constant) (b reference-constant))
|
||||||
|
(= (value a) (value b)))
|
||||||
|
|
||||||
(defmethod dereference ((ref reference-constant))
|
(defmethod dereference ((ref reference-constant))
|
||||||
(produce-instruction 'inst-lda-immediate (ref-value ref)))
|
(produce-instruction 'inst-lda-immediate (ref-value ref)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue