diff options
author | mniip <mniip@mniip.com> | 2016-08-30 16:57:47 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-08-30 17:50:51 -0400 |
commit | a25bf2673d0f6db5f454619ddf91f974cace4e8b (patch) | |
tree | 7b56d2ecef4a88999c8743d1ddc97a3b02c6933a /compiler/ghci/ByteCodeItbls.hs | |
parent | 83b326cda759cfd4c538595cf38ee23eb81a4c76 (diff) | |
download | haskell-a25bf2673d0f6db5f454619ddf91f974cace4e8b.tar.gz |
Tag pointers in interpreted constructors
Instead of stg_interp_constr_entry there are now 7 functions (one for
each value of the tag bits) that tag the constructor pointer before
returning. This is consistent with compiled constructors' entry code,
and expectations that compiled code places on compiled constructors. The
iserv protocol is extended with an extra field that explains what
pointer tag the constructor should use.
Test Plan: Added tests for #12523
Reviewers: erikd, bgamari, hvr, austin, simonmar
Reviewed By: simonmar
Subscribers: osa1, thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D2473
GHC Trac Issues: #12523
Diffstat (limited to 'compiler/ghci/ByteCodeItbls.hs')
-rw-r--r-- | compiler/ghci/ByteCodeItbls.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs index 25d4f4a257..8e30234c4f 100644 --- a/compiler/ghci/ByteCodeItbls.hs +++ b/compiler/ghci/ByteCodeItbls.hs @@ -19,6 +19,7 @@ import DataCon ( DataCon, dataConRepArgTys, dataConIdentity ) import TyCon ( TyCon, tyConFamilySize, isDataTyCon, tyConDataCons ) import RepType ( typePrimRep, repTypeArgs ) import StgCmmLayout ( mkVirtHeapOffsets ) +import StgCmmClosure ( tagForCon ) import Util import Panic @@ -68,5 +69,6 @@ make_constr_itbls hsc_env cons = descr = dataConIdentity dcon - r <- iservCmd hsc_env (MkConInfoTable ptrs' nptrs_really conNo descr) + r <- iservCmd hsc_env (MkConInfoTable ptrs' nptrs_really + conNo (tagForCon dflags dcon) descr) return (getName dcon, ItblPtr r) |