Commit Graph

20 Commits

Author SHA1 Message Date
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.
2014-01-19 11:48:48 +00:00
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.
2014-01-18 23:24:36 +00:00
Damien George 5573f9f150 Merge branch 'str2int' of github.com:xyb/micropython into xyb-str2int
Conflicts:
	py/objint.c
	unix-cpy/Makefile
	unix/Makefile
2014-01-15 22:58:39 +00:00
Damien George 9528cd66d7 Convert parse errors to exceptions.
Parser no longer prints an error, but instead returns an exception ID
and message.
2014-01-15 21:23:31 +00:00
xyb c178ea471e Implemented int(str) in UNIX 2014-01-14 21:39:05 +08:00
John R. Lenton 9549919349 made DEBUG control CFLAGS in Makefiles oter than stm as well. 2014-01-13 13:25:10 +00:00
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
2014-01-08 10:30:06 -08:00
Damien George d3ebe4829d Factor and simplify Makefile's and mpconfig, part 2. 2014-01-07 15:20:33 +00:00
Damien George 136f67523b Factor and simplify Makefile's and mpconfig. 2014-01-07 14:54:15 +00:00
Damien George 71c5181a8d Convert Python types to proper Python type hierarchy.
Now much more inline with how CPython does types.
2014-01-04 20:21:15 +00:00
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.
2014-01-04 02:35:48 +02:00
Paul Sokolovsky c90c0f68a2 Move INT_FMT, etc. declaration into global mpconfig.h .
This in particular makes it available for stm port.
2014-01-04 01:57:00 +02:00
Damien George b7aa72710e unix-cpy: Fix mpconfig to work with new scheme. 2014-01-03 18:48:53 +00:00
Damien George 1fb031744f Change mp_compile so that it returns a function object for the module. 2014-01-03 14:22:03 +00:00
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.
2014-01-03 14:03:48 +00:00
Damien George 2870862601 Add module object, to be used eventually for import. 2014-01-02 21:30:26 +00:00
Paul Sokolovsky e1151e463d Use rm -rf to remove build dir, so it doesn't error out if dir doesn't exist. 2013-12-30 21:02:10 +02:00
Damien George 8cc96a35e5 Put unicode functions in unicode.c, and tidy their names. 2013-12-30 18:23:50 +00:00
Damien George 212c296c0b Make unix-cpy cross platform; remove dependency of asmx64 on mpconfig. 2013-12-30 12:52:32 +00:00
Damien de690d128b Add unix-cpy, used to test Micro Python byte code against CPython. 2013-12-29 18:01:01 +00:00