[project @ 2004-08-09 13:19:29 by simonmar]
authorsimonmar <unknown>
Mon, 9 Aug 2004 13:19:29 +0000 (13:19 +0000)
committersimonmar <unknown>
Mon, 9 Aug 2004 13:19:29 +0000 (13:19 +0000)
commit46d88d870471379348f5661a56dad6ce4d7f5588
tree65b1353bdc9aeffc833ed6fde058717477b0efb2
parenta8601d0e040bf09752e3d0e9b4964e31de12f77b
[project @ 2004-08-09 13:19:29 by simonmar]
Allow case-of-unsafe-ccall to compile to straight-line code, like it
used to.  This has already been fixed on the backend-hacking-branch,
but I'm doing it here so that it can be merged into the STABLE branch,
where it will help to work around a bug.

The bug is in CgExpr.lhs:primRetUnboxedTuple, which picks temporaries
to assign the result of a ccall to.  The Cg monad doesn't have a uniq
supply (in the HEAD), so we always pick the same temporaries.  This
leads to clashes in complex function with multiple ccalls.  Again,
this is already fixed in the backend-hacking-branch.  I don't see an
easy fix for this bug.

The compilation of case-of-unsafe-ccall doesn't suffer from this
problem, and it will help work around some cases of the bug, so I'm
going to merge this onto the STABLE branch after some testing.
ghc/compiler/codeGen/CgCase.lhs