Commit Graph

8136 Commits

Author SHA1 Message Date
Damien George 2d15c1216d stm: Add optional memory debugging output. 2014-01-29 20:33:20 +00:00
Damien George d0691ccaec py: Simplify fastn in VM; reduce size of unique code struct.
We still have FAST_[0,1,2] byte codes, but they now just access the
fastn array (before they had special local variables).  It's now
simpler, a bit faster, and uses a bit less stack space (on STM at least,
which is most important).

The only reason now to keep FAST_[0,1,2] byte codes is for compressed
byte code size.
2014-01-29 20:30:52 +00:00
Damien George 01fa4a9164 stm: Fix gccollect ram range. 2014-01-29 19:21:17 +00:00
Damien George 0347fbd2d5 Merge branch 'master' of github.com:iabdalkader/micropython 2014-01-29 19:04:59 +00:00
Damien George 08d075592f py: Fix bug with LOAD_METHOD; fix int->machine_int_t for small int.
LOAD_METHOD bug was: emitbc did not correctly calculate the amount of
stack usage for a LOAD_METHOD operation.

small int bug was: int was being used to pass small ints, when it should
have been machine_int_t.
2014-01-29 18:58:52 +00:00
Damien George 1ba1facaaa py: Msg in exception is no longer interned. 2014-01-29 18:57:20 +00:00
Damien George 4d5b28cd08 Add qstr_info() function and bindings for unix port. 2014-01-29 18:56:46 +00:00
mux bfb01e9da6 Fix unused function warning in main
* Add SD card test to fix warning
2014-01-29 15:07:04 +02:00
mux 8592d85b36 Remove redundant include in file.c
* Remove include mpconfigport.h from file.c
2014-01-29 15:05:53 +02:00
mux 76a6335b6e Move HEAP_END and RAM_END to linker script
* Issue #232
2014-01-29 12:52:03 +02:00
Damien George 217814cc63 stm: Increase timeout for RTC LSE startup; use backup regs. 2014-01-28 23:47:28 +00:00
Damien George e4b6a079b3 py: Implement 'not' in compiler, and improve rt_is_true. 2014-01-28 23:27:35 +00:00
Damien George b40892d266 Rename array test to array1 so it doesn't clash with array module.
On my machine, 'import array' in CPython tries to load the array test.
2014-01-28 23:12:35 +00:00
Damien George 8bf91f2a87 unix: Fix compile warnings for ffi module on 64-bit machine. 2014-01-28 23:08:11 +00:00
Damien George 4729a0ccea Merge pull request #235 from pfalcon/modffi
unix: Initial FFI module implementation
2014-01-28 14:53:12 -08:00
Paul Sokolovsky 809eaa2679 Add FFI module example. 2014-01-29 00:37:09 +02:00
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))).
2014-01-29 00:24:00 +02:00
Paul Sokolovsky 7f11c794a5 mp_obj_new_bytearray_by_ref(): Allow to create array by reference.
This is special feature for FFI.
2014-01-29 00:21:41 +02:00
Markus Siemens 242856cfbf Fixed problems with nlx86.S on Linux
Fixed '#ifdef's so Linux would compile again and added
.scl and .type for Windows.
2014-01-28 19:52:04 +01:00
Markus Siemens 19ccc6bdc7 Added Windows port (see #233) 2014-01-28 18:21:05 +01:00
Paul Sokolovsky 1801421f6d bytearray: Print objects properly. 2014-01-28 03:40:48 +02:00
Paul Sokolovsky 0b7e29c025 Factor out quoted string print function for reuse (mp_str_print_quoted()). 2014-01-28 03:40:06 +02:00
Paul Sokolovsky 8e991e0680 Add basic array.array test. 2014-01-28 03:19:32 +02:00
Paul Sokolovsky 7e652af242 array: CPython prints empty arrays inconsistently (only typecode, no []). 2014-01-28 03:19:13 +02:00
Paul Sokolovsky 0dd0467a97 Don't pre-import array module. 2014-01-28 03:18:30 +02:00
Paul Sokolovsky 11973b48b5 array.array: Allow to create empty arrays. 2014-01-28 03:18:30 +02:00
Damien George 42647e64db stm: Remove unneccesary include of mpconfigport (already in mpconfig). 2014-01-27 23:52:47 +00:00
Damien George c674f02d5c Merge pull request #231 from iabdalkader/master
Fix implicit double conversion warning
2014-01-27 15:54:44 -08:00
Damien George c7aa9fcae5 Merge branch 'master' of github.com:micropython/micropython 2014-01-27 23:16:20 +00:00
Damien George 4e8dc8c41b py: Add unary op not for NoneType, bool, tuple, list, dict; fix for int. 2014-01-27 23:15:32 +00:00
mux 8d3b0a9f74 Add LCD check to stdout_print_strn 2014-01-27 18:53:16 +02:00
Paul Sokolovsky 9b00dad7bb long int: Implement more operations. 2014-01-27 12:25:23 +02:00
mux bd61a6cee8 Add missing LCD driver definitions for STM32F4DISC
* Add missing LCD definitions for STM32F4DISC target, current code
  breaks build.
2014-01-27 10:56:47 +02:00
mux 00a4da93e8 Fix implicit double conversion warning 2014-01-27 10:21:42 +02:00
Paul Sokolovsky ddf1aa9223 list.pop(): Don't allow ->alloc drop to zero, which causes unexpected behavior. 2014-01-27 01:07:58 +02:00
Paul Sokolovsky 14d28be344 gen.send(): Throw StopIteration. Also, explicitly shutdown finished gen.
Otherwise, some generator statements still may be spuriously executed on
subsequent calls to next()/send().
2014-01-27 01:07:58 +02:00
Damien George addf60b2e6 Merge pull request #228 from pfalcon/gen-send
Implement send() method for generators.
2014-01-26 11:25:38 -08:00
Paul Sokolovsky bf38e2a03a Implement send() method for generators. 2014-01-26 20:56:08 +02:00
Damien George 56bb636014 Change -Og to -O0 in unix-cpy/Makefile; cast to small int in socket.c. 2014-01-26 17:52:23 +00:00
Damien George 554a75b689 Merge pull request #226 from pfalcon/make-debug
unix Makefile: -Og doesn't work (at least) with gcc 4.6 below.
2014-01-26 09:53:31 -08:00
Damien George 5bd56fbf13 Merge branch 'master' of github.com:micropython/micropython 2014-01-26 17:41:46 +00:00
Damien George 75abee206d stm: USB host mode working! Restructure stm library directories. 2014-01-26 17:41:01 +00:00
Paul Sokolovsky 4795c58f3c sock-server.py: Use SO_REUSEADDR to avoid errors on quick restart. 2014-01-26 02:03:07 +02:00
Paul Sokolovsky a88c30c64a unix socket: Add setsockopt() method. 2014-01-26 02:03:07 +02:00
Paul Sokolovsky 9d95a2b21d Functions of fixed number of args are special-cased only for 3 or less args. 2014-01-26 02:03:07 +02:00
Paul Sokolovsky 2ca84aa01e Add MP_OBJ_IS_INT(), for symmetry with MP_OBJ_IS_STR(). 2014-01-26 02:03:07 +02:00
Paul Sokolovsky 5d362d3209 unix socket: Add few more socket constants. 2014-01-26 02:03:07 +02:00
Paul Sokolovsky db0b282d45 unix socket: Store module constants in data structure.
-147 bytes on x86.
2014-01-26 02:03:07 +02:00
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.
2014-01-25 19:49:38 +02:00
Damien George 8fcf7b858d Merge pull request #225 from dhylands/fix-make-dep
Fixed dependency problem for qstrdefs.generated.h
2014-01-25 09:34:23 -08:00