Skip to content

Commit

Permalink
Print constants of type Address in hex
Browse files Browse the repository at this point in the history
  • Loading branch information
janvrany committed Jun 16, 2023
1 parent f8e7957 commit 8d8a75a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Tinyrossa/TRILNodePrinter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ TRILNodePrinter >> print: node on: aStream [
(opcode hasSymbolRef or:[opcode isBranch]) ifTrue: [
aStream nextPutAll: node symbol name
] ifFalse: [
opcode isLoadConst ifTrue: [
node constant printOn: aStream.
opcode isLoadConst ifTrue: [
node type == 1 ifTrue: [
aStream
nextPutAll: '0x';
nextPutAll: ( node constant printPaddedWith: $0 to: 16 base: 16).
] ifFalse: [
node constant printOn: aStream.
]
].
].
].
Expand Down

0 comments on commit 8d8a75a

Please sign in to comment.