Switch branches/tags
Nothing to show
Commits on Dec 16, 2011
  1. Allow any type of object to be pushed onto GC stack.

    ingramj committed Dec 16, 2011
    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.
  2. Added a root stack to the garbage collector.

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

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

    ingramj committed Sep 27, 2011
    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.
  2. Added a generic stack data structure.

    ingramj committed Sep 27, 2011
    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.
Commits on Aug 18, 2011
  1. Version bump to 0.3.

    ingramj committed Aug 18, 2011
    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.
Commits on Aug 17, 2011
  1. The parser can read strings now.

    ingramj committed Aug 17, 2011
    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.
  2. Added support for string objects.

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

    ingramj committed Aug 16, 2011
    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.
Commits on Aug 14, 2011
  1. Fix private header protection.

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

    ingramj committed Aug 13, 2011
    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
  2. Started the garbage collector.

    ingramj committed Aug 13, 2011
    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.
Commits on Aug 10, 2011
  1. Added a lot of comments to read.c.

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

    ingramj committed Aug 10, 2011
    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.
Commits on Aug 9, 2011
  1. Added assertions to inline object functions.

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

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

    ingramj committed Aug 9, 2011
    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.
  4. Added symbol objects.

    ingramj committed Aug 9, 2011
    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.
  5. Renamed rs_X_make() and rs_X_value() functions.

    ingramj committed Aug 9, 2011
    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.
  6. Version bump to 0.2.

    ingramj committed Aug 9, 2011
    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.
Commits on Aug 7, 2011
  1. Separate public and private interfaces.

    ingramj committed Aug 7, 2011
    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.
Commits on Aug 5, 2011
  1. Added assertions to check for programming errors.

    ingramj committed Aug 5, 2011
    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
Commits on Aug 3, 2011
  1. Fixed a segfault in rs_buf_str().

    ingramj committed Aug 3, 2011
    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.
  2. Some minor cleanup w.r.t. debugging.

    ingramj committed Aug 3, 2011
    * 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
Commits on Aug 2, 2011
  1. Remove unintentional newlines.

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

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

    ingramj committed Aug 2, 2011
    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.
  4. Minor code cleanup in read.c

    ingramj committed Aug 2, 2011