Commits on Dec 16, 2011
  1. Allow any type of object to be pushed onto GC stack.

    This makes things a lot simpler, since the caller doesn't need to
    check the object type before pushing, or keep track of how many pops
    are needed.
    committed Dec 16, 2011
  2. Added a root stack to the garbage collector.

    rs_gc_mark() has also been implemented. None of this code has been
    tested yet.
    committed Dec 16, 2011
Commits on Sep 29, 2011
  1. Added pair objects.

    The reader doesn't support them yet, and they haven't been very well
    committed Sep 29, 2011
Commits on Sep 27, 2011
  1. Moved the stack test function into stack.c.

    Other tests might be written for the other components of ReScheme.
    They won't be full unit tests, but they'll be better than nothing.
    committed Sep 27, 2011
  2. Added a generic stack data structure.

    It'll be needed in the parser, and possibly other areas.
    The frequency of commits has dropped off, and will remain low for at
    least the next few months because I'm back in school. The project
    hasn't been abandoned, but it does have a lower priority now.
    committed Sep 27, 2011
Commits on Aug 18, 2011
  1. Version bump to 0.3.

    I've decided to hold off on parsing octal and hexadecimal escape
    sequences in strings until it's actually needed. The next major step
    will be lists (and possibly vectors), at which point I will be able to
    start on environments and the evaluator.
    committed Aug 18, 2011
Commits on Aug 17, 2011
  1. The parser can read strings now.

    rs_write() can print out strings with escape sequences. Once rs_read()
    can handle reading in hex and octal escape sequences (and hex character
    literals), I think I'll tag v0.3.
    committed Aug 17, 2011
  2. Added support for string objects.

    But the parser can't read strings yet.
    committed Aug 17, 2011
Commits on Aug 16, 2011
  1. Added a symbol table.

    I decided to go with a regular hash table instead of a ternary search
    tree, mostly because it's easier to remove symbols from a hash table.
    committed Aug 16, 2011
Commits on Aug 14, 2011
  1. Fix private header protection.

    committed Aug 14, 2011
Commits on Aug 13, 2011
  1. Don't search heap from the beginning.

    Allocating an object still involves a linear search of the heap, but
    now the search starts where it last left off, rather than from the
    committed Aug 13, 2011
  2. Started the garbage collector.

    It's a mark and sweep collector, but since there are no root objects
    yet, the mark pass doesn't do anything.
    The heap has a fixed size for now, but later on I'll make it growable.
    There isn't much point until there are objects that aren't subject to
    immediate collection.
    committed Aug 13, 2011
Commits on Aug 10, 2011
  1. Added a lot of comments to read.c.

    I'm pretty bad about not commenting things, and the parser is kind of
    committed Aug 10, 2011
  2. Wrote a generic object cleanup function.

    Instead of having global cleanup functions for each type of object, now
    there is a single rs_object_release() function that takes care of
    releasing any "extra" resources used by an object (strings, files, etc).
    Eventually rs_object_release() will be made static, and the garbage
    collector will call it just before it frees an object. For now, the
    function is global, and it also takes care of freeing the object itself.
    committed Aug 10, 2011
Commits on Aug 9, 2011
  1. Added assertions to inline object functions.

    Just to make sure that they aren't given an object of the wrong type.
    committed Aug 9, 2011
  2. ; should be a delimiter

    committed Aug 9, 2011
  3. rs_read() can parse symbols.

    Mostly, anyway. R5RS says that '...' is a valid identifier. ReScheme
    doesn't support it yet, but will when I get around to adding macros.
    Next up is the symbol table (probably a ternary search tree), and then,
    hopefully, garbage collection.
    committed Aug 9, 2011
  4. Added symbol objects.

    With some big caveats:
     * rs_read() doesn't support them yet.
     * There isn't a symbol table yet, so identical symbols don't share
       memory for their C strings.
     * There's no garbage collection yet, so they have to be freed manually.
    committed Aug 9, 2011
  5. Renamed rs_X_make() and rs_X_value() functions.

    The new names are rs_X_to_obj() and rs_obj_to_X(), which more accurately
    reflect what they do.
    The new names will also avoid confusion when functions that create heap
    objects are written: rs_symbol_make() and rs_symbol_create() sound like
    they should do similar things, but rs_symbol_to_obj() and
    rs_symbol_create() are more easily distinguished.
    committed Aug 9, 2011
  6. Version bump to 0.2.

    Seems like as good a time as any, since I've added the rest of the
    "immediate" object types, and I'm about to start adding heap objects.
    The last several commits haven't added any new features, but made
    improvements that will make adding new features a bit easier.
    committed Aug 9, 2011
Commits on Aug 7, 2011
  1. Separate public and private interfaces.

    Functions and declarations that need to be global, but should not be
    used directly in other files, have been removed from rescheme.h, and
    placed into a separate "private" header file. That way implementation
    changes can be made without affecting other files.
    In particular, details about how objects are represented internally are
    now hidden.
    committed Aug 7, 2011
Commits on Aug 5, 2011
  1. Added assertions to check for programming errors.

    Mostly they just make sure that function arguments are reasonable.
    There are also some that check rs_buf's invariants in buffer.c. There
    will be similar assertions for any additional data structures that are
    committed Aug 5, 2011
Commits on Aug 3, 2011
  1. Fixed a segfault in rs_buf_str().

    It was triggered by the input "#b" (or any other radix letter).
    ST_BINARY (for example) would call check_num with an empty buffer, which
    in turn called rs_buf_str(). rs_buf_str() writes a '\0' character to the
    buffer in order to terminate the string. Since the buffer was empty
    (buf->buf == NULL), trying to write to it caused a segfault. Two changes
    were made:
    * rs_buf_str() returns an empty string if the buffer is empty. This
      prevents the segfault.
    * ST_HASH explicitly checks to see if a radix character is followed by a
      delimiter. This prevents check_num() from being called with an empty
      buffer in the first place. (Otherwise, "#b" would evaluate to 0).
    The moral of this story: Input isn't always reasonable, so don't just
    test reasonable input.
    committed Aug 3, 2011
  2. Some minor cleanup w.r.t. debugging.

    * Added a "release" CFLAGS line to Makefile, to turn off debugging.
    * Added "rs_object obj = rs_eof" at the top of rs_read, because GCC
      thinks that  might not be initialized otherwise. Clang seems to know
    committed Aug 3, 2011
Commits on Aug 2, 2011
  1. Remove unintentional newlines.

    committed Aug 2, 2011
  2. Split up the ST_CHARACTER state in rs_read().

    There was too much going on in ST_CHARACTER, so now there are states
    that check for #\newline, #\space, and #\tab.
    committed Aug 2, 2011
  3. Added character literals.

    Character literals are as described in R5RS, with two exceptions:
    * "#\ " is not supported. You must use "#\space".
    * You can write a tab character as "#\tab".
    Booleans, empty lists, and end-of-file will be added soon.
    committed Aug 2, 2011
  4. Minor code cleanup in read.c

    committed Aug 2, 2011