summaryrefslogtreecommitdiff
path: root/py/qstrdefs.h
AgeCommit message (Collapse)Author
2015-05-04modstruct: Group module qstr's together.Paul Sokolovsky
2015-05-04modmachine: Add new module to access hardware, starting with physical memory.Paul Sokolovsky
Refactored from "stm" module, provides mem8, mem16, mem32 objects with array subscript syntax.
2015-04-25modsys: Add basic sys.exc_info() implementation.Paul Sokolovsky
The implementation is very basic and non-compliant and provided solely for CPython compatibility. The function itself is bad Python2 heritage, its usage is discouraged.
2015-04-21py: Add sys.implementation, containing uPy name and version number.Damien George
Uses attrtuple if it's enabled, otherwise just a normal tuple.
2015-04-20py: Make viper codegen raise proper exception (ViperTypeError) on error.Damien George
This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940.
2015-04-04py: Implement delete for property and descriptors.Damien George
Without this patch deleting a property, or class with descriptor, will call the setter with a NULL value and lead to a crash.
2015-04-04objstr: Add .splitlines() method.Paul Sokolovsky
splitlines() occurs ~179 times in CPython3 standard library, so was deemed worthy to implement. The method has subtle semantic differences from just .split("\n"). It is also defined as working for any end-of-line combination, but this is currently not implemented - it works only with LF line-endings (which should be OK for text strings on any platforms, but not OK for bytes).
2015-03-31objtype: Add special unary methods __pos__, __neg__, __invert__.Paul Sokolovsky
Conditional on MICROPY_PY_ALL_SPECIAL_METHODS.
2015-03-26py: Add optional support for descriptors' __get__ and __set__ methods.stijn
Disabled by default. Enabled on unix and windows ports.
2015-03-20py: Implement core of OrderedDict type.Paul Sokolovsky
Given that there's already support for "fixed table" maps, which are essentially ordered maps, the implementation of OrderedDict just extends "fixed table" maps by adding an "is ordered" flag and add/remove operations, and reuses 95% of objdict code, just making methods tolerant to both dict and OrderedDict. Some things are missing so far, like CPython-compatible repr and comparison. OrderedDict is Disabled by default; enabled on unix and stmhal ports.
2015-03-11py: Add support for start/stop/step attributes of builtin range object.Peter D. Gray
2015-02-23py: Implement UnicodeError.Paul Sokolovsky
Still too shy to implement UnicodeEncodeError which was really needed for micropython-lib case.
2015-02-22py: Make math special functions configurable and disabled by default.Damien George
The implementation of these functions is very large (order 4k) and they are rarely used, so we don't enable them by default. They are however enabled in stmhal and unix, since we have the room.
2015-02-22py: Add few more special methods.Paul Sokolovsky
2015-02-15stackctrl: Encode "recursion depth exceeded" message as qstr.Paul Sokolovsky
So corresponding exception can be thrown even under tight memory conditions.
2015-02-14py: Add setattr builtin.stijn
2015-01-31py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it.Paul Sokolovsky
2015-01-21py: Implement __reversed__ slot.Damien George
Addresses issue #1073.
2015-01-11py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1.Damien George
This new config option sets how many fixed-number-of-bytes to use to store the length of each qstr. Previously this was hard coded to 2, but, as per issue #1056, this is considered overkill since no-one needs identifiers longer than 255 bytes. With this patch the number of bytes for the length is configurable, and defaults to 1 byte. The configuration option filters through to the makeqstrdata.py script. Code size savings going from 2 to 1 byte: - unix x64 down by 592 bytes - stmhal down by 1148 bytes - bare-arm down by 284 bytes Also has RAM savings, and will be slightly more efficient in execution.
2015-01-11py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script.Damien George
2015-01-09py: Add MICROPY_PY_MICROPYTHON_MEM_INFO to enable mem-info funcs.Damien George
This allows to enable mem-info functions in micropython module, even if MICROPY_MEM_STATS is not enabled. In this case, you get mem_info and qstr_info but not mem_{total,current,peak}.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2014-12-19py: Add execfile function (from Python 2); enable in stmhal port.Damien George
Adds just 60 bytes to stmhal binary. Addresses issue #362.
2014-12-08modsys: Add sys.print_exception(exc, file=sys.stdout) function.Paul Sokolovsky
The function is modeled after traceback.print_exception(), but unbloated, and put into existing module to save overhead on adding another module. Compliant traceback.print_exception() is intended to be implemented in micropython-lib in terms of sys.print_exception(). This change required refactoring mp_obj_print_exception() to take pfenv_t interface arguments. Addresses #751.
2014-12-01modmicropython: Move mem_info() and qstr_info() functions from unix port.Paul Sokolovsky
TODO: Merge useful functionality from modpyb too.
2014-11-29modubinascii: Add, with hexlify() implementation.Paul Sokolovsky
2014-11-22moduhashlib: Initial module skeleton.Paul Sokolovsky
2014-11-17stream: Implement seek operation support via ioctl, wrapped in generic method.Paul Sokolovsky
Also, implement for unix port.
2014-11-15py: Use __hash__ method if a type defines itstijn
2014-10-31py: Make gc.enable/disable just control auto-GC; alloc is still allowed.Damien George
gc.enable/disable are now the same as CPython: they just control whether automatic garbage collection is enabled or not. If disabled, you can still allocate heap memory, and initiate a manual collection.
2014-10-31py: Add builtin round function.Damien George
Addresses issue #934.
2014-10-25py: Add mp_pending_exception global variable, for VM soft interrupt.Damien George
This allows to implement KeyboardInterrupt on unix, and a much safer ctrl-C in stmhal port. First ctrl-C is a soft one, with hope that VM will notice it; second ctrl-C is a hard one that kills anything (for both unix and stmhal). One needs to check for a pending exception in the VM only for jump opcodes. Others can't produce an infinite loop (infinite recursion is caught by stack check).
2014-10-25py: Implement compile builtin, enabled only on unix port.Damien George
This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
2014-10-23py: Add builtin memoryview object (mostly using array code).Damien George
2014-10-22extmod: Add uheapq module.Damien George
2014-10-22py: Remove unused and unneeded SystemError exception.Damien George
It's purpose is for internal errors that are not catastrophic (ie not as bad as RuntimeError). Since we don't use it, we don't need it.
2014-10-21Implement kwargs for builtin open() and _io.FileIOstijn
This makes open() and _io.FileIO() more CPython compliant. The mode kwarg is fully iplemented. The encoding kwarg is allowed but not implemented; mainly to allow the tests to specify encoding for CPython, see #874
2014-10-18unix, stmhal: Implement file.readinto() method.Paul Sokolovsky
Also, usocket.readinto(). Known issue is that .readinto() should be available only for binary files, but micropython uses single method table for both binary and text files.
2014-10-13modzlibd: Remove, superceded by moduzlib.Paul Sokolovsky
2014-10-13moduzlib: Integrate into the system.Paul Sokolovsky
2014-10-11modure: Initial module, using re1.5 (which is based on re1 codebase).Paul Sokolovsky
https://github.com/pfalcon/re1.5
2014-09-30py: Remove IOError since it's deprecated; use OSError instead.Damien George
In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background.
2014-09-29py: Add casting to viper; add native mem stores to viper.Damien George
Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code.
2014-09-21extmod: Add loads to ujson module.Damien George
2014-09-17py: Add 'builtins' module.Damien George
2014-09-17py: Add native json printing using existing print framework.Damien George
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
2014-09-07Remove skeletal modselect from extmod and just put it in stmhal.Damien George
2014-09-07stmhal: Implement generic select.select and select.poll.Damien George
2014-09-06py: Add support for emitting native x86 machine code.Damien George
2014-08-27Basic native ARM emitterFabian Vogt