From: sof Date: Mon, 25 Aug 1997 21:02:41 +0000 (+0000) Subject: [project @ 1997-08-25 21:02:41 by sof] X-Git-Tag: Approximately_1000_patches_recorded~142 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c4992dba355e7c3f50bbc382ae1b587ba4346dfa;p=ghc-hetmet.git [project @ 1997-08-25 21:02:41 by sof] Offset of data field within ForeignObj made constant across different GC schemes --- diff --git a/ghc/includes/SMClosures.lh b/ghc/includes/SMClosures.lh index 37b642d..fae88f1 100644 --- a/ghc/includes/SMClosures.lh +++ b/ghc/includes/SMClosures.lh @@ -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)