Skip to content

Commit

Permalink
BIR disassembler: Display new constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Bike committed Sep 21, 2023
1 parent 74197b1 commit bf080c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BIR/disassemble.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@

(defgeneric disassemble-datum (datum))
(defmethod disassemble-datum ((value constant)) `',(constant-value value))
(defmethod disassemble-datum ((value function-cell))
`(function-cell ,(function-name value)))
(defmethod disassemble-datum ((value variable-cell))
`(variable-cell ,(variable-name value)))
(defmethod disassemble-datum ((value datum))
(or (gethash value *ids*)
(setf (gethash value *ids*)
Expand Down Expand Up @@ -157,7 +161,7 @@
(defmethod cleavir-bir-disassembler:disassemble ((module module))
(check-type module module)
(cleavir-bir-disassembler:with-disassembly ()
(list* (set:mapset 'list #'constant-value (constants module))
(list* (set:mapset 'list #'disassemble-datum (constants module))
(set:mapset 'list #'cleavir-bir-disassembler:disassemble
(functions module)))))

Expand Down

0 comments on commit bf080c3

Please sign in to comment.