summaryrefslogtreecommitdiffstatshomepage
path: root/py
Commit message (Collapse)AuthorAge
* py: Fix stack access in thumb native emitter.Damien George2014-05-07
|
* py: Fix emitcpy, to work with latest changes to PASS variables.Damien George2014-05-07
|
* py: Improve native emitter; now supports more opcodes.Damien George2014-05-07
|
* py, compiler: Improve passes; add an extra pass for native emitter.Damien George2014-05-07
|
* py, compiler: Start adding support for compile-time constants.Damien George2014-05-07
| | | | Just a start, no working code yet. As per issue #573.
* stream: Make non-blcoking stream support configurable.Paul Sokolovsky2014-05-07
| | | | Enable only on unix. To avoid unpleasant surprises with error codes.
* stream: Use standard name of DEFAULT_BUFFER_SIZE.Paul Sokolovsky2014-05-07
|
* stream: Add compliant handling of non-blocking readall().Paul Sokolovsky2014-05-07
|
* stream: Add compliant handling of non-blocking read()/write().Paul Sokolovsky2014-05-07
| | | | | | | | | | | In case of empty non-blocking read()/write(), both return None. read() cannot return 0, as that means EOF, so returns another value, and then write() just follows. This is still pretty unexpected, and typical "if not len:" check would treat this as EOF. Well, non-blocking files require special handling! This also kind of makes it depending on POSIX, but well, anything else should emulate POSIX anyway ;-).
* py, parser: Add commented-out code to discard doc strings.Damien George2014-05-06
| | | | | | Doesn't help with RAM reduction because doc strings are interned as soon as they are encountered, which is too soon to do any optimisations on them.
* Merge branch 'master' of https://github.com/micropython/micropythonDamien George2014-05-06
|\ | | | | | | | | | | | | Conflicts: py/argcheck.c py/objenumerate.c py/runtime.h
| * py: bytes(), str(): Add NotImplementedError for kwargs.Paul Sokolovsky2014-05-06
| | | | | | | | Addresses #567.
| * py: enumerate(): Add NotImplementedError for kwargs.Paul Sokolovsky2014-05-06
| | | | | | | | Addresses #577.
* | py: Add keyword arg support to enumerate constructor.Damien George2014-05-06
|/ | | | | | | | Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
* modgc: Add new module for GC-related functionality.Paul Sokolovsky2014-05-06
|
* py: Comment exc_state member from mp_obj_gen_instance_t as it gives troublestijn2014-05-05
| | | | | | | ...to some compilers who can't process 2 zero-sized arrays in structs. It's never referenced directly anyway. See disussion on #568 as well.
* py-version.sh: Use --always option of git describe.Paul Sokolovsky2014-05-05
|
* py: Turn down amount of RAM parser and compiler use.Damien George2014-05-05
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* py-version.sh: Make it work in case no git tag is present.Paul Sokolovsky2014-05-05
|
* py, unix: Add -v option, print bytecode dump if used.Paul Sokolovsky2014-05-05
| | | | | | | | | | This will work if MICROPY_DEBUG_PRINTERS is defined, which is only for unix/windows ports. This makes it convenient to user uPy normally, but easily get bytecode dump on the spot if needed, without constant recompiles back and forth. TODO: Add more useful debug output, adjust verbosity level on which specifically bytecode dump happens.
* showbc: Quote block name, so it was easily visible.Paul Sokolovsky2014-05-04
|
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | 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/.
* Merge pull request #535 from pfalcon/blurbDamien George2014-05-03
|\ | | | | Proposed license/copyright file header.
| * py: Add copyright/license header to each file.Paul Sokolovsky2014-05-01
| |
* | Merge branch 'mingw-float-printf' of github.com:stinos/micropython into ↵Damien George2014-05-03
|\ \ | | | | | | | | | stinos-mingw-float-printf
| * | mingw: Fix number of exponent digits in floating point formattingstijn2014-05-03
| | | | | | | | | | | | | | | | | | | | | By default mingw outputs 3 digits instead of the standard 2 so all float tests using printf fail. Using setenv at the start of the program fixes this. To accomodate calling platform specific initialization a MICROPY_MAIN_INIT_FUNC macro is used which is called in mp_init()
* | | py, stream: Implement readlines for a stream.Damien George2014-05-03
| | |
* | | py: Add --dirty flag to git describe.Damien George2014-05-03
|/ /
* | py: Print tag/version/git describe in uPy banner.Damien George2014-05-03
| |
* | stmhal: Enable cmath module.Damien George2014-05-03
| |
* | py, objtype.c: Rename class_ to instance_ following change of typedef.Damien George2014-05-03
| | | | | | | | This follows up 0a7e01ae3c529fddf79dc5c71bf7e43cff3f9fa0.
* | Merge pull request #546 from stinos/relax-makeqstrdataDamien George2014-05-03
|\ \ | | | | | | More relaxed parsing of preprocessed qstr header
| * | More relaxed parsing of preprocessed qstr headerstijn2014-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | The original parsing would error out on any C declarations that are not typedefs or extern variables. This limits what can go in mpconfig.h and mpconfigport.h, as they are included in qstr.h. For instance even a function declaration would be rejected and including system headers is a complete no-go. That seems too limiting for a global config header, so makeqstrdata now ignores everything that does not match a qstr definition.
* | | Merge pull request #552 from stinos/mingw-allocaPaul Sokolovsky2014-05-03
|\ \ \ | | | | | | | | py: Use <alloca.h> for alloca()
| * | | py: Use <alloca.h> for alloca()stijn2014-05-03
| |/ / | | | | | | | | | | | | | | | | | | | | | alloca() is declared in alloca.h which als happens to be included by stdlib.h. On mingw however it resides in malloc.h only. So if we include alloca.h directly, and add an alloca.h for mingw in it's port directory we can get rid of the mingw-specific define to include malloc.h and the other ports are happy as well.
* / / objclosure, objcell: Print detailed representation if was requested.Paul Sokolovsky2014-05-03
|/ / | | | | | | | | Well, it is bound to "detailed error reporting", but that's closest what we have now without creating new entities.
* | py, unix: Make "mpconfig.h" be first included, as other headers depend on it.Paul Sokolovsky2014-05-02
| | | | | | | | Specifically, nlr.h does.
* | objtype: Work around stupid strict aliasing check.Paul Sokolovsky2014-05-02
| |
* | objexcept: Support tracebacks for user Exception subclasses.Paul Sokolovsky2014-05-02
| |
* | objtype: Rename mp_obj_class_t -> mp_obj_instance_t and move to local header.Paul Sokolovsky2014-05-02
| | | | | | | | TODO: Rename methods.
* | objtype: .print() Exception instances in adhoc way.Paul Sokolovsky2014-05-02
| | | | | | | | This is ugly, just as expected.
* | Merge pull request #544 from lurch/fix-minmaxPaul Sokolovsky2014-05-01
|\ \ | | | | | | Fix the builtin min() and max() functions (and add tests).
| * | Fix the builtin min() and max() functions (and add tests).Andrew Scheller2014-05-01
| | | | | | | | | | | | Fixes #539
* | | objfun: More debug logging.Paul Sokolovsky2014-05-01
| | |
* | | objgenerator: Fix check for too few args passed to gen function.Paul Sokolovsky2014-05-01
| | |
* | | objgenerator: .print(): Output real underlying function name.Paul Sokolovsky2014-05-01
|/ /
* | py: Add tentative scheme for error messages configuration.Paul Sokolovsky2014-05-01
| |
* | objfun: Add function name accessor and .print slot method.Paul Sokolovsky2014-05-01
|/
* Merge pull request #528 from pfalcon/native-subclass1Damien George2014-04-30
|\ | | | | Initial support for subclassing native types
| * objtype: Support calling normal methods inherited from native base class.Paul Sokolovsky2014-04-30
| | | | | | | | | | | | | | | | Biggest part of this support is refactoring mp_obj_class_lookup() to return standard "bound member" pair (mp_obj_t[2]). Actual support of inherited native methods is 3 lines then. Some inherited features may be not supported yet (e.g. native class methods, native properties, etc., etc.). There may be opportunities for further optimization too.