Commit 337e9b5a authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Marge Bot

Remove redundant 0s in ghc-heap pointer strings

Before: 0x0000004200c86888
After:  0x42000224f8

This is more concise and consistent with the RTS's printer (which uses
%p formatter, and at least on Linux gcc prints the short form) and gdb's
pointer formatter.
parent 4898df1c
Pipeline #12025 passed with stages
in 494 minutes and 11 seconds
......@@ -70,9 +70,7 @@ instance Show Box where
ptr = W# (aToWord# a)
tag = ptr .&. fromIntegral tAG_MASK -- ((1 `shiftL` TAG_BITS) -1)
addr = ptr - tag
-- want 0s prefixed to pad it out to a fixed length.
pad_out ls =
'0':'x':(replicate (2*wORD_SIZE - length ls) '0') ++ ls
pad_out ls = '0':'x':ls
-- |This takes an arbitrary value and puts it into a box.
-- Note that calls like
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment