[project @ 2002-12-11 15:36:20 by simonmar]
authorsimonmar <unknown>
Wed, 11 Dec 2002 15:36:58 +0000 (15:36 +0000)
committersimonmar <unknown>
Wed, 11 Dec 2002 15:36:58 +0000 (15:36 +0000)
commit0bffc410964e1688ad80d277d53400659e697ab5
tree6d66046c9e2275f0dcbeaf427864fd84b032781b
parenta63622cce9c14fe985cb870cf95984fa4e61e508
[project @ 2002-12-11 15:36:20 by simonmar]
Merge the eval-apply-branch on to the HEAD
------------------------------------------

This is a change to GHC's evaluation model in order to ultimately make
GHC more portable and to reduce complexity in some areas.

At some point we'll update the commentary to describe the new state of
the RTS.  Pending that, the highlights of this change are:

  - No more Su.  The Su register is gone, update frames are one
    word smaller.

  - Slow-entry points and arg checks are gone.  Unknown function calls
    are handled by automatically-generated RTS entry points (AutoApply.hc,
    generated by the program in utils/genapply).

  - The stack layout is stricter: there are no "pending arguments" on
    the stack any more, the stack is always strictly a sequence of
    stack frames.

    This means that there's no need for LOOKS_LIKE_GHC_INFO() or
    LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know
    how to find the boundary between the text and data segments (BIG WIN!).

  - A couple of nasty hacks in the mangler caused by the neet to
    identify closure ptrs vs. info tables have gone away.

  - Info tables are a bit more complicated.  See InfoTables.h for the
    details.

  - As a side effect, GHCi can now deal with polymorphic seq.  Some bugs
    in GHCi which affected primitives and unboxed tuples are now
    fixed.

  - Binary sizes are reduced by about 7% on x86.  Performance is roughly
    similar, some programs get faster while some get slower.  I've seen
    GHCi perform worse on some examples, but haven't investigated
    further yet (GHCi performance *should* be about the same or better
    in theory).

  - Internally the code generator is rather better organised.  I've moved
    info-table generation from the NCG into the main codeGen where it is
    shared with the C back-end; info tables are now emitted as arrays
    of words in both back-ends.  The NCG is one step closer to being able
    to support profiling.

This has all been fairly thoroughly tested, but no doubt I've messed
up the commit in some way.
112 files changed:
ghc/compiler/HsVersions.h
ghc/compiler/absCSyn/AbsCSyn.lhs
ghc/compiler/absCSyn/AbsCUtils.lhs
ghc/compiler/absCSyn/CLabel.lhs
ghc/compiler/absCSyn/Costs.lhs
ghc/compiler/absCSyn/PprAbsC.lhs
ghc/compiler/codeGen/CgBindery.lhs
ghc/compiler/codeGen/CgCase.lhs
ghc/compiler/codeGen/CgClosure.lhs
ghc/compiler/codeGen/CgCon.lhs
ghc/compiler/codeGen/CgConTbls.lhs
ghc/compiler/codeGen/CgExpr.lhs
ghc/compiler/codeGen/CgHeapery.lhs
ghc/compiler/codeGen/CgLetNoEscape.lhs
ghc/compiler/codeGen/CgMonad.lhs
ghc/compiler/codeGen/CgStackery.lhs
ghc/compiler/codeGen/CgTailCall.lhs
ghc/compiler/codeGen/CgUpdate.lhs
ghc/compiler/codeGen/CgUsages.lhs
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/codeGen/SMRep.lhs
ghc/compiler/count_lines
ghc/compiler/ghci/ByteCodeAsm.lhs
ghc/compiler/ghci/ByteCodeFFI.lhs
ghc/compiler/ghci/ByteCodeGen.lhs
ghc/compiler/ghci/ByteCodeInstr.lhs
ghc/compiler/ghci/ByteCodeLink.lhs
ghc/compiler/ghci/Linker.lhs
ghc/compiler/main/Constants.lhs
ghc/compiler/nativeGen/AbsCStixGen.lhs
ghc/compiler/nativeGen/AsmCodeGen.lhs
ghc/compiler/nativeGen/MachMisc.lhs
ghc/compiler/nativeGen/MachRegs.lhs
ghc/compiler/nativeGen/Stix.lhs
ghc/compiler/nativeGen/StixInfo.lhs [deleted file]
ghc/compiler/nativeGen/StixMacro.lhs
ghc/compiler/nativeGen/StixPrim.lhs
ghc/compiler/parser/hschooks.c
ghc/compiler/prelude/PrimRep.lhs
ghc/compiler/prelude/primops.txt.pp
ghc/compiler/stgSyn/CoreToStg.lhs
ghc/driver/mangler/ghc-asm.lprl
ghc/includes/Block.h
ghc/includes/Bytecodes.h
ghc/includes/ClosureMacros.h
ghc/includes/ClosureTypes.h
ghc/includes/Closures.h
ghc/includes/Constants.h
ghc/includes/InfoMacros.h
ghc/includes/InfoTables.h
ghc/includes/MachDeps.h
ghc/includes/MachRegs.h
ghc/includes/Regs.h
ghc/includes/RtsFlags.h
ghc/includes/SchedAPI.h
ghc/includes/Stg.h
ghc/includes/StgFun.h [new file with mode: 0644]
ghc/includes/StgMacros.h
ghc/includes/StgMiscClosures.h
ghc/includes/StgTicky.h
ghc/includes/StgTypes.h
ghc/includes/TSO.h
ghc/includes/Updates.h
ghc/includes/mkDerivedConstants.c
ghc/includes/mkNativeHdr.c
ghc/mk/paths.mk
ghc/rts/Apply.h [new file with mode: 0644]
ghc/rts/Apply.hc [new file with mode: 0644]
ghc/rts/Capability.c
ghc/rts/ClosureFlags.c
ghc/rts/Disassembler.c
ghc/rts/Exception.h
ghc/rts/Exception.hc
ghc/rts/GC.c
ghc/rts/GCCompact.c
ghc/rts/HeapStackCheck.hc
ghc/rts/Interpreter.c
ghc/rts/Interpreter.h
ghc/rts/LdvProfile.c
ghc/rts/Linker.c
ghc/rts/LinkerBasic.c [deleted file]
ghc/rts/MBlock.c
ghc/rts/Makefile
ghc/rts/PrimOps.hc
ghc/rts/Printer.c
ghc/rts/Printer.h
ghc/rts/ProfHeap.c
ghc/rts/Proftimer.c
ghc/rts/RetainerProfile.c
ghc/rts/Rts.h [moved from ghc/includes/Rts.h with 97% similarity]
ghc/rts/RtsAPI.c
ghc/rts/RtsFlags.c
ghc/rts/RtsStartup.c
ghc/rts/RtsUtils.c
ghc/rts/Sanity.c
ghc/rts/Sanity.h
ghc/rts/Schedule.c
ghc/rts/Signals.c
ghc/rts/StgCRun.c
ghc/rts/StgMiscClosures.hc
ghc/rts/StgStartup.hc
ghc/rts/StgStdThunks.hc
ghc/rts/Storage.c
ghc/rts/Storage.h
ghc/rts/StoragePriv.h
ghc/rts/Ticky.c
ghc/rts/Updates.hc
ghc/rts/Weak.c
ghc/tests/ghci/prog001/C.hs
ghc/utils/Makefile
ghc/utils/genapply/GenApply.hs [new file with mode: 0644]
ghc/utils/genapply/Makefile [new file with mode: 0644]