aboutsummaryrefslogtreecommitdiff
path: root/py/runtime.c
AgeCommit message (Collapse)Author
2014-03-26Change mp_method_t.name from const char * to qstr.Damien George
Addresses issue #377.
2014-03-26py: Replace mp_const_stop_iteration object with MP_OBJ_NULL.Damien George
2014-03-26py: Add support for user-defined iterators via __iter__, __next__.Damien George
2014-03-25Proper support for registering builtin modules in ROM.Damien George
Comes with some refactoring of code and renaming of files. All modules are now named mod*.[ch].
2014-03-25rt_load_method(): Add missing qstr_str() when getting type name.Paul Sokolovsky
2014-03-23py: Implement support for "except Exception as var" clause.Paul Sokolovsky
For this, needed to implement DELETE_NAME bytecode (because var bound in except clause is automatically deleted at its end). http://docs.python.org/3/reference/compound_stmts.html#except : "When an exception has been assigned using as target, it is cleared at the end of the except clause."
2014-03-23runtime: RT_BINARY_OP_EXCEPTION_MATCH: don't fall thru in case of wrong types.Paul Sokolovsky
2014-03-22py: Remove some unnecessary exception objects.Damien George
2014-03-22py: Add 'object' object.Damien George
2014-03-22Fixed floor division on mp ints and small ints. Added a floordivide test case.Rachel Dowdall
2014-03-22Fixed modulo operator on ints and mp ints to agree with python. Added ↵Rachel Dowdall
intdivmod.c and tests/basics/modulo.py.
2014-03-22Added exception hierarchy except for OSError and UnicodeError (requires ↵Rachel Dowdall
arguments). Comment out the errors that aren't needed if memory becomes an issue.
2014-03-22Merge remote-tracking branch 'upstream/master'Rachel Dowdall
2014-03-22py: Make 'bytes' be a proper type, support standard constructor args.Paul Sokolovsky
2014-03-22py: Make 'str' be a proper type, support standard constructor args.Paul Sokolovsky
2014-03-21py: Allow 'complex()' to take a string as first argument.Damien George
2014-03-21py: Implement parsing of infinity and nan for floats.Damien George
2014-03-20Added ZeroDivisionError to float division.Rachel Dowdall
2014-03-17py: Clean up includes.xbe
Remove unnecessary includes. Add includes that improve portability.
2014-03-12py: Implement integer overflow checking for * and << ops.Damien George
If operation will overflow, a multi-precision integer is created.
2014-03-09py: Fix printing of type name.Damien George
2014-03-08Implement ROMable modules. Add math module.Damien George
mp_module_obj_t can now be put in ROM. Configuration of float type is now similar to longint: can now choose none, float or double as the implementation. math module has basic math functions. For STM port, these are not yet implemented (they are just stub functions).
2014-03-03py: Factor and improve issubclass.Damien George
2014-03-03Add basic collections.namedtuple implementation.Paul Sokolovsky
2014-02-26py: Remove more var arg names fro macros with var args.Damien George
2014-02-26py: Take out bitfield entries from their own structure.Damien George
Don't need to wrap bitfields in their own struct. Compiler does the correct thing without it.
2014-02-22py: Put number parsing code together in parsenum.c.Damien George
2014-02-16Support passing positional args as keywords to bytecode functions.Paul Sokolovsky
For this, record argument names along with each bytecode function. The code still includes extensive debug logging support so far.
2014-02-16Make DEBUG_printf() a proper function, implementation is port-dependent.Paul Sokolovsky
In particular, unix outputs to stderr, to allow to run testsuite against micropython built with debug output (by redirecting stderr to /dev/null).
2014-02-16py: Implement *vargs support.Damien George
Addresses issue #295.
2014-02-15py: Improve exception bases, reduces ROM usage.Damien George
Thanks to @pfalcon for the tip!
2014-02-15py: Pass all scope flags through to runtime.Damien George
2014-02-15Implement proper exception type hierarchy.Damien George
Each built-in exception is now a type, with base type BaseException. C exceptions are created by passing a pointer to the exception type to make an instance of. When raising an exception from the VM, an instance is created automatically if an exception type is raised (as opposed to an exception instance). Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper. Handling of parse error changed to match new exceptions. mp_const_type renamed to mp_type_type for consistency.
2014-02-14Merge pull request #288 from pfalcon/port-builtinsDamien George
Allow ports to define statically builtin functions.
2014-02-14Allow ports to define statically builtin functions.Paul Sokolovsky
Convert unix open() to such.
2014-02-14Implement "from module import *" construct.Paul Sokolovsky
2014-02-12Replace global "static" -> "STATIC", to allow "analysis builds". Part 2.Paul Sokolovsky
2014-02-10Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-02-09Add NotImplementedError.Paul Sokolovsky
2014-02-08py: Add some qstrs to the global table.Damien George
2014-02-06py: Put builtins into ROM table.Damien George
Linear table at the moment, to eventually be replaced with a hash table generated by a preprocessor. Dynamic table is retained so that builtins can be overridden.
2014-02-06Add staticmethod and classmethod to builtin namespace.Damien George
2014-02-05Merge pull request #262 from pfalcon/sys-pathDamien George
Implement sys.path support
2014-02-05py: Add built-in super.Damien George
2014-02-05Implement support for sys.path when loading modules.Paul Sokolovsky
sys.path is not initialized by rt_init(), that's left for platform-specific startup code. (For example, bare metal port may have some hardcoded defaults, and let user change sys.path directly; while port for OS with environment feature can take path from environment). If it's not explicitly initialized, modules will be imported only from a current directory.
2014-02-04Use qstr id to create sys module.Paul Sokolovsky
2014-02-04Add ImportError.Paul Sokolovsky
2014-02-04Expose __import__() function.Paul Sokolovsky
2014-02-03py: Implement builtin exec.Damien George
2014-02-02py: Add very basic implementation of dir() builtin.Damien George
Only works on modules and class instances.