[project @ 1998-11-26 09:17:22 by sof]
[ghc-hetmet.git] / ghc / includes / SMClosures.lh
index fc20664..fae88f1 100644 (file)
@@ -532,14 +532,29 @@ we can't traverse the list of all ForeignObjs.)
 The @FreeRoutine@ is a reference to the finalisation routine to call
 when the @ForeignObj@ becomes garbage -- SOF 4/96
 
+[8/97 -- from the p.o.v. of the NCG, it is very convenient if
+the offset to the data field is constant and not dependent on
+what scheme of GC being used by the RTS. So much so, that I'm
+uniformly adding a VHS of 1. For schemes using a copying
+collector, that's the forward field. For the one-space collector,
+it's an unused word. 
+
+If the change is reverted back to what it was (conditional on
+the setting of _INFO_COPYING), then MachMisc.foHS
+needs to be changed accordingly.               -- SOF]
+
 \begin{code}
 #if !defined(PAR)
 
+/* See comment above */
+#  define ForeignObj_VHS                       1
+/*
 # if defined(_INFO_COPYING)
 #  define ForeignObj_VHS                       1
 # else
 #  define ForeignObj_VHS                       0
 # endif
+*/
 
 # define ForeignObj_HS                 (FIXED_HS + ForeignObj_VHS)
 # define ForeignObj_SIZE               (ForeignObj_VHS + 3)
@@ -700,7 +715,7 @@ do {                                 \
 EXTDATA_RO(StablePointerTable_info);
 EXTDATA_RO(EmptyStablePointerTable_info);
 EXTDATA(EmptySPTable_closure);
-extern int ValidateSPTable PROTO(( P_ SPTable ));
+int ValidateSPTable PROTO(( P_ SPTable ));
 
 #  define CHECK_SPT_InfoTable( closure ) \
   ASSERT( (*((PP_) (closure)) == EmptyStablePointerTable_info && (closure == EmptySPTable_closure) ) || \
@@ -1067,7 +1082,11 @@ closures indexed by literal characters.  As with @CONST@ closures,
 #define CHARLIKE_CLOSURE_NoNONPTRS(closure)    (1L)
 
 /* Array of static charlike closures */
+#ifndef aix_TARGET_OS /* AIX gives link errors with consts in this file (RO assembler section) */
 extern const W_ CHARLIKE_closures[];
+#else
+extern W_ CHARLIKE_closures[];
+#endif
 
 /* Macro to retrieve static charlike closure */
 #define CHARLIKE_CLOSURE(the_char) \
@@ -1102,7 +1121,7 @@ the same structure as a @SPEC_1_0@ closure.
 #define INTLIKE_CLOSURE_NoNONPTRS(closure)     (1L)
 
 /* Array of static intlike closures */
-extern P_ INTLIKE_closures;
+extern const P_ INTLIKE_closures;
 
 /* Range of static intlike closures MAX_INTLIKE, MIN_INTLIKE is in GhcConstants.lh */