Permalink
Switch branches/tags
Commits on Apr 30, 2012
  1. update cm0 to encode cli arguments as M0 strings

    The code emits a warning and needs a bit of cleanup, but the new
    args_basic test successfully prints out its first arg.  Issues with the
    m0_args.t are probably due a bug in that test.
    cotto committed Apr 30, 2012
  2. comment up the m0 args test

    cotto committed Apr 30, 2012
Commits on Apr 29, 2012
Commits on Apr 27, 2012
Commits on Apr 25, 2012
  1. Increment PC by 1 instead of 4 in m0_poke_caller and c implementation

    Undo workaround for the m0 c implementation. This allows the c and perl
    implementations to both pass the m0_poke_caller test.
    nbrown committed Apr 25, 2012
Commits on Apr 24, 2012
  1. Change how constants are stored

    Use a similar strategy as the callframe storage, store each constant as either
    a uint64_t or a pointer to something larger. This gives integer & floating
    point constants value semantics and strings pointer semantics.
    
    This allows the c implementation to pass all tests using a single deref call
    instead of the double deref previously required for constants with value
    semantics.
    nbrown committed Apr 24, 2012
  2. Revert double derefs

    nbrown committed Apr 24, 2012
Commits on Apr 15, 2012
  1. The in-memory layout of a call frame must be specified

    If it's not specified, operations on the call frame registers will be
    implementation specific.
    nbrown committed Apr 15, 2012
  2. Add the CHUNK_MAP field to the interpreter data

    I'm not sure what this is, but it's missing from the spec and included in the
    perl M0 assembler implementation. Any interpreter using the perl assembler
    needs to know about the field otherwise there will be a mismatch.
    nbrown committed Apr 15, 2012
Commits on Apr 14, 2012
  1. Remove accidental include

    nbrown committed Apr 14, 2012
Commits on Apr 11, 2012
Commits on Apr 9, 2012
  1. Expand tab.

    nbrown committed Apr 9, 2012
  2. Remove interp argument from ops functions.

    The spec says "The current call frame is passed as the first argument to all
    op functions. The remaining three bytes of the op are passed to the op
    function directly."
    
    Since the interpreter is accessible through the call frame, remove the
    interpreter argument and use the call frame.
    nbrown committed Apr 9, 2012
  3. Check to see if the first argument is "kittens"

    The algorithm is simple and makes some assumptions, but it works.
    nbrown committed Apr 9, 2012
  4. Add debugging code to the args test

    If the argc test fails, tell how many arguments were found.
    nbrown committed Apr 9, 2012
  5. Update deref calls to use registers instead of values.

    This make the hash test pass for the c m0 implementation.
    
    All existing m0 tests pass for the c implementation.
    nbrown committed Apr 9, 2012
  6. Fix setting the PC and CF when changing callframe.

    When trying to move the PC forward one op, increment by 4.
    Also, before returning to the caller callframe, set the caller CF to point to
    itself instead of the callee.
    nbrown committed Apr 9, 2012
  7. Update the internal interpretter data storage to match the spec.

    Update the internal storage mechanism to allow indexing into the callframe to
    work correctly. Also, add ARGC and ARGV to the interpetter data array.
    
    This is required to pass the poke_caller and args tests.
    nbrown committed Apr 9, 2012
Commits on Apr 6, 2012
  1. Add a simple placeholder implementation for the gc_alloc op

    This op is required for the poke_caller test.
    nbrown committed Apr 6, 2012
  2. Add get_word and set_word ops

    The get_word op is required for the m0_hash test. The set_word op was added
    for completeness.
    
    This commit makes the C implementation pass the m0_hash test.
    nbrown committed Apr 6, 2012
  3. Change the loading of constants so string metadata is retained

    When loading the consts table, point to the full string
    (length+encoding+string) instead of just the string itself. This will enable
    the length and encoding to be accessed later. This fix requires a fix to the
    print_s op to not print the metadata.
    
    This fix is required for the m0_hash test.
    nbrown committed Apr 6, 2012
Commits on Apr 4, 2012
  1. Implement double deref for I&N registers

    Make deref do what the spec says and make all of the ops do the appropriate
    type interpretation.
    
    Implementing deref this way (and using the current constant segment loading
    method) means that the value types (I&N) need to be dereferenced twice when
    loaded from the constants segment. This commit fixes that in all existing
    tests.
    nbrown committed Apr 4, 2012
Commits on Apr 3, 2012
Commits on Apr 2, 2012