diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2013-08-26 13:34:15 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-10-01 22:26:38 -0700 |
commit | b23ba2a7d612c6b466521399b33fe9aacf5c4f75 (patch) | |
tree | 83b044b5fb30cd0fa6256af61d38b96a5792cff0 /compiler/codeGen/StgCmmUtils.hs | |
parent | 644c76a3574a623fa5d2a9a28d8e6fc971aca901 (diff) | |
download | haskell-b23ba2a7d612c6b466521399b33fe9aacf5c4f75.tar.gz |
Place static closures in their own section.
Summary:
The primary reason for doing this is assisting debuggability:
if static closures are all in the same section, they are
guaranteed to be adjacent to one another. This will help
later when we add some code that takes section start/end and
uses this to sanity-check the sections.
Part of remove HEAP_ALLOCED patch set (#8199)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Test Plan: validate
Reviewers: simonmar, austin
Subscribers: simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D263
GHC Trac Issues: #8199
Diffstat (limited to 'compiler/codeGen/StgCmmUtils.hs')
-rw-r--r-- | compiler/codeGen/StgCmmUtils.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs index d47a01661a..8b3616f2f0 100644 --- a/compiler/codeGen/StgCmmUtils.hs +++ b/compiler/codeGen/StgCmmUtils.hs @@ -12,6 +12,7 @@ module StgCmmUtils ( cgLit, mkSimpleLit, emitDataLits, mkDataLits, emitRODataLits, mkRODataLits, + emitStaticClosure, emitRtsCall, emitRtsCallWithResult, emitRtsCallGen, assignTemp, newTemp, @@ -320,6 +321,11 @@ emitRODataLits :: CLabel -> [CmmLit] -> FCode () -- Emit a read-only data block emitRODataLits lbl lits = emitDecl (mkRODataLits lbl lits) +emitStaticClosure :: CLabel -> [CmmLit] -> FCode () +-- Emit a static closure data block, which is only used at startup time. +-- Eventually make this READ ONLY(?) +emitStaticClosure lbl lits = emitDecl (mkDataLits StaticClosures lbl lits) + newStringCLit :: String -> FCode CmmLit -- Make a global definition for the string, -- and return its label |