| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
fixes failures in yesterday's testsuite run
|
| | |
|
| |
|
|
|
|
| |
Yet another attempt at shutdown & interruption. This one appears to
work better; ^C is more responsive in multi threaded / SMP, and I
fixed one case where the runtime wasn't responding to ^C at all.
|
| | |
|
| | |
|
| |
|
|
|
| |
This fixes another instance of a subtle SMP bug (see patch "really
nasty bug in SMP").
|
| | |
|
| |
|
|
|
|
|
| |
This is just an assertion, in effect: we should never enter a PAP, but
for convenience we previously attached the PAP apply code to the PAP
info table. The problem with this was that it makes it harder to track
down bugs that result in entering a PAP...
|
| |
|
|
|
|
|
|
|
|
|
| |
In SMP mode a THUNK can change to an IND at any time. The generic
apply code (stg_ap_p etc.) examines a closure to determine how to
apply it to its arguments, if it is a THUNK it must enter it first in
order to evaluate it. The problem was that in order to enter the
THUNK, we were re-reading the info pointer, and possibly ending up
with an IND instead of the original THUNK. It isn't safe to enter the
IND, because it points to a function (functions are never "entered",
only applied). Solution: we must not re-read the info pointer.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Not sure why it was disabled, probably by accident.
|
| | |
|
| |
|
|
|
| |
Just to keep sanity checking happy, and so we don't need a completely
new closure type.
|
| |
|
|
|
|
| |
Contributed by Duncan Coutts, with changes to merge into the HEAD.
This isn't the full deal, ghc-pkg still modifies files only, but it's
enough to help the Gentoo folk along.
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
I have no idea how to use the testsuite so I'll start
making QuickCheck tests instead.
I've included tests for 'HeaderInfo.getOptions'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the lexer to parse OPTIONS, LANGUAGE and INCLUDE pragmas.
This gives us greater flexibility and far better error
messages. However, I had to make a few quirks:
* The token parser is written manually since Happy doesn't
like lexer errors (we need to extract options before the
buffer is passed through 'cpp'). Still better than
manually parsing a String, though.
* The StringBuffer API has been extended so files can be
read in blocks.
I also made a new field in ModSummary called ms_hspp_opts
which stores the updated DynFlags. Oh, and I took the liberty
of moving 'getImports' into HeaderInfo together with
'getOptions'.
|
| | |
|
| |
|
|
|
|
| |
I'm not sure what really happens here but this is how it's
done in the old HscMain code and it appears to work.
|
| | |
|
| |
|
|
| |
This seems to be required now that we're stealing more registers.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MkIface.writeIfaceFile doesn't check GhcMode anymore. All it does
is what the name say: write an interface to disk.
I've refactored HscMain so the logic is easier to manage. That means
we can avoid running the simplifier when typechecking (: And best of
all, HscMain doesn't use GhcMode at all, anymore!
The new HscMain intro looks like this:
It's the task of the compilation proper to compile Haskell, hs-boot and
core files to either byte-code, hard-code (C, asm, Java, ect) or to
nothing at all (the module is still parsed and type-checked. This
feature is mostly used by IDE's and the likes).
Compilation can happen in either 'one-shot', 'batch', 'nothing',
or 'interactive' mode. 'One-shot' mode targets hard-code, 'batch' mode
targets hard-code, 'nothing' mode targets nothing and 'interactive' mode
targets byte-code.
The modes are kept separate because of their different types and meanings.
In 'one-shot' mode, we're only compiling a single file and can therefore
discard the new ModIface and ModDetails. This is also the reason it only
targets hard-code; compiling to byte-code or nothing doesn't make sense
when we discard the result.
'Batch' mode is like 'one-shot' except that we keep the resulting ModIface
and ModDetails. 'Batch' mode doesn't target byte-code since that require
us to return the newly compiled byte-code.
'Nothing' mode has exactly the same type as 'batch' mode but they're still
kept separate. This is because compiling to nothing is fairly special: We
don't output any interface files, we don't run the simplifier and we don't
generate any code.
'Interactive' mode is similar to 'batch' mode except that we return the
compiled byte-code together with the ModIface and ModDetails.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
In the rare event that a .o file contains more than one flavour of a
[non]lazy pointers sections, resolve all of them, not just one.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
I've changed the name to 'getGhcMode'. If someone changes
it back, please write an explanation above it.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
None of the new code is in use yet.
The current Haskell compiler (HscMain.hscMain) isn't as typed
and as hack-free as we'd like. Here's a list of the things it
does wrong:
* In one shot mode, it returns the new interface as _|_,
when recompilation isn't required. It's then up to the
users of hscMain to keep their hands off the result.
* (Maybe ModIface) is passed around when it's known that it's
a Just. Hey, we got a type-system, let's use it.
* In one shot mode, the backend is returning _|_ for the
new interface. This is done to prevent space leaks since
we know that the result of a one shot compilation is never
used. Again, it's up to the users of hscMain to keep their
hands off the result.
* It is allowed to compile a hs-boot file to bytecode even
though that doesn't make sense (it always returns
Nothing::Maybe CompiledByteCode).
* Logic and grunt work is completely mixed. The frontend
and backend keeps checking what kind of input they're handling.
This makes it very hard to get an idea of what the functions
actually do.
* Extra work is performed when using a null code generator.
The new code refactors out the frontends (Haskell, Core), the
backends (Haskell, boot) and the code generators (one-shot, make,
nothing, interactive) and allows them to be combined in typesafe ways.
A one-shot compilation doesn't return new interfaces at all so we
don't need the _|_ space-leak hack. In 'make' mode (when not
targeting bytecode) the result doesn't contain
Nothing::Maybe CompiledByteCode. In interactive mode, the result
is always a CompiledByteCode. The code gens are completely separate
so compiling to Nothing doesn't perform any extra work.
DriverPipeline needs a bit of work before it can use the new
API.
|
| |
|
|
|
| |
When the volatile regs attached to a CmmCall is Nothing, it means
"save everything", not "save nothing".
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
After a long hunt I discovered that the reason that GHC.Enum.eftIntFB
was being marked as a loop-breaker was the bizare behaviour of exprFreeVars,
which returned not only the free variables of an expression but also the
free variables of RULES attached to variables occuring in the expression!
This was clearly deliberate (the comment was CoreFVs rev 1.1 in 1999) but
I've removed it; I've left the comment with further notes in case there
turns out to be a Deep Reason.
|