X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fghci%2FByteCodeGen.lhs;h=bb0f591e288a2d98c640d04125690076d87f4b32;hb=b4470389096913ed1430b077d29a2d1901f3c694;hp=846737e0a6a6ef75a124a6d918a2cdda295b48ff;hpb=066f10289f9711a0f6d0669aea97e134f1be2826;p=ghc-hetmet.git diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs index 846737e..bb0f591 100644 --- a/compiler/ghci/ByteCodeGen.lhs +++ b/compiler/ghci/ByteCodeGen.lhs @@ -427,9 +427,15 @@ schemeE d s p (AnnLet binds (_,body)) return (push_code `appOL` more_push_code) alloc_code = toOL (zipWith mkAlloc sizes arities) - where mkAlloc sz 0 = ALLOC_AP sz + where mkAlloc sz 0 + | is_tick = ALLOC_AP_NOUPD sz + | otherwise = ALLOC_AP sz mkAlloc sz arity = ALLOC_PAP arity sz + is_tick = case binds of + AnnNonRec id _ -> occNameFS (getOccName id) == tickFS + _other -> False + compile_bind d' fvs x rhs size arity off = do bco <- schemeR fvs (x,rhs) build_thunk d' fvs size bco off arity @@ -1519,5 +1525,7 @@ newUnique = BcM $ newId :: Type -> BcM Id newId ty = do uniq <- newUnique - return $ mkSysLocal FSLIT("ticked") uniq ty + return $ mkSysLocal tickFS uniq ty + +tickFS = FSLIT("ticked") \end{code}