Switch branches/tags
Nothing to show
Commits on Mar 25, 2012
  1. Some changes for making debugging easier.

    The garbage collection still does not work...
    colinbenner committed Mar 25, 2012
Commits on Mar 15, 2012
  1. Added debugging statements in the runtime code at the two assertions …

    …that fail during garbage collection
    colinbenner committed Mar 15, 2012
  2. Some changes for debugging the interface to the garbage collector

    The type inference on the Cmm code now assumes every let-binding can
    contain a pointer.  Every argument of function calls and alloc
    instructions is computed, saved on the stack.  They are loaded as soon
    as they are needed to call the function/store the values.  It seemed
    like this might fix the GC-problem, but it did not.  During garbage
    collection some strange bugs occur...
    colinbenner committed Mar 15, 2012
  3. Changed the build system to be able to compile the compiler, the runt…

    …ime and the standard library without copying the the latter two to a new directory
    colinbenner committed Mar 15, 2012
Commits on Mar 9, 2012
  1. Fixed a bug in the allocation functions implemented in assembly that …

    …caused them not to return their actual result.
    colinbenner committed Mar 9, 2012
  2. Added code to store the arguments of allocs and functions potentially…

    … containing pointers on the stack
    Otherwise the garbage collector would not be able to replace those
    pointers by new ones when necessary.  This does not currently handle all
    cases, because my (very simple) type inference algorithm sometimes
    mistakenly thinks of variables as integers when they can actually be
    So in some cases the pointers get changed correctly during garbage
    collection but not all cases.
    colinbenner committed Mar 9, 2012
Commits on Mar 7, 2012
Commits on Mar 3, 2012
  1. When the return value of a function is undefined [undef] is used inst…

    …ead of inttoptr(i64 12456789 to i64*)
    colinbenner committed Mar 3, 2012
Commits on Mar 1, 2012
  1. Removed lots of code from the old native code backend that the new on…

    …e does not need
    This includes options for dumping intermediate data as well es the data
    structures used to represent that data.  In particular Mach and
    Linearize are replaced by a variante used for generating LLVM IR.  Any
    code used for register allocation as well as a lot of amd64-specific
    code are removed completely.
    colinbenner committed Mar 1, 2012
Commits on Feb 25, 2012
Commits on Feb 21, 2012
  1. Fixed a couple of bugs in the LLVM back end

    The compiler can now be used to compile itself.  The resulting binary
    however fails during garbage collection.
    colinbenner committed Feb 21, 2012
Commits on Feb 16, 2012
  1. Fixed exception handling

    colinbenner committed Feb 16, 2012
Commits on Feb 10, 2012
  1. The generated LLVM IR now contains calls to gcroot

    For that to work I added code to work around what seems to be a bug in
    LLVM occuring when using gcroot with the ocaml gc.
    Also a bug concerning exception handling that caused an infinite loop in
    certain when an exception was thrown in a try-with-block that was not
    caught in that block.
    Furthermore changed the runtime code a bit to work with the new
    exception handling.
    colinbenner committed Feb 10, 2012
Commits on Feb 8, 2012
Commits on Feb 3, 2012
  1. Finally fixed the bug that caused an additional "." when printing flo…

    …ating point numbers and a few others
    The generated LLVM was totally wrong for catch statements.  The with
    block was always executed, not just when using the exit statement.
    colinbenner committed Feb 3, 2012
Commits on Jan 28, 2012
  1. Fixed a couple of bugs that introduced when writing the new intermedi…

    …ate representations
    Also fixed the bug that caused floating point numbers to be printed with
    a '.' as the last character, whether there was one already or not.
    Instead the '.' is now only printed, when the fractional part is not 0.
    colinbenner committed Jan 28, 2012
Commits on Jan 16, 2012
  1. Changed the generation of LLVM IR to use two intermediate representat…

    They are inspired by the Mach and Linearize representations.
    colinbenner committed Jan 16, 2012
Commits on Jan 1, 2012
  1. Fixed a bug in the code generator that caused the result of switch st…

    …atements to be undefined
    colinbenner committed Jan 1, 2012
Commits on Dec 31, 2011
  1. Fixed a bug in the runtime code for the AMD64 platform

    The pointer to newly allocated n (n>4) words of memory was stored in
    %r11 instead of the return register %rax.
    colinbenner committed Dec 31, 2011
  2. Changed the attributes of functions in the LLVM IR

    Every function is declared as 'nounwind' because the LLVM backend is
    supposed to use setjmp/longjmp based exception handling.
    Additionally, to make the generated native assembly easier to read, the
    functions are declared as 'noinline', so LLVM does not inline any calls.
    This may be reverted when the main debugging phase is over.
    colinbenner committed Dec 31, 2011
Commits on Dec 30, 2011
  1. Fixed a bug that caused errors when calculating offsets

    The offsets calculated when handling a Calloc were intended to be word
    offsets but were used as byte offsets.
    Programs containing integer arithmetic, printing integers and references
    work as expected. However, converting float to string does not work at
    the moment while converting float to int does.
    colinbenner committed Dec 30, 2011
Commits on Dec 28, 2011
  1. Added runtime code, fixed a few bugs, restructured some code

    - added the asmrun, byterun and config directories from the OCaml
    - fixed a bug that caused the compiled code to load data from the wrong
      address (in particular it looked for some data at an n word offset
      instead of an n byte offset)
    - moved the type definitions for the intermediate data to a separate
    colinbenner committed Dec 28, 2011
Commits on Dec 21, 2011
  1. Fixed lots of bugs.

    Compiling the standard library works (not sure if the resulting code is
    colinbenner committed Dec 21, 2011
Commits on Dec 17, 2011
  1. Fixed a couple of bugs

    colinbenner committed Dec 17, 2011
Commits on Dec 12, 2011
  1. Better LLVM code is produced

    colinbenner committed Dec 12, 2011
Commits on Dec 4, 2011
Commits on Nov 21, 2011