Commits on Feb 12, 2017
  1. add mlibc submodule

    committed Feb 12, 2017
  2. tvm_preprocess: update *src after (re)allocating memory

    During preprocessing, we find directives, and if they specify including
    other source files, we remove the directive, allocate a new block of
    memory, copy the first block, append the new source file, and append the
    second block.
    Previously, the value of the source pointer was passed into the
    preprocessing function. When the memory would be (re)allocated, the
    pointer value could change, but the original pointer would not be
    Now, the pointer is passed by address, and updated when the memory it
    points to changes.
    committed Feb 12, 2017
Commits on Aug 29, 2016
  1. Refactor with a consistent coding style

    This commit refactors the project using a single, consistent coding
    style, derived from the Linux Kernel Coding Style, available here:
    This includes, but is not limited to:
    * Removal of typedefs, especially for structs
    * Limiting lines to a reasonable length, 80 characters, mostly
    * K&R style braces
    * Removal of CamelCase
    committed Aug 29, 2016
Commits on Feb 22, 2015
  1. Merge pull request #30 from ryanpcmcquen/patch-1

    Remove trailing slash from INSTALL_PREFIX
    committed Feb 22, 2015
Commits on Feb 21, 2015
  1. Remove trailing slash from INSTALL_PREFIX

    Otherwise '//' occurs.
    Ryan P.C. McQuen committed Feb 21, 2015
Commits on Oct 15, 2014
  1. Merge pull request #29 from tekknolagi/master

    no need for gotos...
    committed Oct 15, 2014
Commits on Aug 1, 2014
  1. no need for gotos...

    tekknolagi committed Aug 1, 2014
Commits on Jun 8, 2014
  1. Changed default CC to Clang

    Modified source to allow for compiling with both GCC and Clang
    committed Jun 8, 2014
  2. Added item to TODO

    committed Jun 8, 2014
Commits on Mar 24, 2014
Commits on Jan 19, 2014
  1. Merge pull request #28 from PaytonTurnage/master

    Modify htab to have generic function names, and find to be nonredundant.
    bl0ckeduser committed Jan 19, 2014
Commits on Jan 15, 2014
  1. Fix bug where an outdate node is returned.

    If htab_add_core added a node that happened to push the htab past its load
    factor, it would return a pointer to where the added node was *before* the
    rehash. Now it does not do this.
    turnage committed Jan 15, 2014
  2. Rename htab functions; rewrite find to be generic.

    The htab functions find_str and add_str have been renamed to include _ref in
    the places they previously noted _str. These are intended to manage an htab
    containing references to any data; string or not.
    The htab_find function has been divided up. htab_find_core now handles actually
    finding the correct node. htab_find and htab_find_ref are just outward facing
    functions for retrieving a specific kind of data from the node, depending on
    what the htab is used for.
    turnage committed Jan 15, 2014
Commits on Jan 14, 2014
  1. Merge pull request #27 from PaytonTurnage/master

    Implementation for Preprocessor Defines
    committed Jan 14, 2014
  2. Remove assumption that node is in the bottom of the bucket.

    This is the last remaining instance of this assumption.
    turnage committed Jan 14, 2014
Commits on Jan 13, 2014
  1. Do not write a value for strings in htab.

    The assignment is unnecessary, and was overwriting the first element in the bucket (not the added string's value) in the case of a collision.
    turnage committed Jan 13, 2014
  2. Add a new function to return strings from htab.

    The htab_find_str function eliminates the assumption that the string
    is in the first place in the bucket.
    turnage committed Jan 13, 2014
  3. Add preprocessor directives to the SYNTAX file.

    The preprocessor section of the SYNTAX file has been rewritten to match
    the other sections in style, and include both %include and %define
    directives. #27
    turnage committed Jan 13, 2014
  4. Implement defines using the htab structure.

    The htab_structure has been modified in two ways, which should not break
    compatability with any of its uses.
    It includes a void pointer, which is in this commit used to point to a
    string for defines, and will in the future be used to point to the address
    space for words, bytes, and double words.
    It now includes a function htab_add_str specifically for storing strings.
    It calls htab_add so as not to be redundant, but makes the node's value
    their index for the lexer to fetch using htab_find, and assigns their
    void pointer.
    The lexer will now use htab_find on all tokens to see if they are a define
    string, and if so, substitute them with the appropriate token.
    The defines htab is destroyed after lexing, because that memory is done.
    turnage committed Jan 13, 2014
  5. Remove all traces of the tvm_tree structure.

    It is to be replaced with a htab hash table.
    turnage committed Jan 13, 2014
  6. Allow the preprocessor to abort.

    If the preprocessor encounters a problem, such as failing to load a source
    file or an improperly formatted define, it should be able to abort running
    the program.
    turnage committed Jan 13, 2014
  7. Warn on redefining.

    turnage committed Jan 13, 2014
  8. Free the defines memory earlier.

    There is no need to keep this memory for the life of the program.
    turnage committed Jan 13, 2014
  9. Substitute defines with their strings.

    Before allocating space for a token, the lexer will first check to see
    if that token is a defined name. If it is, it will allocate space for
    the defined string instead.
    A test file is included in programs/tinyvm/preprocessor to demonstrate
    the behavior. When functioning, the program will print the fibonacci
    turnage committed Jan 13, 2014
  10. Implement preprocessor defines.

    This commit adds behavior to the preprocessor which fills a tree with
    defines and their replacements. In future commits, the parser will
    substitute instances of the defines with their replacements in the
    source code.
    turnage committed Jan 13, 2014