Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,247
Issues
4,247
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
398
Merge Requests
398
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
5cf9c019
Commit
5cf9c019
authored
Feb 13, 2012
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused Conventions (Foreign, Private)
parent
32d652e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
21 deletions
+7
-21
compiler/cmm/CmmCvt.hs
compiler/cmm/CmmCvt.hs
+7
-11
compiler/cmm/CmmNode.hs
compiler/cmm/CmmNode.hs
+0
-8
compiler/cmm/PprCmm.hs
compiler/cmm/PprCmm.hs
+0
-2
No files found.
compiler/cmm/CmmCvt.hs
View file @
5cf9c019
...
...
@@ -24,17 +24,13 @@ cmmOfZgraph tops = map mapTop tops
data
ValueDirection
=
Arguments
|
Results
add_hints
::
Convention
->
ValueDirection
->
[
a
]
->
[
Old
.
CmmHinted
a
]
add_hints
::
ForeignTarget
->
ValueDirection
->
[
a
]
->
[
Old
.
CmmHinted
a
]
add_hints
conv
vd
args
=
zipWith
Old
.
CmmHinted
args
(
get_hints
conv
vd
)
get_hints
::
Convention
->
ValueDirection
->
[
ForeignHint
]
get_hints
(
Foreign
(
ForeignConvention
_
hints
_
))
Arguments
=
hints
get_hints
(
Foreign
(
ForeignConvention
_
_
hints
))
Results
=
hints
get_hints
_other_conv
_vd
=
repeat
NoHint
get_conv
::
ForeignTarget
->
Convention
get_conv
(
PrimTarget
_
)
=
NativeNodeCall
-- JD: SUSPICIOUS
get_conv
(
ForeignTarget
_
fc
)
=
Foreign
fc
get_hints
::
ForeignTarget
->
ValueDirection
->
[
ForeignHint
]
get_hints
(
ForeignTarget
_
(
ForeignConvention
_
hints
_
))
Arguments
=
hints
get_hints
(
ForeignTarget
_
(
ForeignConvention
_
_
hints
))
Results
=
hints
get_hints
(
PrimTarget
_
)
_vd
=
repeat
NoHint
cmm_target
::
ForeignTarget
->
Old
.
CmmCallTarget
cmm_target
(
PrimTarget
op
)
=
Old
.
CmmPrim
op
...
...
@@ -89,8 +85,8 @@ ofZgraph g = Old.ListGraph $ mapMaybe convert_block $ postorderDfs g
CmmUnsafeForeignCall
(
PrimTarget
MO_Touch
)
_
_
->
Old
.
CmmNop
CmmUnsafeForeignCall
target
ress
args
->
Old
.
CmmCall
(
cmm_target
target
)
(
add_hints
(
get_conv
target
)
Results
ress
)
(
add_hints
(
get_conv
target
)
Arguments
args
)
(
add_hints
target
Results
ress
)
(
add_hints
target
Arguments
args
)
Old
.
CmmMayReturn
last
::
CmmNode
O
C
->
()
->
[
Old
.
CmmStmt
]
...
...
compiler/cmm/CmmNode.hs
View file @
5cf9c019
...
...
@@ -223,14 +223,6 @@ data Convention
|
GC
-- Entry to the garbage collector: uses the node reg!
|
PrimOpCall
-- Calling prim ops
|
PrimOpReturn
-- Returning from prim ops
|
Foreign
-- Foreign call/return
ForeignConvention
|
Private
-- Used for control transfers within a (pre-CPS) procedure All
-- jump sites known, never pushed on the stack (hence no SRT)
-- You can choose whatever calling convention you please
-- (provided you make sure all the call sites agree)!
-- This data type eventually to be extended to record the convention.
deriving
(
Eq
)
data
ForeignConvention
...
...
compiler/cmm/PprCmm.hs
View file @
5cf9c019
...
...
@@ -147,8 +147,6 @@ pprConvention Slow = text "<slow-convention>"
pprConvention
GC
=
text
"<gc-convention>"
pprConvention
PrimOpCall
=
text
"<primop-call-convention>"
pprConvention
PrimOpReturn
=
text
"<primop-ret-convention>"
pprConvention
(
Foreign
c
)
=
ppr
c
pprConvention
(
Private
{})
=
text
"<private-convention>"
pprForeignConvention
::
ForeignConvention
->
SDoc
pprForeignConvention
(
ForeignConvention
c
as
rs
)
=
ppr
c
<>
ppr
as
<>
ppr
rs
...
...
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