From 772fdf46a388dbdf18910559274686ffede8a67c Mon Sep 17 00:00:00 2001 From: zoep Date: Mon, 26 Feb 2024 12:14:58 +0200 Subject: [PATCH 1/2] Format: buffers inside parens --- src/EVM/Format.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/EVM/Format.hs b/src/EVM/Format.hs index 5285f7ac6..fef385a38 100644 --- a/src/EVM/Format.hs +++ b/src/EVM/Format.hs @@ -714,9 +714,10 @@ formatExpr = go , "size: " <> formatExpr size , "src:" , indent 2 $ formatExpr src + , "dst:" + , indent 2 $ formatExpr dst ] , ")" - , formatExpr dst ] WriteWord idx val buf -> T.unlines [ "(WriteWord" @@ -725,18 +726,19 @@ formatExpr = go , indent 2 $ formatExpr idx , "val:" , indent 2 $ formatExpr val + , "buf:" + , indent 2 $ formatExpr buf ] , ")" - , formatExpr buf ] WriteByte idx val buf -> T.unlines [ "(WriteByte" , indent 2 $ T.unlines [ "idx: " <> formatExpr idx , "val: " <> formatExpr val + , "buf: " <> formatExpr buf ] , ")" - , formatExpr buf ] ConcreteBuf bs -> case bs of "" -> "(ConcreteBuf \"\")" From 11d713b6e172c337e492d2fdfe1dbd775aa17fbd Mon Sep 17 00:00:00 2001 From: zoep Date: Mon, 26 Feb 2024 12:20:30 +0200 Subject: [PATCH 2/2] Same for SStore --- src/EVM/Format.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EVM/Format.hs b/src/EVM/Format.hs index fef385a38..669943ab0 100644 --- a/src/EVM/Format.hs +++ b/src/EVM/Format.hs @@ -687,9 +687,10 @@ formatExpr = go , indent 2 $ formatExpr slot , "val:" , indent 2 $ formatExpr val + , "store:" + , indent 2 $ formatExpr prev ] , ")" - , formatExpr prev ] AbstractStore a idx -> "(AbstractStore " <> formatExpr a <> " " <> T.pack (show idx) <> ")"