| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the other users of the fptools build system have migrated to
Cabal, and with the move to darcs we can now flatten the source tree
without losing history, so here goes.
The main change is that the ghc/ subdir is gone, and most of what it
contained is now at the top level. The build system now makes no
pretense at being multi-project, it is just the GHC build system.
No doubt this will break many things, and there will be a period of
instability while we fix the dependencies. A straightforward build
should work, but I haven't yet fixed binary/source distributions.
Changes to the Building Guide will follow, too.
|
|
|
|
|
|
|
| |
Tweaks to get the GHC sources through Haddock. Doesn't quite work
yet, because Haddock complains about the recursive modules. Haddock
needs to understand SOURCE imports (it can probably just ignore them
as a first attempt).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now Char, Char#, StgChar have 31 bits (physically 32).
"foo"# is still an array of bytes.
CharRep represents 32 bits (on a 64-bit arch too). There is also
Int8Rep, used in those places where bytes were originally meant.
readCharArray, indexCharOffAddr etc. still use bytes. Storable and
{I,M}Array use wide Chars.
In future perhaps all sized integers should be primitive types. Then
some usages of indexing primops scattered through the code could
be changed to then-available Int8 ones, and then Char variants of
primops could be made wide (other usages that handle text should use
conversion that will be provided later).
I/O and _ccall_ arguments assume ISO-8859-1. UTF-8 is internally used
for string literals (only).
Z-encoding is ready for Unicode identifiers.
Ranges of intlike and charlike closures are more easily configurable.
I've probably broken nativeGen/MachCode.lhs:chrCode for Alpha but I
don't know the Alpha assembler to fix it (what is zapnot?). Generally
I'm not sure if I've done the NCG changes right.
This commit breaks the binary compatibility (of course).
TODO:
* is* and to{Lower,Upper} in Char (in progress).
* Libraries for text conversion (in design / experiments),
to be plugged to I/O and a higher level foreign library.
* PackedString.
* StringBuffer and accepting source in encodings other than ISO-8859-1.
|
|
|
|
|
|
| |
Commiting version of STG -> GOO that seems to compile PrelBase successfully.
Many other wibbles; esp. String handling.
|
|
|
|
|
|
| |
Adding types to the names inside the GOO.
All needed for a langauge with unboxed types ...
|
|
|
|
| |
More wibbles towards compiling data constructors and unboxing correctly.
|
|
|
|
|
| |
Significant reworking of Java code generator, towards
getting unboxing working.
|
|
|
|
|
|
|
|
| |
Adding a field to the Method constructor, to allow methods
to say what they might raise. This is needed to actually
compile generated code.
Also, the generated code now imports haskell.runtime.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First attempt at at class lifter for the GHC GOO backend.
This included a cleanup of the Java/GOO abstract syntax
- Name is now a string, not a list of string
- Type is used instead of name in some places
(for example, with new)
- other minor tweeks.
Andy
---------
Example for myS f g x = f x (g x)
public class myS implements Code {
public Object ENTER () {
VM.COLLECT(3, this);
final Object f = VM.POP();
final Object g = VM.POP();
final Object x = VM.POP();
VM.PUSH(x);
VM.PUSH(new Thunk(new Code(g, x)));
return f;
}
}
class myS$1 {
final Object g;
final Object x;
public myS$1 (Object _g_, Object _x_) {
g = _g_;
x = _x_;
}
public Object ENTER () {
VM.PUSH(x);
return g;
}
}
|
|
Add support for Java generation, written in
a lightning day with Erik Meijer
ghc -J Foo.hs
will do the business, generating Foo.java
The code is in a new directory, javaGen/, so
you'll need to cvs update -d.
I've reorganised main/CodeOutput quite a bit; it
is now much much tidier, and will accommodate new
languages quite easily.
I've also fiddled with the flags that communicate
between the driver and hsc.
GONE: -S= -C=
NEW: -olang=xxx output language xxx
xxx can be: C, asm, java
-ofile=xxx put the output code in file xxx
BEWARE that I might have broken some of the more
cryptic stuff in ghc.lprl.
Simon
|