Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Francesco Gazzetta
Glasgow Haskell Compiler
Commits
17e71c14
Commit
17e71c14
authored
Nov 14, 2017
by
Ben Gamari
🐢
Browse files
CLabel.labelType: Make catch-all case explicit
parent
54fda257
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/CLabel.hs
View file @
17e71c14
...
...
@@ -887,6 +887,7 @@ isGcPtrLabel lbl = case labelType lbl of
-- | Work out the general type of data at the address of this label
-- whether it be code, data, or static GC object.
labelType
::
CLabel
->
CLabelType
labelType
(
IdLabel
_
_
info
)
=
idInfoLabelType
info
labelType
(
CmmLabel
_
_
CmmData
)
=
DataLabel
labelType
(
CmmLabel
_
_
CmmClosure
)
=
GcPtrLabel
labelType
(
CmmLabel
_
_
CmmCode
)
=
CodeLabel
...
...
@@ -898,12 +899,22 @@ labelType (CmmLabel _ _ CmmRet) = CodeLabel
labelType
(
RtsLabel
(
RtsSelectorInfoTable
_
_
))
=
DataLabel
labelType
(
RtsLabel
(
RtsApInfoTable
_
_
))
=
DataLabel
labelType
(
RtsLabel
(
RtsApFast
_
))
=
CodeLabel
labelType
(
RtsLabel
_
)
=
DataLabel
labelType
(
LocalBlockLabel
_
)
=
CodeLabel
labelType
(
SRTLabel
_
)
=
DataLabel
labelType
(
ForeignLabel
_
_
_
IsFunction
)
=
CodeLabel
labelType
(
ForeignLabel
_
_
_
IsData
)
=
DataLabel
labelType
(
AsmTempLabel
_
)
=
panic
"labelType(AsmTempLabel)"
labelType
(
AsmTempDerivedLabel
_
_
)
=
panic
"labelType(AsmTempDerivedLabel)"
labelType
(
StringLitLabel
_
)
=
DataLabel
labelType
(
CC_Label
_
)
=
DataLabel
labelType
(
CCS_Label
_
)
=
DataLabel
labelType
(
DynamicLinkerLabel
_
_
)
=
DataLabel
-- Is this right?
labelType
PicBaseLabel
=
DataLabel
labelType
(
DeadStripPreventer
_
)
=
DataLabel
labelType
(
HpcTicksLabel
_
)
=
DataLabel
labelType
(
LargeSRTLabel
_
)
=
DataLabel
labelType
(
LargeBitmapLabel
_
)
=
DataLabel
labelType
(
ForeignLabel
_
_
_
IsFunction
)
=
CodeLabel
labelType
(
IdLabel
_
_
info
)
=
idInfoLabelType
info
labelType
_
=
DataLabel
idInfoLabelType
::
IdLabelInfo
->
CLabelType
idInfoLabelType
info
=
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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