Damien George
8bf91f2a87
unix: Fix compile warnings for ffi module on 64-bit machine.
11 years ago
Paul Sokolovsky
60a9fac8d4
unix: Initial implementation of FFI module.
Foreign Function Interface module allows to load native dynamic libraries,
call functions and access variables in them. This makes possible to write
interface modules in pure Python.
This module provides thin wrapper around libffi. ctypes compatibility might
be possible to implement on top of this module (though ctypes allow to call
functions without prototypes, which is not supported by libffi (i.e.
implementation would be inefficient))).
11 years ago
Damien George
56bb636014
Change -Og to -O0 in unix-cpy/Makefile; cast to small int in socket.c.
11 years ago
Paul Sokolovsky
e2febe90e3
unix Makefile: -Og doesn't work (at least) with gcc 4.6 below.
Also, don't try to force debug info format, use native.
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
Damien George
7d08935458
Rename unix binary to 'micropython'.
11 years ago
Paul Sokolovsky
fc92608237
Add lean ("raw") socket module.
11 years ago
xyb
c178ea471e
Implemented int(str) in UNIX
11 years ago
John R. Lenton
9549919349
made DEBUG control CFLAGS in Makefiles oter than stm as well.
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
e0e79ae6d6
unix: Add basic implementation of io.FileIO object.
Note: only read/write/close methods are defined so far, and class
is not exposed (use open() factory function, as usual).
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