Damien George
96e37d3bb8
tests: Add tests for inline assembler beq_n and beq_w ops.
10 years ago
Damien George
2af921fb51
tests: Add tests for op special meths, ubinascii, complex.
10 years ago
Damien George
47538cc880
tests: Add test for micropython const feature when it has a SyntaxError.
10 years ago
Paul Sokolovsky
992284be39
tests: Add test for array slice assignment.
10 years ago
Damien George
b67253e96f
tests: Update pyb/uart.py test since baudrate of 1200 is too low.
10 years ago
Damien George
4852e09c79
py: Fix adding of traceback so that it appends to existing info.
This makes exception traceback info self contained (ie doesn't rely on
list object, which was a bit of a hack), reduces code size, and reduces
RAM footprint of exception by eliminating the list object.
Addresses part of issue #1126 .
10 years ago
Damien George
626ee90ce1
tests: Add more tests for pyb.Timer class.
10 years ago
Damien George
5c047b97f2
tests: Add test for math special functions.
10 years ago
Damien George
4e3906d6b5
tests: Add tests for ure groups and named char classes.
Issue #1122 should now be fixed.
10 years ago
Paul Sokolovsky
2e24034c3f
run-tests-exp.sh: Typo fix in comment.
10 years ago
Damien George
eff10f66a6
py: Implement bl/bx instructions for inline Thumb assembler.
10 years ago
Paul Sokolovsky
ee831cafa9
tests: Add another testcase for relative imports.
10 years ago
Henrik Sölver
f80f1a7077
stmhal: Add support for CAN rx callbacks.
10 years ago
Damien George
ed8b4da0db
tests: Remove obsolete test; don't use fp in micropython/ tests.
10 years ago
Damien George
f6532bb9e0
py: Simplify and remove redundant code for __iter__ method lookup.
10 years ago
Damien George
d1c3788375
py: Fix loading of immediate pointer in Thumb assembler.
Addresses issue #1117 .
10 years ago
stijn
c1832fd206
py: Add setattr builtin.
10 years ago
Damien George
baafb290ad
stmhal: Add uart.sendbreak() method, to send a break condition.
10 years ago
Damien George
192d536fe4
py: Implement clz and rbit for inline Thumb assembler.
10 years ago
Damien George
32f0b7942c
py: Implement sdiv/udiv for inline Thumb assembler.
10 years ago
Damien George
0d967b8ae4
py: Implement push/pop for inline Thumb assembler.
10 years ago
Damien George
48244044a2
py: Allow subclass of native object to delegate to the native buffer_p.
Addresses issue #1109 .
10 years ago
Paul Sokolovsky
194117a066
objstr: Fix bytes creation from array of long ints.
10 years ago
Damien George
7d414a1b52
py: Parse big-int/float/imag constants directly in parser.
Previous to this patch, a big-int, float or imag constant was interned
(made into a qstr) and then parsed at runtime to create an object each
time it was needed. This is wasteful in RAM and not efficient. Now,
these constants are parsed straight away in the parser and turned into
objects. This allows constants with large numbers of digits (so
addresses issue #1103 ) and takes us a step closer to #722 .
10 years ago
Damien George
5f64dc55d8
extmod: Make ujson.loads raise exception if given empty string.
Addresses issue #1097 .
10 years ago
Damien George
e8b877be60
tests: Disable float/cmath_fun.py for native emitter.
10 years ago
Damien George
744e767458
py: Make list.sort keep stack usage within O(log(N)) bound.
Also fix list.sort so it works with user-defined types, and parse the
keyword arguments properly.
Addresses issue #338 .
10 years ago
Damien George
ae3150cb5c
tests: Add test for cmath module.
10 years ago
Damien George
32bade19d9
py: Convert CR to LF and CR LF to LF in lexer.
Only noticeable difference is how newlines are encoded in triple-quoted
strings. The behaviour now matches CPython3.
10 years ago
Damien George
92ab95f215
tests: Add some tests to improve coverage.
10 years ago
Damien George
26c0b155fa
tests: Make float/int_power.py pass on pyboard/single prec float.
10 years ago
Damien George
12c66be2b8
tests: Add some tests to improve coverage.
Used gcov to find some parts of vm.c, runtime.c, obj.c that were not
covered by any tests. Still need to use gcov more thoroughly.
10 years ago
Paul Sokolovsky
57aebe1714
tests: Add testcase for bytes() on values in range 128-255.
10 years ago
Paul Sokolovsky
2324f3ef29
moduzlib: Implement raw DEFLATE decoding support.
10 years ago
David Steinberg
0b3014ce3a
py: Add support for floats in mp_binary_{get,set}_val()
- This then provides support for floats in the struct package
10 years ago
Damien George
a9dc9b8f6d
py: Fix comparison of minus-zero long int.
10 years ago
David Steinberg
4c1a7e0d6a
tests: Update float2int tests for new range classifications
- Tests vary based on build configuration (32/64-bit and internal int type).
- Added tests for exceptions raised on overflow of int type.
10 years ago
Paul Sokolovsky
66b060f3e6
tests: Fix typo in file_long_read3.py.
10 years ago
Paul Sokolovsky
444331c07f
modujson: .loads(): Handle more whitespace characters.
10 years ago
Paul Sokolovsky
1f04336b23
tests: Add extra test for reading multiple of internal chunk size.
10 years ago
Paul Sokolovsky
220d21e1bf
tests: Add testcase for reading amounts bigger than buffer/chunk size.
10 years ago
Damien George
6d1f5070ce
lib/libm: Add frexp and modf functions; use in stmhal; add tests.
Addresses issue #1081 .
10 years ago
Damien George
b6e6b5277f
py: Implement proper re-raising in native codegen's finally handler.
This allows an exception to propagate correctly through a finally
handler.
10 years ago
Damien George
962a5d50c9
py: Implement __reversed__ slot.
Addresses issue #1073 .
10 years ago
stijn
bf19541f46
py: Prevent segfault for operations on closed StringIO.
Addresses issue #1067 .
10 years ago
Damien George
1e1779eacf
py: Reluctantly add an extra pass to bytecode compiler.
Bytecode also needs a pass to compute the stack size. This is because
the state size of the bytecode function is encoded as a variable uint,
so we must know the value of this uint before we encode it (otherwise
the size of the generated code changes from one pass to the next).
Having an entire pass for this seems wasteful (in time). Alternative is
to allocate fixed space for the state size (would need 3-4 bytes to be
general, when 1 byte is usually sufficient) which uses a bit of extra
RAM per bytecode function, and makes the code less elegant in places
where this uint is encoded/decoded.
So, for now, opt for an extra pass.
10 years ago
Damien George
4c81ba8015
py: Never intern data of large string/bytes object; add relevant tests.
Previously to this patch all constant string/bytes objects were
interned by the compiler, and this lead to crashes when the qstr was too
long (noticeable now that qstr length storage defaults to 1 byte).
With this patch, long string/bytes objects are never interned, and are
referenced directly as constant objects within generated code using
load_const_obj.
10 years ago
Damien George
c38dc3ccc7
py: Implement fallback for equality check for all types.
Return "not equal" for objects that don't implement equality check.
This is as per Python specs.
10 years ago
Paul Sokolovsky
7bfe4b21b9
tests: Make ffi_callback.py be able to run on uclibc and macosx.
Similar to ffi_float.py.
10 years ago
Damien George
c33ecb83ba
tests: Add test for when instance member overrides class member.
10 years ago