Damien George
82c7b1b1d5
stmhal: Put a USB structure in ROM; GC doesn't scan the data segment.
11 years ago
Damien George
b14f2a0ba3
Update .gitignore to ignore __pycache__/.
11 years ago
Damien George
71dcd51989
examples: Add example script to flash an LED using inline assembler.
11 years ago
Damien George
6ce4277551
py: Make all LOAD_FAST ops check for unbound local.
This is necessary to catch all cases where locals are referenced before
assignment. We still keep the _0, _1, _2 versions of LOAD_FAST to help
reduced the byte code size in RAM.
Addresses issue #457 .
11 years ago
Damien George
c2803db010
tests: Add some bytecode tests.
11 years ago
Damien George
0a4c210586
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
a26dc50968
py: Improve inline assembler; improve compiler constant folding.
11 years ago
Damien George
2813cb6043
py: Add 'static' to inline function MP_BOOL; remove category_t.
Small fixes to get it compiling with ARMCC. I have no idea why
category_t was in the enum definition for qstrs...
11 years ago
Paul Sokolovsky
a5afc9009f
builtinimport: Implement relative imports.
11 years ago
Paul Sokolovsky
faf84491ce
showbc: Add quotes around (some) string args, to show empty string properly.
11 years ago
Damien George
d6c5d398fe
Updated README.
11 years ago
Damien George
c557215822
Add 'bare-arm' port: the bare minimum to get it running on an ARM MCU.
11 years ago
Damien George
f7e4e1c2b4
py: Fix compiler warning when floats disabled.
11 years ago
Damien George
19b992a862
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Paul Sokolovsky
42453dc98e
py: Make ImportError message match CPython's.
11 years ago
Paul Sokolovsky
2ff3d9d0b2
builtinimport: Set __path__ attribute ASAP as it's clear we have a package.
This helps with handling "recursive" imports in sane manner, for example
when foo/__init__.py has something like "from foo import submod".
11 years ago
Paul Sokolovsky
69f1867da5
builtinimport: Fix thinko passing 0 vs NULL.
11 years ago
Damien George
b96c7c03ca
stmhal: Move fatfs volume/partition lookup table to ROM.
11 years ago
Damien George
60427864b1
stmhal: Move I2C objects to ROM.
11 years ago
Damien George
8c63ef187d
Merge pull request #465 from xbe/unix-gc
unix: Fix GC not tracing .data
11 years ago
Damien George
8f19317540
py: Remove useless implementations of NOT_EQUAL in binary_op's.
I'm pretty sure these are never reached, since NOT_EQUAL is always
converted into EQUAL in mp_binary_op. No one should call
type.binary_op directly, they should always go through mp_binary_op
(or mp_obj_is_equal).
11 years ago
Damien George
db049c2e00
py: Change inline to static inline for 2 functions.
11 years ago
Damien George
7b4330191f
py, compiler: Fix up creation of default positionals tuple.
With new order of evaluation of defaults, creating the tuple was done in
the wrong spot.
11 years ago
Damien George
c42e4b6c53
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
8b19db00aa
py, compiler: Fix compiling of keyword args following named star.
11 years ago
Paul Sokolovsky
b9b1c00c8a
showbs: Dump LOAD_CONST_BYTES.
11 years ago
Paul Sokolovsky
00a9d138b2
showbc: Dump LOAD_NULL.
11 years ago
Paul Sokolovsky
af620abcb5
py: Implement "from pkg import mod" variant of import.
11 years ago
Paul Sokolovsky
13d52df4c5
builtinimport: Set __path__ attribute on packages.
Per https://docs.python.org/3.3/reference/import.html , this is the way to
tell module from package: "Specifically, any module that contains a __path__
attribute is considered a package." And it for sure will be needed to
implement relative imports.
11 years ago
Paul Sokolovsky
e081329098
builtinimport: Elaborate debug output support.
11 years ago
Paul Sokolovsky
a925cb54f1
py: Preprocess qstrdefs.h before feeding to makeqstrdata.py.
This is alternative implementation of supporting conditionals in qstrdefs.h,
hard to say if it's much cleaner than munging #ifdef's in Python code...
11 years ago
Paul Sokolovsky
6ea0e928d8
Revert "makeqstrdata.py: Add support for conditionally defined qstrs."
This reverts commit acb133d1b1
.
Conditionals will be suported using C preprocessor.
11 years ago
Damien George
1184094839
py: Revert some inline functions back to macros, since they bloat stmhal.
11 years ago
xbe
a36a55d2cf
unix: Update comment in gccollect.c
11 years ago
Damien George
69b89d21b2
py: Change compile order for default positional and keyword args.
This simplifies the compiler a little, since now it can do 1 pass over
a function declaration, to determine default arguments. I would have
done this originally, but CPython 3.3 somehow had the default keyword
args compiled before the default position args (even though they appear
in the other order in the text of the script), and I thought it was
important to have the same order of execution when evaluating default
arguments. CPython 3.4 has changed the order to the more obvious one,
so we can also change.
11 years ago
Damien George
0e3329a6b8
py, compiler: Allow lambda's to yield.
11 years ago
Damien George
0288cf020e
py: Implement compiling of *-expr within parenthesis.
11 years ago
Damien George
a5c82a8187
py: Convert some macros to inline functions (in obj.h).
Also convert mp_obj_is_integer to an inline function.
Overall this decreased code size (at least on 32-bit x86 machine).
11 years ago
Damien George
e22d76e73b
py: Fix up object equality test.
It regressed a bit after implementing float/complex equality. Now it
should be improved, and support more equality tests.
11 years ago
Damien George
a9ddd6d9df
py: Simplify and improve mp_get_index.
It has (again) a fast path for ints, and a simplified "slow" path for
everything else.
Also simplify the way str indexing is done (now matches tuple and list).
11 years ago
Damien George
5f3fe3aa14
Merge branch 'master' of github.com:micropython/micropython
11 years ago
Damien George
b8a053aeb1
py: Implement float and complex == and !=.
Addresses issue #462 .
11 years ago
Damien George
87e380b7ea
Merge pull request #461 from lurch/patch-1
Update mkrules.mk
11 years ago
Damien George
686afc5c0a
py: Check that sequence has 2 elements for dict iterable constructor.
11 years ago
Paul Sokolovsky
be019ce063
objdict: Implement construction from iterable of pairs.
Pairs are limited to tuples so far.
11 years ago
Paul Sokolovsky
12a04392b9
objdict: Implement __getitem__ method.
11 years ago
Paul Sokolovsky
263853ef84
modffi: Update for latest binary API refactors.
11 years ago
Paul Sokolovsky
0c43cf9154
modstruct: Basic implementation of native struct alignment and types.
11 years ago
Paul Sokolovsky
ef9124f5ff
binary: Rename array accessors for clarity.
11 years ago
Paul Sokolovsky
2da81fa80c
mpconfig.h: Add basic support for target endianness configuration.
A specific target can define either MP_ENDIANNESS_LITTLE or MP_ENDIANNESS_BIG
to 1. Default is MP_ENDIANNESS_LITTLE.
TODO: Autodetect based on compiler predefined macros?
11 years ago