Modified parser and interpreter so that every bytecode program must contain a function called main in order to run. main() should return an integer value. FIXME: The lists called strings are really names. These should be refactored to make it easier to add a real string type later on.
Tests refactored and new tests added to ensure that all bytecode programs start with a function called main which returns an integer value.
Moved src/ to rcsp/ and added a __init__.py to make it a package.
Added the py.test testing framework to the repo.
Added test data to all example bytecode files
Added py.test test scripts which look for test data in all example*.cspc files in the tests/ directory and use this to test the parser and interpreter.
Addd pytest framework and scratch file to .gitignore
src/ files deleted and moved to rcsp/. This change should have been committed with the creation of rcsp/ :(
Forgot a file extension in .gitignore
pytest now using pytest.mark.parametrize to split multiple tests into single tests, making it easier to view failures
Improved pretty printer. Now showing both the data in data segments and the indices of those data.
Removed needless path munging code from test scripts
Memoised access to OPCODE dict. Fixed small bug in implementation of RETURN.
Modified all tests to take account of the fact that the stack always contains boxed values. Modified the way asserts are done in test_interpreter for the same reason.
Changed all pretty_print type methods to __repr__ to be more Pythonic
Fixed bug found by the pypy type checker, was checking an int against OPCODES keys rather than values
Tidied up printing and converting to strings. rpython typechecker has been satisfied.
Added scripts to run unit tests and translate the interpreter to native. Both check the DEBUG flag and will not let the user go futher if DEBUG is inappropriately set.
RETURN now takes no arguments and returns whatever is at the top of the stack
Translate now produces a binary called rcsp. The trace script runs the rcsp executable with JIT tracing turned on. .gitignore updated to reflect these changes.