Damien George
5904dad842
Merge pull request #483 from aitjcize/parallel
Fix parallel build.
11 years ago
Damien George
ad8abd1a95
Merge branch 'master' of github.com:micropython/micropython
11 years ago
AZ Huang
60993c166d
Add Travis CI support.
11 years ago
AZ Huang
658eae308f
Fix parallel build.
11 years ago
Andrew Scheller
0aac7ba344
Make pip-micropython more portable
Replace /tmp with a $TMPDIR variable
Replace multiple occurrences of /tmp/pip-micropy-venv with a $TMPVENV variable
Replace ~ with $HOME
11 years ago
Andrew Scheller
cc83737d35
Don't allow both ENDIANNESSes to be set
See discussion on 2da81fa80c
Explicitly set `MP_ENDIANNESS_LITTLE` because that's the #define that is used in code elsewhere.
11 years ago
Damien George
48a9b3fd11
tools: Improve timout/reading of pyboard.py.
11 years ago
Damien George
cce7119a2b
stmhal: Work around crazy bug in USB CDC.
Packets of 64 bytes length are not send to the host until the following
packet is sent. Fixed by never sending packets of 64 bytes length.
11 years ago
Damien George
7e5be0b1b4
stmhal: Improved usart module a bit.
11 years ago
Damien George
6dba016a56
stmhal: Add pyb.wfi() function (calls __WFI).
11 years ago
Paul Sokolovsky
bbae42d62f
modsys: Implement sys.version.
The logic appears to be that (at least beginning of) sys.versions is the
version of reference Python language implemented, not version of particular
implementation.
Also, bump set versions at 3.4.0, based on @dpgeorge preference.
11 years ago
Paul Sokolovsky
58676fc2c7
objstr: Allow to define statically allocated str objects.
Similar to tuples, lists, dicts. Statically allocated strings don't have hash
computed.
11 years ago
Paul Sokolovsky
59e269cfec
qstr, objstr: Make sure that valid hash != 0, treat 0 as "not computed".
This feature was proposed with initial hashing RFC, and is prerequisite for
seamless static str object definition.
11 years ago
Paul Sokolovsky
14de114ba8
objdict: Add __delitem__.
11 years ago
Paul Sokolovsky
cd94b384a3
objdict: Add __setitem__.
11 years ago
Damien George
86a03044e3
stmhal: Add stdin/stdout/stderr objects.
Available via sys.std{in,out,err}. Basic reading and writing supported.
Even sys.stdin.readline!
11 years ago
Damien George
e2a48b66c2
tests: Add property test.
11 years ago
Damien George
777b0f32f4
py: Add property object, with basic functionality.
Enabled by MICROPY_ENABLE_PROPERTY.
11 years ago
Damien George
4417478d0f
tests: Make tests pass on pyboard.
11 years ago
Damien George
9dcc60d0b1
py: Detect ZeroDivisionError properly for floats.
11 years ago
Damien George
212f89e61a
stmhal: Improve USB CDC write function (increase timeout).
11 years ago
Damien George
0e4ba25834
py: Fix SyntaxError exception: don't have a block name, so pass NULL.
11 years ago
Damien George
73496fbbe4
py: Fix up source-line calculation.
Should address issue #475 .
11 years ago
Damien George
b636d024d2
Make pyboard.py have its own exception; update run-tests for pyboard.
11 years ago
Damien George
d240ff83c7
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
b502156e22
py: Adjust #includes in lexerunix.c.
11 years ago
Paul Sokolovsky
978d2c0267
modsys: Implement sys.byteorder.
11 years ago
Paul Sokolovsky
baaaf65eaa
modsys: Implement basic sys.version_info.
11 years ago
Damien George
da6c2fafb5
Merge pull request #470 from errordeveloper/misc_fix/lexerunix
py: don't look for any additional headers when lexerunix is disabled
11 years ago
Damien George
d395a0e4b1
Merge pull request #471 from errordeveloper/misc_fix/unistd
py: the entire `<unistd.h>` shouldn't be needed
11 years ago
Damien George
674f9887ce
bare-arm/unix-cpy: Minor changes.
11 years ago
Damien George
cb861a5c6a
stm[hal]: Init mp_sys_path and mp_sys_argv correctly.
11 years ago
Damien George
5bb7d99175
py: Modify makeqstrdata to recognise better the output of CPP.
11 years ago
Damien George
49f20b841d
py: Add more #if's for configurable MOD_SYS.
11 years ago
Damien George
640e7e4779
Merge pull request #476 from pfalcon/static-sys
Convert sys module to static allocation
11 years ago
Damien George
f95c68e536
Merge pull request #473 from pfalcon/list-extend-iter
objlist: Make .extend accept arbitrary iterable.
11 years ago
Damien George
b9e7ed4ebc
py: Oops, fix int.from_bytes to correctly convert bytes!
11 years ago
Damien George
5213eb35b5
py: Make int.from_bytes a classmethod; support arbitrary length buf.
11 years ago
Damien George
8a1cab952f
py: Fix mp_get_buffer, and use it in more places.
Must use mp_obj_get_type to get the type of an object. Can't assume
mp_obj_t is castable to mp_obj_base_t.
11 years ago
Damien George
4b01de44ba
py: Add traceback info to syntax errors.
Should fix issue #463 .
11 years ago
Damien George
3d484d9ad4
py: Update showbc to decode ptrs for MAKE_FUNCTION ops.
11 years ago
Damien George
0aab675108
stmhal: Little hack to dump GC allocation table using pyb.info().
Pass a single parameter (doesn't matter what): pyb.info(1), will dump
the GC alloc table.
11 years ago
Damien George
df8127a17e
py: Remove unique_codes from emitglue.c. Replace with pointers.
Attempt to address issue #386 . unique_code_id's have been removed and
replaced with a pointer to the "raw code" information. This pointer is
stored in the actual byte code (aligned, so the GC can trace it), so
that raw code (ie byte code, native code and inline assembler) is kept
only for as long as it is needed. In memory it's now like a tree: the
outer module's byte code points directly to its children's raw code. So
when the outer code gets freed, if there are no remaining functions that
need the raw code, then the children's code gets freed as well.
This is pretty much like CPython does it, except that CPython stores
indexes in the byte code rather than machine pointers. These indices
index the per-function constant table in order to find the relevant
code.
11 years ago
Paul Sokolovsky
68e7c5146c
py: Factor out impl of special methods for builtin types into opmethods.c
11 years ago
Paul Sokolovsky
036ad76659
objset: Implement __contains__() op-method.
11 years ago
Paul Sokolovsky
1a37588e35
py: Provide more details for too few and too much args for Python fun calls.
11 years ago
Paul Sokolovsky
48fdaad824
py: Rename collections module to _collections.
We're not going to implement all the plethora of types in there in C.
Funnily, CPython implements defaultdict in C, and namedtuple in Python.
11 years ago
Paul Sokolovsky
ef79a82cec
README: Update for modffi being enabled by default for unix port.
11 years ago
Paul Sokolovsky
4165cd1c0c
stmhal: Update for static mod sys.
11 years ago
Paul Sokolovsky
a3e50eacca
py: Move sys attribute qstrs's to core.
11 years ago