From: simonmar Date: Mon, 30 Jun 2003 14:17:02 +0000 (+0000) Subject: [project @ 2003-06-30 14:17:02 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~723 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=064db46a9881e66a760ab7cf34a819ce8ad0878d [project @ 2003-06-30 14:17:02 by simonmar] comments only. --- diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h index 35140fc..5ddb934 100644 --- a/ghc/includes/ClosureMacros.h +++ b/ghc/includes/ClosureMacros.h @@ -1,5 +1,5 @@ /* ---------------------------------------------------------------------------- - * $Id: ClosureMacros.h,v 1.36 2003/05/14 09:14:01 simonmar Exp $ + * $Id: ClosureMacros.h,v 1.37 2003/06/30 14:17:02 simonmar Exp $ * * (c) The GHC Team, 1998-1999 * @@ -207,6 +207,13 @@ extern StgWord flip; /* These macros are optimised versions of the above for certain * closure types. They *must* be equivalent to the generic * STATIC_LINK. + * + * You may be surprised that the STATIC_LINK field for a THUNK_STATIC + * is at offset 2; that's because a THUNK_STATIC always has two words + * of (non-ptr) padding, to make room for the IND_STATIC that is + * going to overwrite it. It doesn't do any harm, because a + * THUNK_STATIC needs this extra word for the IND_STATIC's saved_info + * field anyhow. Hmm, this is all rather delicate. --SDM */ #define FUN_STATIC_LINK(p) ((p)->payload[0]) #define THUNK_STATIC_LINK(p) ((p)->payload[2])