- 10 May, 2014 6 commits
-
-
Damien George authored
-
Damien George authored
This patch simplifies the glue between native emitter and runtime, and handles viper code like inline assember: return values are converted to Python objects. Fixes issue #531.
-
Damien George authored
bytecode is the more widely used. See issue #590.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Should support everything supported by strings.
-
Paul Sokolovsky authored
So one has some chance to convert numeric op code into symbol.
-
- 09 May, 2014 1 commit
-
-
stijn authored
-
- 08 May, 2014 3 commits
-
-
Damien George authored
-
Damien George authored
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.
-
stijn authored
Extend the windows port so it compiles with the toolchain from Visual Studio 2013
-
- 07 May, 2014 5 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Just a start, no working code yet. As per issue #573.
-
- 06 May, 2014 8 commits
-
-
Paul Sokolovsky authored
Enable only on unix. To avoid unpleasant surprises with error codes.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
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 ;-).
-
Damien George authored
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.
-
Damien George authored
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.
-
Paul Sokolovsky authored
Addresses #567.
-
Paul Sokolovsky authored
Addresses #577.
-
- 05 May, 2014 4 commits
-
-
Paul Sokolovsky authored
-
stijn authored
...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.
-
Paul Sokolovsky authored
-
Damien George authored
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.
-
- 04 May, 2014 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
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.
-
Paul Sokolovsky authored
-
- 03 May, 2014 10 commits
-
-
Damien George authored
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/.
-
Damien George authored
-
Damien George authored
-
stijn authored
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()
-
Damien George authored
-
Damien George authored
-
Damien George authored
This follows up 0a7e01ae.
-
Paul Sokolovsky authored
Well, it is bound to "detailed error reporting", but that's closest what we have now without creating new entities.
-
stijn authored
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.
-
stijn authored
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.
-