X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeItbls.lhs;h=78d18c7efb941a017f36004068a7233c582a3e44;hb=f38310c9d33a263a610005996f32f3d7d2e25c44;hp=12cd47fede6e39d09ad852c9214f6b1f5c6f6b4c;hpb=7d6dffe542bdad5707a929ae7ac25813c586766d;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeItbls.lhs b/compiler/ghci/ByteCodeItbls.lhs index 12cd47f..78d18c7 100644 --- a/compiler/ghci/ByteCodeItbls.lhs +++ b/compiler/ghci/ByteCodeItbls.lhs @@ -48,7 +48,7 @@ itblCode :: ItblPtr -> Ptr () itblCode (ItblPtr ptr) = (castPtr ptr) #ifdef GHCI_TABLES_NEXT_TO_CODE - `plusPtr` (wORD_SIZE * 2) + `plusPtr` (3 * wORD_SIZE) #endif type ItblEnv = NameEnv (Name, ItblPtr) @@ -125,14 +125,11 @@ make_constr_itbls cons } -- Make a piece of code to jump to "entry_label". -- This is the only arch-dependent bit. - -- addr <- newExec [itbl] addrCon <- newExec [conInfoTbl] - let addr = (castFunPtrToPtr addrCon) `plusPtr` 4 -- ToDo: remove magic number --putStrLn ("SIZE of itbl is " ++ show (sizeOf itbl)) --putStrLn ("# ptrs of itbl is " ++ show ptrs) --putStrLn ("# nptrs of itbl is " ++ show nptrs_really) - -- return (getName dcon, ItblPtr (castFunPtrToPtr addr)) - return (getName dcon, ItblPtr addr) + return (getName dcon, ItblPtr (castFunPtrToPtr addrCon)) -- Make code which causes a jump to the given address. This is the