aboutsummaryrefslogtreecommitdiff
path: root/py/mpconfig.h
AgeCommit message (Collapse)Author
2014-07-29Merge pull request #738 from dhylands/except-argsDamien George
Add support for storing args during an exception raised by an irq.
2014-07-28py: Implement __file__ attribute for modules.Paul Sokolovsky
2014-07-25Add support for storing args during an exception raised by an irq.Dave Hylands
The user code should call micropython.alloc_emergency_exception_buf(size) where size is the size of the buffer used to print the argument passed to the exception. With the test code from #732, and a call to micropython.alloc_emergenncy_exception_buf(100) the following error is now printed: ```python >>> import heartbeat_irq Uncaught exception in Timer(4) interrupt handler Traceback (most recent call last): File "0://heartbeat_irq.py", line 14, in heartbeat_cb NameError: name 'led' is not defined ```
2014-07-09moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky
But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
2014-07-03py: Implement sys.maxsize, standard way to check platform "bitness".Paul Sokolovsky
Implementing it as a static constant is a bit peculiar and require cooperation from long int implementation.
2014-07-03Rename machine_(u)int_t to mp_(u)int_t.Damien George
See discussion in issue #50.
2014-06-30Merge pull request #710 from iabdalkader/assertDamien George
Fix assert_func warning/error
2014-06-28py: Add missing #endif.Damien George
2014-06-28Merge branch 'master' into unicodeDamien George
Conflicts: py/mpconfig.h
2014-06-27py: Allow to disable array module and bytearray type.Paul Sokolovsky
array.array and bytearray share big deal of code, so to get real savings, both need to be disabled.
2014-06-27mpconfig.h: Add MICROPY_PY_BUILTINS_STR_UNICODE.Paul Sokolovsky
2014-06-27py: Add portable framework to query/check C stack usage.Paul Sokolovsky
Such mechanism is important to get stable Python functioning, because Python function calling is handled with C stack. The idea is to sprinkle STACK_CHECK() calls in places where there can be C recursion. TODO: Add more STACK_CHECK()'s.
2014-06-21Fix asser_func warning/errormux
* Add while(1) to assert_func to avoid func returns warning * Define a weak attr in mpconfig.h
2014-06-20py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT.Paul Sokolovsky
One thing is wanting to do 1 / 2 and get something else but 0, and quite another - doing rocket science ;-).
2014-06-12py: Revert change of include, "" back to <> for mpconfigport.h.Damien George
2014-06-11py: Fix static defn in qstr; include mpconfigport.h with "" (not <>).Damien George
2014-06-05modgc: Implement return value for gc.collect(), enable on Unix.Paul Sokolovsky
2014-06-01py: Add option to disable set() object (enabled by default).Damien George
2014-06-01Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
2014-05-25py: Don't automatically intern strings in parser.Damien George
This completes non-automatic interning of strings in the parser, so that doc strings don't take up RAM. It complicates the parser and compiler, and bloats stmhal by about 300 bytes. It's complicated because now there are 2 kinds of parse-nodes that can be strings: interned leaves and non-interned structs.
2014-05-24Rename configuration variables controling Python features.Damien George
Now of the form MICROPY_PY_*. See issue #35.
2014-05-21Tidy up some configuration options.Damien George
MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
2014-05-19py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky
io.FileIO is binary I/O, ans actually optional. Default file type is io.TextIOWrapper, which provides str results. CPython3 explicitly describes io.TextIOWrapper as buffered I/O, but we don't have buffering support yet anyway.
2014-05-15objstringio: Implement io.BytesIO.Paul Sokolovsky
Done in generalized manner, allowing any stream class to be specified as working with bytes.
2014-05-11py: Rename MICROPY_SYS_EXIT to MICROPY_MOD_SYS_EXIT.Damien George
For consistency with MICROPY_MOD_SYS_STDFILES, etc.
2014-05-10py, lexer: Add allocation policy config; return NULL if can't allocate.Damien George
2014-05-10modsys: Enable sys.exit() per port after all.Paul Sokolovsky
2014-05-10py: Disable frozenset by default, enable on unix.Paul Sokolovsky
Takes 416 text bytes on x86.
2014-05-10objset: Give up and implement frozenset.Paul Sokolovsky
Tired of patching CPython stdlib for it.
2014-05-10py: Rename byte_code to bytecode everywhere.Damien George
bytecode is the more widely used. See issue #590.
2014-05-09Merge pull request #568 from stinos/windows-msvc-portPaul Sokolovsky
Windows MS Visual C port
2014-05-08py, compiler: Add basic support for A=const(123).Damien George
You can now do: X = const(123) Y = const(456 + X) and the compiler will replace X and Y with their values. See discussion in issue #266 and issue #573.
2014-05-08Windows MSVC portstijn
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
2014-05-07stream: Make non-blcoking stream support configurable.Paul Sokolovsky
Enable only on unix. To avoid unpleasant surprises with error codes.
2014-05-06modgc: Add new module for GC-related functionality.Paul Sokolovsky
2014-05-05py: Turn down amount of RAM parser and compiler use.Damien George
There are 2 locations in parser, and 1 in compiler, where memory allocation is not precise. In the parser it's the rule stack and result stack, in the compiler it's the array for the identifiers in the current scope. All other mallocs are exact (ie they don't allocate more than is needed). This patch adds tuning options (MP_ALLOC_*) to mpconfig.h for these 3 inexact allocations. The inexact allocations in the parser should actually be close to logarithmic: you need an exponentially larger script (absent pathological cases) to use up more room on the rule and result stacks. As such, the default allocation policy for these is now to start with a modest sized stack, but grow only in small increments. For the identifier arrays in the compiler, these now start out quite small (4 entries, since most functions don't have that many ids), and grow incrementally by 6 (since if you have more ids than 4, you probably have quite a few more, but it wouldn't be exponentially more). Partially addresses issue #560.
2014-05-03Add license header to (almost) all files.Damien George
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
2014-05-01py: Add tentative scheme for error messages configuration.Paul Sokolovsky
2014-04-30py: Abstract no-return attribute for functions a bit.Paul Sokolovsky
2014-04-26py: Make collections module configurable, enabled by default.Damien George
2014-04-25py: Add MICROPY_ENABLE_DOC_STRING, disabled by default.Damien George
Also add a few STATIC's to some compile functions that should have them. Addresses issue #521.
2014-04-17py: Rename USE_COMPUTED_GOTOS to USE_COMPUTED_GOTO and enable on stmhal.Damien George
On stmhal, computed gotos make the binary about 1k bigger, but makes it run faster, and we have the room, so why not. All tests pass on pyboard using computed gotos.
2014-04-17py: Add cmath module, for complex math. Disabled by default.Damien George
Not all functions implemented. Not enabled on pyboard.
2014-04-17py: Enable builtin 'property' by default.Damien George
2014-04-15Move entry_table to separated header file.AZ Huang
2014-04-14Merge pull request #479 from lurch/patch-1Damien George
Don't allow both ENDIANNESSes to be set
2014-04-14Make USE_COMPUTED_GOTO a config option in mpconfig.h.Damien George
Disabled by default. Enabled in unix port.
2014-04-14Don't allow both ENDIANNESSes to be setAndrew Scheller
See discussion on https://github.com/micropython/micropython/commit/2da81fa80c4cd965f05ad237d81d9764322fde20 Explicitly set `MP_ENDIANNESS_LITTLE` because that's the #define that is used in code elsewhere.
2014-04-13py: Add property object, with basic functionality.Damien George
Enabled by MICROPY_ENABLE_PROPERTY.
2014-04-13stmhal: Update for static mod sys.Paul Sokolovsky