Damien George
dbdfee15a1
py: Add cmath module, for complex math. Disabled by default.
Not all functions implemented. Not enabled on pyboard.
11 years ago
AZ Huang
9309d9982f
Move entry_table to separated header file.
11 years ago
Damien George
3bb8bd899b
Make USE_COMPUTED_GOTO a config option in mpconfig.h.
Disabled by default. Enabled in unix port.
11 years ago
Damien George
777b0f32f4
py: Add property object, with basic functionality.
Enabled by MICROPY_ENABLE_PROPERTY.
11 years ago
Paul Sokolovsky
4165cd1c0c
stmhal: Update for static mod sys.
11 years ago
Damien George
27e735fd18
py: Replace stream_p with *stream_p in mp_obj_type_t.
This is to reduce ROM usage. stream_p is used in file and socket types
only (at the moment), so seems a good idea to make the protocol
functions a pointer instead of the actual structure.
It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
11 years ago
Damien George
7efc5b3f34
py: Make globals and locals proper dictionary objects.
Finishes addressing issue #424 .
In the end this was a very neat refactor that now makes things a lot
more consistent across the py code base. It allowed some
simplifications in certain places, now that everything is a dict object.
Also converted builtins tables to dictionaries. This will be useful
when we need to turn builtins into a proper module.
11 years ago
Damien George
12bab72d93
Improve GC finalisation code; add option to disable it.
11 years ago
Paul Sokolovsky
78e8e30c87
unix: Enable GC.
GC support for "unix" port was implemented some time ago, but still not
enabled.
11 years ago
Damien George
0c36da0b59
Implement ROMable modules. Add math module.
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).
11 years ago
Paul Sokolovsky
793838a919
MICROPY_USE_READLINE: Selects link lib, so should be defined in mpconfigport.mk
This change allows to build unix version without libreadline installed.
11 years ago
Damien George
438c88dd2f
Add arbitrary precision integer support.
Some functionality is still missing (eg and, or, bit shift), and some
things are buggy (eg subtract).
11 years ago
Paul Sokolovsky
910843e86d
Allow ports to define statically builtin functions.
Convert unix open() to such.
11 years ago
Damien George
354d15a964
Implement fixed buffer vstrs; use them for import path.
11 years ago
Damien George
62ad189a65
py: Add compile option to enable/disable source line numbers.
11 years ago
Damien George
cbd2f7482c
py: Add module/function/class name to exceptions.
Exceptions know source file, line and block name.
Also tidy up some debug printing functions and provide a global
flag to enable/disable them.
11 years ago
Damien George
08335004cf
Add source file name and line number to error messages.
Byte code has a map from byte-code offset to source-code line number,
used to give better error messages.
11 years ago
Paul Sokolovsky
966879cf59
Add long int implementation using C long long type, enable for unix port.
11 years ago
John R. Lenton
9c83ec0eda
Merge remote-tracking branch 'upstream/master' into dict_feats
11 years ago
Damien George
d3ebe4829d
Factor and simplify Makefile's and mpconfig, part 2.
11 years ago
Damien George
136f67523b
Factor and simplify Makefile's and mpconfig.
11 years ago
Paul Sokolovsky
d674bd5989
Convert USE_READLINE config option to be consistent with others.
11 years ago
Paul Sokolovsky
c90c0f68a2
Move INT_FMT, etc. declaration into global mpconfig.h .
This in particular makes it available for stm port.
11 years ago
Paul Sokolovsky
b372bfca21
Rename default config file to mpconfig.h, and port's to mpconfigport.h.
mpconfig.h will automatically pull mpconfigport.h.
11 years ago
Paul Sokolovsky
e85c38992d
Make "unix" target be crossplatform and support x86, x64, ARM hosts.
11 years ago
Damien
d99b05282d
Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object). This scheme follows CPython. Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.
Also change name prefix, from py_ to mp_ (mp for Micro Python).
11 years ago
Damien
087d218d95
Unix: add machine-specific sqrt support.
11 years ago
Damien
d276f6357e
Get unix version compling.
11 years ago
Damien
fa2162bc77
Integrate new lexer stream with stm framework.
11 years ago
Damien
a5185f4bc8
Abstract out back-end stream functionality from lexer.
11 years ago
Damien
d2755ec538
Add iterators and comprehension to emitnative.
11 years ago
Damien
c9f91976e1
Crude try-except working.
11 years ago
Damien
3ef4abb446
Change ifdef/if defined to simple if's.
11 years ago
Damien
c025ebb2dc
Separate out mpy core and unix version.
11 years ago