summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorKirsten Chevalier <chevalier@alum.wellesley.edu>2007-01-11 17:25:01 +0000
committerKirsten Chevalier <chevalier@alum.wellesley.edu>2007-01-11 17:25:01 +0000
commitc098722488ee64a5288a9f20352310cfd08ae86b (patch)
treee7a07417c0f6bcbd754f235a7c3b21c83409168e /compiler
parent06435c511c76ba7d084af3c9420614e167f4a9e5 (diff)
downloadhaskell-c098722488ee64a5288a9f20352310cfd08ae86b.tar.gz
Remove bogus assertion in getCallMethod
With my as-yet-uncommitted changes to the demand analyzer, code got generated for some programs that caused this assertion to fail. The transformation I was doing was correct; it was the assertion that wasn't. So, the assertion is removed. This is actually Simon PJ's patch rather than mine, but I noticed that it wasn't checked in and it seems completely safe to do so.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/codeGen/ClosureInfo.lhs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs
index e6319898db..27aed3a70e 100644
--- a/compiler/codeGen/ClosureInfo.lhs
+++ b/compiler/codeGen/ClosureInfo.lhs
@@ -594,7 +594,13 @@ getCallMethod this_pkg name (LFThunk _ _ updatable std_form_info is_fun) n_args
if we enter the same thunk multiple times, so the optimisation
of jumping directly to the entry code is still valid. --SDM
-}
- = ASSERT2( n_args == 0, ppr name ) EnterIt
+ = EnterIt
+ -- We used to have ASSERT( n_args == 0 ), but actually it is
+ -- possible for the optimiser to generate
+ -- let bot :: Int = error Int "urk"
+ -- in (bot `cast` unsafeCoerce Int (Int -> Int)) 3
+ -- This happens as a result of the case-of-error transformation
+ -- So the right thing to do is just to enter the thing
| otherwise -- Jump direct to code for single-entry thunks
= ASSERT( n_args == 0 )