[commit: ghc] wip/T12618: ConApp bytecode: Add more ASSERT (e7d8c5a)
git at git.haskell.org
git at git.haskell.org
Thu Oct 6 23:20:07 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T12618
Link : http://ghc.haskell.org/trac/ghc/changeset/e7d8c5a713218329d52954f99aff60a484e00eed/ghc
>---------------------------------------------------------------
commit e7d8c5a713218329d52954f99aff60a484e00eed
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Sun Oct 2 21:19:49 2016 -0400
ConApp bytecode: Add more ASSERT
>---------------------------------------------------------------
e7d8c5a713218329d52954f99aff60a484e00eed
compiler/ghci/ByteCodeGen.hs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/compiler/ghci/ByteCodeGen.hs b/compiler/ghci/ByteCodeGen.hs
index 9f336c8..214a0f0 100644
--- a/compiler/ghci/ByteCodeGen.hs
+++ b/compiler/ghci/ByteCodeGen.hs
@@ -635,7 +635,7 @@ schemeT :: Word -- Stack depth
-> AnnExpr' Id DVarSet
-> BcM BCInstrList
-schemeT d s p (AnnConApp dc args')
+schemeT d s p (AnnConApp dc all_args)
| isUnboxedTupleCon dc
= case args of
[arg2,arg1] | isVAtom arg1 ->
@@ -644,11 +644,12 @@ schemeT d s p (AnnConApp dc args')
unboxedTupleReturn d s p arg1
_other -> multiValException
| otherwise
- = do alloc_con <- mkConAppCode d s p dc (reverse args)
+ = do ASSERT( dataConRepFullArity dc == length all_args ) return ()
+ alloc_con <- mkConAppCode d s p dc (reverse args)
return (alloc_con `appOL`
mkSLIDE 1 (d - s) `snocOL`
ENTER)
- where args = map snd $ dropWhile isAnnTypeArg args'
+ where args = map snd $ dropWhile isAnnTypeArg all_args
schemeT d s p app
-- | trace ("schemeT: env in = \n" ++ showSDocDebug (ppBCEnv p)) False
More information about the ghc-commits
mailing list