I'm officially on holiday hence the brief response. I'm fairly sure this should be safe, yes.

Cheers,
        Simon

On 04/07/2011 17:28, Max Bolingbroke wrote:
Hi,

I've been looking into fixing #5292, and have found a possible way to
reduce the number of symbols that libHSghc exports. Basically, it
doesn't look like the XXX_srt symbols are ever actually referenced
outside of the object that defines them. This trivial patch stops
marking them as global and hence reduces the number of symbols that
libHSghc exports to ~63k, below the Windows DLL threshold (which is
what I care about):

"""
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 3451c7d..fa2cb48 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -691,7 +691,7 @@ externallyVisibleCLabel (PlainModuleInitLabel _)= True
  externallyVisibleCLabel (RtsLabel _)            = True
  externallyVisibleCLabel (CmmLabel _ _ _)       = True
  externallyVisibleCLabel (ForeignLabel{})       = True
-externallyVisibleCLabel (IdLabel name _ _)     = isExternalName name
+externallyVisibleCLabel (IdLabel name _ info)  = isExternalName name&&  externa
  externallyVisibleCLabel (CC_Label _)           = True
  externallyVisibleCLabel (CCS_Label _)          = True
  externallyVisibleCLabel (DynamicLinkerLabel _ _)  = False
@@ -699,6 +699,10 @@ externallyVisibleCLabel (HpcTicksLabel _)  = True
  externallyVisibleCLabel (LargeBitmapLabel _)    = False
  externallyVisibleCLabel (LargeSRTLabel _)      = False

+externallyVisibleIdLabel :: IdLabelInfo ->  Bool
+externallyVisibleIdLabel SRT = False
+externallyVisibleIdLabel _   = True
+
  -- 
----------------------------------------------------------------------------
  -- Finding the "type" of a CLabel

"""

The resulting tree validates, so this *seems* to be safe.

The question is whether this is *always* safe: Simon?

Cheers,
Max


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to