Damien George
40f3c02682
Rename machine_(u)int_t to mp_(u)int_t.
See discussion in issue #50 .
11 years ago
Damien George
4480cb3711
Provide definition of alloca() in mpconfigport.h.
11 years ago
Damien George
ee3fd46f13
Rename configuration variables controling Python features.
Now of the form MICROPY_PY_*. See issue #35 .
11 years ago
Damien George
58ebde4664
Tidy up some configuration options.
MP_ALLOC_* -> MICROPY_ALLOC_*
MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX
MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL
MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX
MICROPY_EXTRA_* -> MICROPY_PORT_*
See issue #35 .
11 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
Blanket wide to all .c and .h files. Some files originating from ST are
difficult to deal with (license wise) so it was left out of those.
Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
11 years ago
Damien George
b37c0a116e
unix-cpy: Put mpconfig.h before all other headers.
11 years ago
Damien George
d553be5982
build: Simplify build directory layout by putting all headers in genhdr.
Any generated headers go in $(BUILD)/genhdr/, and are #included as
'genhdr/xxx.h'.
11 years ago
Andrew Scheller
70a7d7a943
build directory can now be renamed
The autogenerated header files have been moved about, and an extra
include dir has been added, which means you can give a custom
BUILD=newbuilddir option to make, and everything "just works"
Also tidied up the way the different Makefiles build their include-
directory flags
11 years ago
Damien George
674f9887ce
bare-arm/unix-cpy: Minor changes.
11 years ago
Damien George
26cf55ae05
Add a check for NULL nlr_top in nlr_jump.
If no nlr_buf has been pushed, and an nlr_jump is called, then control
is transferred to nlr_jump_fail (which should bail out with a fatal
error).
11 years ago
Damien George
36e75aef38
unix-cpy: Pass emit opt to mp_compile.
11 years ago
Paul Sokolovsky
98a627dc03
py: Add "io" module.
So far just includes "open" function, which should be supplied by a port.
TODO: Make the module #ifdef'ed.
11 years ago
Damien George
d17926db71
Rename rt_* to mp_*.
Mostly just a global search and replace. Except rt_is_true which
becomes mp_obj_is_true.
Still would like to tidy up some of the names, but this will do for now.
11 years ago
Damien George
2326d52d20
py: Factor out code from runtime.c to emitglue.c.
11 years ago
Paul Sokolovsky
75488d5639
unix-cpy: Switch to use MICROPY_FLOAT_IMPL config define.
11 years ago
Damien George
c5966128c7
Implement proper exception type hierarchy.
Each built-in exception is now a type, with base type BaseException.
C exceptions are created by passing a pointer to the exception type to
make an instance of. When raising an exception from the VM, an
instance is created automatically if an exception type is raised (as
opposed to an exception instance).
Exception matching (RT_BINARY_OP_EXCEPTION_MATCH) is now proper.
Handling of parse error changed to match new exceptions.
mp_const_type renamed to mp_type_type for consistency.
11 years ago
Damien George
4a081b1001
Add mp_import_stat to unix-cpy port.
11 years ago
Damien George
56bb636014
Change -Og to -O0 in unix-cpy/Makefile; cast to small int in socket.c.
11 years ago
Dave Hylands
c89c681a9f
Rework makefiles. Add proper dependency checking.
11 years ago
Damien George
5fa93b6755
Second stage of qstr revamp: uPy str object can be qstr or not.
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
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.
11 years ago
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.
11 years ago
Damien George
9528cd66d7
Convert parse errors to exceptions.
Parser no longer prints an error, but instead returns an exception ID
and message.
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
John R. Lenton
9c83ec0eda
Merge remote-tracking branch 'upstream/master' into dict_feats
11 years ago
Damien George
d3ebe4829d
Factor and simplify Makefile's and mpconfig, part 2.
11 years ago
Damien George
136f67523b
Factor and simplify Makefile's and mpconfig.
11 years ago
ian-v
5fd8fd2c16
Revert MP_BOOL, etc. and use <stdbool.h> instead
11 years ago
ian-v
7a16fadbf8
Co-exist with C++ (issue #85 )
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
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
c90c0f68a2
Move INT_FMT, etc. declaration into global mpconfig.h .
This in particular makes it available for stm port.
11 years ago
Damien George
b7aa72710e
unix-cpy: Fix mpconfig to work with new scheme.
11 years ago
Damien George
1fb031744f
Change mp_compile so that it returns a function object for the module.
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
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
Damien
de690d128b
Add unix-cpy, used to test Micro Python byte code against CPython.
11 years ago