diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2019-05-24 21:28:45 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-05-27 10:06:37 -0400 |
commit | db8e3275080173cc36af9f8e51636ee506e7c872 (patch) | |
tree | ba950f25e534ceae83f59ba21b87a5aed483414e | |
parent | f80d3afd7357edbeee0148faa9e8ca3e103a7174 (diff) | |
download | haskell-db8e3275080173cc36af9f8e51636ee506e7c872.tar.gz |
Add missing opening braces in Cmm dumps
Previously -ddump-cmm was generating code with unbalanced curly braces:
stg_atomically_entry() // [R1]
{ info_tbls: [(cfl,
label: stg_atomically_info
rep: tag:16 HeapRep 1 ptrs { Thunk }
srt: Nothing)]
stack_info: arg_space: 8 updfr_space: Just 8
}
{offset
cfl: // cfk
unwind Sp = Just Sp + 0;
_cfk::P64 = R1;
//tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
}
}, <---- OPENING BRACE MISSING
After this patch:
stg_atomically_entry() { // [R1] <---- MISSING OPENING BRACE HERE
{ info_tbls: [(cfl,
label: stg_atomically_info
rep: tag:16 HeapRep 1 ptrs { Thunk }
srt: Nothing)]
stack_info: arg_space: 8 updfr_space: Just 8
}
{offset
cfl: // cfk
unwind Sp = Just Sp + 0;
_cfk::P64 = R1;
//tick src<rts/PrimOps.cmm:(1243,1)-(1245,1)>
R1 = I64[_cfk::P64 + 8 + 8 + 0 * 8];
call stg_atomicallyzh(R1) args: 8, res: 0, upd: 8;
}
},
-rw-r--r-- | compiler/cmm/PprCmmDecl.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cmm/PprCmmDecl.hs b/compiler/cmm/PprCmmDecl.hs index ea01c29345..e54abdc8b6 100644 --- a/compiler/cmm/PprCmmDecl.hs +++ b/compiler/cmm/PprCmmDecl.hs @@ -94,7 +94,7 @@ pprTop :: (Outputable d, Outputable info, Outputable i) pprTop (CmmProc info lbl live graph) - = vcat [ ppr lbl <> lparen <> rparen <+> text "// " <+> ppr live + = vcat [ ppr lbl <> lparen <> rparen <+> lbrace <+> text "// " <+> ppr live , nest 8 $ lbrace <+> ppr info $$ rbrace , nest 4 $ ppr graph , rbrace ] |