projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix an assertion
[ghc-hetmet.git]
/
rts
/
Sanity.c
diff --git
a/rts/Sanity.c
b/rts/Sanity.c
index
a2ddff8
..
c9a0772
100644
(file)
--- a/
rts/Sanity.c
+++ b/
rts/Sanity.c
@@
-204,12
+204,13
@@
checkStackChunk( StgPtr sp, StgPtr stack_end )
}
static void
}
static void
-checkPAP (StgClosure *fun, StgClosure** payload, StgWord n_args)
+checkPAP (StgClosure *tagged_fun, StgClosure** payload, StgWord n_args)
{
{
+ StgClosure *fun;
StgClosure *p;
StgFunInfoTable *fun_info;
StgClosure *p;
StgFunInfoTable *fun_info;
- fun = UNTAG_CLOSURE(fun);
+ fun = UNTAG_CLOSURE(tagged_fun);
ASSERT(LOOKS_LIKE_CLOSURE_PTR(fun));
fun_info = get_fun_itbl(fun);
ASSERT(LOOKS_LIKE_CLOSURE_PTR(fun));
fun_info = get_fun_itbl(fun);
@@
-235,6
+236,9
@@
checkPAP (StgClosure *fun, StgClosure** payload, StgWord n_args)
n_args );
break;
}
n_args );
break;
}
+
+ ASSERT(fun_info->f.arity > TAG_MASK ? GET_CLOSURE_TAG(tagged_fun) == 1
+ : GET_CLOSURE_TAG(tagged_fun) == fun_info->f.arity);
}
}
@@
-256,7
+260,8
@@
checkClosure( StgClosure* p )
info = get_itbl(p);
switch (info->type) {
info = get_itbl(p);
switch (info->type) {
- case MVAR:
+ case MVAR_CLEAN:
+ case MVAR_DIRTY:
{
StgMVar *mvar = (StgMVar *)p;
ASSERT(LOOKS_LIKE_CLOSURE_PTR(mvar->head));
{
StgMVar *mvar = (StgMVar *)p;
ASSERT(LOOKS_LIKE_CLOSURE_PTR(mvar->head));