X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Fstorage.c;h=9d743bf8d175dfab100fbad427c1686b85ae1f5e;hb=28e20e46916730ff49ad0b7a41ce5b468431dc73;hp=c773541e65d458d2b4d986776beb4fdb2e6bcb11;hpb=651aa871b2fa8935721d9b0f54c4502dc33ff808;p=ghc-hetmet.git diff --git a/ghc/interpreter/storage.c b/ghc/interpreter/storage.c index c773541..9d743bf 100644 --- a/ghc/interpreter/storage.c +++ b/ghc/interpreter/storage.c @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: storage.c,v $ - * $Revision: 1.75 $ - * $Date: 2000/05/09 17:38:19 $ + * $Revision: 1.78 $ + * $Date: 2000/06/23 13:13:10 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -21,6 +21,13 @@ #include #include "Stg.h" +/* #include "Storage.h" + We'd like to, but Storage.h and storage.h look the same under + Cygwin, alas, causing compilation chaos. So just copy what + we need to know, which is ... +*/ +extern StgClosure* MarkRoot ( StgClosure* ); + /*#define DEBUG_SHOWUSE*/ /* -------------------------------------------------------------------------- @@ -1914,15 +1921,18 @@ OSectionKind lookupSection ( void* ad ) ObjectCode* oc; OSectionKind sect; + /* speedup hack */ + if (!combined) return HUGS_SECTIONKIND_OTHER; + for (m = MODULE_BASE_ADDR; m < MODULE_BASE_ADDR+tabModuleSz; m++) { if (tabModule[m-MODULE_BASE_ADDR].inUse) { - if (module(m).object) { - sect = ocLookupSection ( module(m).object, ad ); + if (tabModule[m-MODULE_BASE_ADDR].object) { + sect = ocLookupSection ( tabModule[m-MODULE_BASE_ADDR].object, ad ); if (sect != HUGS_SECTIONKIND_NOINFOAVAIL) return sect; } - for (oc = module(m).objectExtras; oc; oc=oc->next) { + for (oc = tabModule[m-MODULE_BASE_ADDR].objectExtras; oc; oc=oc->next) { sect = ocLookupSection ( oc, ad ); if (sect != HUGS_SECTIONKIND_NOINFOAVAIL) return sect; @@ -1944,7 +1954,7 @@ void markHugsObjects( void ) for ( nm = NAME_BASE_ADDR; nm < NAME_BASE_ADDR+tabNameSz; ++nm ) { if (tabName[nm-NAME_BASE_ADDR].inUse) { - Cell cl = name(nm).closure; + Cell cl = tabName[nm-NAME_BASE_ADDR].closure; if (nonNull(cl)) { assert(isCPtr(cl)); snd(cl) = (Cell)MarkRoot ( (StgClosure*)(snd(cl)) ); @@ -1955,14 +1965,13 @@ void markHugsObjects( void ) for ( tc = TYCON_BASE_ADDR; tc < TYCON_BASE_ADDR+tabTyconSz; ++tc ) { if (tabTycon[tc-TYCON_BASE_ADDR].inUse) { - Cell cl = tycon(tc).closure; + Cell cl = tabTycon[tc-TYCON_BASE_ADDR].closure; if (nonNull(cl)) { assert(isCPtr(cl)); snd(cl) = (Cell)MarkRoot ( (StgClosure*)(snd(cl)) ); } } } - }