Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
acc0fe48
Commit
acc0fe48
authored
Mar 24, 2005
by
simonmar
Browse files
[project @ 2005-03-24 15:22:33 by simonmar]
tweaks to a (commented-out) trace message
parent
d46ae075
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/codeGen/CgUtils.hs
View file @
acc0fe48
...
...
@@ -462,10 +462,14 @@ mk_switch tag_expr branches mb_deflt lo_tag hi_tag via_C
;
return
(
assign_tag
`
consCgStmt
`
(
branch_stmt
`
consCgStmt
`
hi_stmts
))
}
where
use_switch
=
ASSERT
(
n_branches
>
1
&&
n_tags
>
1
)
{- pprTrace "mk_switch" (ppr tag_expr <+> text "n_tags: "
<+> int n_tags <+> text "dense: "
<+> int n_branches) $ -}
use_switch
=
{- pprTrace "mk_switch" (
ppr tag_expr <+> text "n_tags:" <+> int n_tags <+>
text "n_branches:" <+> int n_branches <+>
text "lo_tag: " <+> int lo_tag <+>
text "hi_tag: " <+> int hi_tag <+>
text "real_lo_tag: " <+> int real_lo_tag <+>
text "real_hi_tag: " <+> int real_hi_tag) $ -}
ASSERT
(
n_branches
>
1
&&
n_tags
>
1
)
n_tags
>
2
&&
(
small
||
dense
)
-- a 2-branch switch always turns into an if.
small
=
n_tags
<=
4
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment