summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonm <unknown>1999-04-23 13:54:12 +0000
committersimonm <unknown>1999-04-23 13:54:12 +0000
commit18dcf7758b1dd0b87c24ba829ecd32d35b8924cf (patch)
treea4871d36e814114656bfc4c938e26c7392a5e3bb
parent699e9f229be993270e49ff7fcdd155508502c6ea (diff)
downloadhaskell-18dcf7758b1dd0b87c24ba829ecd32d35b8924cf.tar.gz
[project @ 1999-04-23 13:54:12 by simonm]
dataToTag# support.
-rw-r--r--ghc/includes/ClosureMacros.h4
-rw-r--r--ghc/includes/PrimOps.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h
index c44b953ae8..fca822fea4 100644
--- a/ghc/includes/ClosureMacros.h
+++ b/ghc/includes/ClosureMacros.h
@@ -1,5 +1,5 @@
/* ----------------------------------------------------------------------------
- * $Id: ClosureMacros.h,v 1.10 1999/03/23 08:34:07 sof Exp $
+ * $Id: ClosureMacros.h,v 1.11 1999/04/23 13:54:12 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -73,7 +73,7 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
#define INIT_ENTRY(e) code : {}
#define GET_ENTRY(c) stgCast(StgFunPtr,((c)->header.info))
#define ENTRY_CODE(info) (info)
-#define INFO_PTR_TO_STRUCT(info) (stgCast(StgInfoTable*,info) - 1)
+#define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)(info) - 1)
#define get_itbl(c) (stgCast(StgInfoTable*,(c)->header.info) -1)
static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
return stgCast(StgFunPtr,itbl+1);
diff --git a/ghc/includes/PrimOps.h b/ghc/includes/PrimOps.h
index 60305975d6..a18ab8ece9 100644
--- a/ghc/includes/PrimOps.h
+++ b/ghc/includes/PrimOps.h
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: PrimOps.h,v 1.24 1999/03/16 13:20:09 simonm Exp $
+ * $Id: PrimOps.h,v 1.25 1999/04/23 13:54:12 simonm Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -761,6 +761,13 @@ EF_(makeForeignObjzh_fast);
#endif
/* -----------------------------------------------------------------------------
+ Constructor tags
+ -------------------------------------------------------------------------- */
+
+#define dataToTagzh(r,a) r=(GET_TAG(((StgClosure *)a)->header.info))
+/* tagToEnum# is handled directly by the code generator. */
+
+/* -----------------------------------------------------------------------------
Signal processing. Not really primops, but called directly from
Haskell.
-------------------------------------------------------------------------- */