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

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

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

    colinbenner committed Mar 15, 2012
    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...
  3. Changed the build system to be able to compile the compiler, the runt…

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

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

    colinbenner committed Mar 9, 2012
    … 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
    pointers.
    
    So in some cases the pointers get changed correctly during garbage
    collection but not all cases.
Commits on Mar 7, 2012
Commits on Mar 3, 2012
  1. When the return value of a function is undefined [undef] is used inst…

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

    colinbenner committed Mar 1, 2012
    …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.
Commits on Feb 25, 2012
Commits on Feb 21, 2012
  1. Fixed a couple of bugs in the LLVM back end

    colinbenner committed Feb 21, 2012
    The compiler can now be used to compile itself.  The resulting binary
    however fails during garbage collection.
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

    colinbenner committed Feb 10, 2012
    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.
Commits on Feb 8, 2012
Commits on Feb 3, 2012
  1. Finally fixed the bug that caused an additional "." when printing flo…

    colinbenner committed Feb 3, 2012
    …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.
Commits on Jan 28, 2012
  1. Fixed a couple of bugs that introduced when writing the new intermedi…

    colinbenner committed Jan 28, 2012
    …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.
Commits on Jan 16, 2012
  1. Changed the generation of LLVM IR to use two intermediate representat…

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

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

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

    colinbenner committed Dec 31, 2011
    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.
Commits on Dec 30, 2011
  1. Fixed a bug that caused errors when calculating offsets

    colinbenner committed Dec 30, 2011
    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.
Commits on Dec 28, 2011
  1. Added runtime code, fixed a few bugs, restructured some code

    colinbenner committed Dec 28, 2011
    - added the asmrun, byterun and config directories from the OCaml
      distribution
    - 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
      module
Commits on Dec 21, 2011
  1. Fixed lots of bugs.

    colinbenner committed Dec 21, 2011
    Compiling the standard library works (not sure if the resulting code is
    correct...).
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