X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeItbls.lhs;h=2973c03e47f033dfaab7dcf8b20e999cb0658d0b;hb=b648333f6b4c78f7ac1528cd9f780221a058591e;hp=887f637319560b597fa036d7f61ad4c66ed56a8b;hpb=a64842212caee26b992f32fbf451fad7edb17a18;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index 887f637..2973c03 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -279,17 +279,32 @@ instance Storable StgConInfoTable where alignment conInfoTable = SIZEOF_VOID_P peek ptr = runState (castPtr ptr) $ do +#ifdef GHCI_TABLES_NEXT_TO_CODE desc <- load +#endif itbl <- load +#ifndef GHCI_TABLES_NEXT_TO_CODE + desc <- load +#endif return StgConInfoTable - { conDesc = desc + { +#ifdef GHCI_TABLES_NEXT_TO_CODE + conDesc = castPtr $ ptr `plusPtr` wORD_SIZE `plusPtr` desc +#else + conDesc = desc +#endif , infoTable = itbl } poke ptr itbl = runState (castPtr ptr) $ do - store (conDesc itbl) +#ifdef GHCI_TABLES_NEXT_TO_CODE + store (conDesc itbl `minusPtr` (ptr `plusPtr` wORD_SIZE)) +#endif store (infoTable itbl) +#ifndef GHCI_TABLES_NEXT_TO_CODE + store (conDesc itbl) +#endif data StgInfoTable = StgInfoTable { #ifndef GHCI_TABLES_NEXT_TO_CODE