Damien George
ca4767984b
py: Implement builtin exec.
11 years ago
Damien George
39631bc312
Fix Makefiles: -O3 option was not being applied; mkdir for STM.
11 years ago
Dave Hylands
1a3b0d5fed
Fixed dependency problem for qstrdefs.generated.h
The problem manifests itself in make 4.0
I also fixed the LINK message when linking the final executable for unix and unix-cpy.
11 years ago
Damien George
7c9c667633
py: Implement iterator support for object that has __getitem__.
Addresses Issue #203 .
11 years ago
Dave Hylands
c89c681a9f
Rework makefiles. Add proper dependency checking.
11 years ago
Damien George
55baff4c9b
Revamp qstrs: they now include length and hash.
Can now have null bytes in strings. Can define ROM qstrs per port using
qstrdefsport.h
11 years ago
Paul Sokolovsky
439542f70c
sequence.c: Start to refactor sequence operations for reuse among types.
11 years ago
Paul Sokolovsky
440cc3f028
Expose memory stats functions via "micropython" module.
These are micropython.mem_total(), .mem_current(), .mem_peak(). These are 3
individual functions with simple scalar return value to make sure that
calls to these functions themselves have minimal (hopefully zero) impact on
memory allocation.
11 years ago
Paul Sokolovsky
427905cedd
Add skeleton implementation of array.array and bytearray.
So far, only storage, initialization, repr() and buffer protocol is
implemented - alredy suitable for passing binary data around.
11 years ago
Paul Sokolovsky
966879cf59
Add long int implementation using C long long type, enable for unix port.
11 years ago
Damien George
d02c6d8962
Implement eval.
11 years ago
John R. Lenton
fca456bc3c
added filter()
11 years ago
John R. Lenton
39b174e00a
Added map
11 years ago
John R. Lenton
9daa78943e
added enumerate()
11 years ago
xyb
c178ea471e
Implemented int(str) in UNIX
11 years ago
John R. Lenton
07205ec323
added zip()
11 years ago
Damien George
062478e66d
Improved type/class/instance code; mp_obj_type_t now has load_attr, store_attr.
Creating of classes (types) and instances is much more like CPython now.
You can use "type('name', (), {...})" to create classes.
11 years ago
Dave Hylands
4646801181
Make build output quieter.
Use make V=1e make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
This should fix issue #117
11 years ago
Paul Sokolovsky
e98cf40c34
Add generic implementations of Python read()/write methods for streams.
These can be used for any object which implements stream protocol
(mp_stream_p_t).
11 years ago
Damien George
9193f89296
Move lexerstr to main py directory (everyone uses it).
11 years ago
John R. Lenton
9c83ec0eda
Merge remote-tracking branch 'upstream/master' into dict_feats
11 years ago
Damien George
136f67523b
Factor and simplify Makefile's and mpconfig.
11 years ago
Damien George
71c5181a8d
Convert Python types to proper Python type hierarchy.
Now much more inline with how CPython does types.
11 years ago
Paul Sokolovsky
d674bd5989
Convert USE_READLINE config option to be consistent with others.
11 years ago
Damien George
e67ed5d285
Improve configurability for native x64/thumb emitter.
With MICROPY_EMIT_X64 and MICROPY_EMIT_THUMB disabled, the respective
emitters and assemblers will not be included in the code. This can
significantly reduce binary size for unix version.
11 years ago
Paul Sokolovsky
1c6de11f77
Add basic implementation of slice object.
So far, only start and stop integer indexes are supported. Step is
not supported, as well as objects of arbitrary types.
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
Damien George
66028ab6dc
Basic implementation of import.
import works for simple cases. Still work to do on finding the right
script, and setting globals/locals correctly when running an imported
function.
11 years ago
Damien George
2870862601
Add module object, to be used eventually for import.
11 years ago
Damien George
210a02e105
unix: revert Makefile to not use -ltermcap.
termcap is not needed on Linux. Need to work out how to automatically
configure the Makefile...
11 years ago
Edd Barrett
0d02eb178a
Fix undefined termcap symbols on OpenBSD.
E.g.:
/usr/lib/libreadline.so.4.0: undefined reference to `tgetnum'
/usr/lib/libreadline.so.4.0: undefined reference to `tgoto'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetflag'
/usr/lib/libreadline.so.4.0: undefined reference to `tputs'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetent'
/usr/lib/libreadline.so.4.0: undefined reference to `tgetstr'
Tested on linux too, works.
11 years ago
Paul Sokolovsky
fa027672da
Make GNU Readline usage optional (USE_READLINE define). Still enabled.
Readline is GPL, so linking with it casts the binary GPL.
11 years ago
Paul Sokolovsky
e1151e463d
Use rm -rf to remove build dir, so it doesn't error out if dir doesn't exist.
11 years ago
Damien George
8cc96a35e5
Put unicode functions in unicode.c, and tidy their names.
11 years ago
Damien George
212c296c0b
Make unix-cpy cross platform; remove dependency of asmx64 on mpconfig.
11 years ago
Paul Sokolovsky
e85c38992d
Make "unix" target be crossplatform and support x86, x64, ARM hosts.
11 years ago
Paul Sokolovsky
729fd12fbf
Don't error out if build/ directory already exists.
11 years ago
Damien
de690d128b
Add unix-cpy, used to test Micro Python byte code against CPython.
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
e2880aa2fd
Fix a few compiler warnings.
11 years ago
Damien
0f08267fa4
unix: include obj.h, and build additional py files.
11 years ago
Damien
1895cf91af
Link showbc.o in unix version.
11 years ago
Damien
7410e440ab
Add basic complex number support.
11 years ago
Damien
92c06561a3
Improve REPL compount statement detection.
11 years ago
Damien
a5185f4bc8
Abstract out back-end stream functionality from lexer.
11 years ago
Damien
5ac1b2efbd
Implement REPL.
11 years ago
Damien
ce89a21ea4
Implement basic exception framework, and simple for loop.
11 years ago
Damien
c025ebb2dc
Separate out mpy core and unix version.
11 years ago