Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-02-17 | py: Revamp mp_obj_print() to use Python streams. | Paul Sokolovsky | |
Most of printing infrastructure now uses streams, but mp_obj_print() used libc's printf(), which led to weird buffering issues in output. So, switch mp_obj_print() to streams too, even though it may make sense to move it to a separate file, as it is purely a debugging function now. | |||
2015-02-16 | py: Implement bl/bx instructions for inline Thumb assembler. | Damien George | |
2015-02-16 | py: Implement "it" instruction for inline Thumb assembler. | Damien George | |
2015-02-16 | py: More robust checking in inline assembler compiler. | Damien George | |
2015-02-16 | builtinimport: Revamp&refactor handling of relative imports. | Paul Sokolovsky | |
Relative imports are based of a package, so we're currently at a module within a package, we should get to package first. Also, factor out path travsering operation, but this broke testing for boundary errors with relative imports. TODO: reintroduce them, together with proper tests. | |||
2015-02-16 | builtinimport: Improve debugging output. | Paul Sokolovsky | |
2015-02-15 | stackctrl: Encode "recursion depth exceeded" message as qstr. | Paul Sokolovsky | |
So corresponding exception can be thrown even under tight memory conditions. | |||
2015-02-15 | objexcept: Optimize traceback allocation for exception. | Paul Sokolovsky | |
Traceback allocation for exception will now never lead to recursive MemoryError exception - if there's no memory for traceback, it simply won't be created. | |||
2015-02-15 | objexcept: Optimize using messages without formatting substitutions. | Paul Sokolovsky | |
They are directly cast to str object, skipping allocation of formatting buffer. | |||
2015-02-15 | nlr: Add even more optional debugging logging. | Paul Sokolovsky | |
Has to be enabled by manual editing, but at least it's there, as debugging NLR issues may be weird. | |||
2015-02-15 | nlr: If DEBUG, guard against recursive nlr_push(). | Paul Sokolovsky | |
Pushing same NLR record twice would lead to "infinite loop" in nlr_jump (but more realistically, it will crash as soon as NLR record on stack is overwritten). | |||
2015-02-15 | py: Make old_globals part of mp_code_state structure. | Paul Sokolovsky | |
Conceptually it is part of code state, so let it be allocated in the same way as the rest of state. | |||
2015-02-15 | py: Use TextIOWrapper only if PY_IO_FILEIO def'd; cast size_t for print. | Damien George | |
2015-02-15 | py: Simplify and remove redundant code for __iter__ method lookup. | Damien George | |
2015-02-15 | py: Fix loading of immediate pointer in Thumb assembler. | Damien George | |
Addresses issue #1117. | |||
2015-02-15 | py: Check for valid file when creating lexer for execfile. | Damien George | |
Addresses issue #1119. | |||
2015-02-14 | py: Cleanup duplication in instance_is_callable/instance_call. | stijn | |
2015-02-14 | py: Add setattr builtin. | stijn | |
2015-02-14 | py/asm*.c: Typo fixes in comments. | Paul Sokolovsky | |
2015-02-13 | py: Implement clz and rbit for inline Thumb assembler. | Damien George | |
2015-02-13 | py: Implement sdiv/udiv for inline Thumb assembler. | Damien George | |
2015-02-13 | py: Implement push/pop for inline Thumb assembler. | Damien George | |
2015-02-13 | py: Expose compile.c:list_get as mp_parse_node_extract_list. | Damien George | |
2015-02-13 | py: Make inline assembler raise proper SyntaxError exception on error. | Damien George | |
Also gives line number of location of error. Very useful! | |||
2015-02-12 | py: Add ldrex and strex to thumb2 inline assembler. | Damien George | |
These are useful for implementing atomic lock operations. | |||
2015-02-10 | py: Reuse value stack in VM WITH_CLEANUP opcode to reduce C-stack size. | Damien George | |
Saves 8 bytes C-stack on stmhal and 16 bytes on unix x86. | |||
2015-02-10 | py: Add option to micropython.qstr_info() to dump actual qstrs. | Damien George | |
2015-02-09 | py: Don't unnecessarily create a bound method. | Damien George | |
2015-02-09 | py: Allow subclass of native object to delegate to the native buffer_p. | Damien George | |
Addresses issue #1109. | |||
2015-02-09 | py: Remove obsolete MP_F_LOAD_CONST_{INT,DEC} from emitnative.c. | Damien George | |
2015-02-09 | objstr: Fix bytes creation from array of long ints. | Paul Sokolovsky | |
2015-02-08 | py: Add MICROPY_OBJ_BASE_ALIGNMENT to help with 16-bit ports. | Damien George | |
2015-02-08 | py: Initialise variables in mp_parse correctly, to satisfy gcc warning. | Damien George | |
2015-02-08 | py: Parse big-int/float/imag constants directly in parser. | Damien George | |
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. | |||
2015-02-08 | py: Fix instance lookup, since object is not a real type. | Damien George | |
2015-02-07 | py: Protect mp_parse and mp_compile with nlr push/pop block. | Damien George | |
To enable parsing constants more efficiently, mp_parse should be allowed to raise an exception, and mp_compile can already raise a MemoryError. So these functions need to be protected by an nlr push/pop block. This patch adds that feature in all places. This allows to simplify how mp_parse and mp_compile are called: they now raise an exception if they have an error and so explicit checking is not needed anymore. | |||
2015-02-07 | py: Put mp_sys_path, mp_sys_argv and gc_collected in mp_state_ctx_t. | Damien George | |
Without mp_sys_path and mp_sys_argv in the root pointer section of the state, their memory was being incorrectly collected by GC. | |||
2015-02-02 | py: Make list.sort keep stack usage within O(log(N)) bound. | Damien George | |
Also fix list.sort so it works with user-defined types, and parse the keyword arguments properly. Addresses issue #338. | |||
2015-02-02 | py: Fix cmath.log10; fix printing of complex number with negative imag. | Damien George | |
2015-01-31 | py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it. | Paul Sokolovsky | |
2015-01-30 | py: Convert CR to LF and CR LF to LF in lexer. | Damien George | |
Only noticeable difference is how newlines are encoded in triple-quoted strings. The behaviour now matches CPython3. | |||
2015-01-29 | py: Implement Ellipsis object in native emitter. | Damien George | |
2015-01-29 | py: Change vstr_null_terminate -> vstr_null_terminated_str, returns str. | Damien George | |
2015-01-28 | py: Make REPL printing function print repr of object, not str. | Damien George | |
Addresses issue #1014. | |||
2015-01-28 | py: Change vstr so that it doesn't null terminate buffer by default. | Damien George | |
This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate. | |||
2015-01-28 | py: bytes(): Make sure we add values as bytes, not as chars. | Paul Sokolovsky | |
2015-01-28 | py: Remove duplicated mp_obj_str_make_new function from objstrunicode.c. | Damien George | |
2015-01-28 | py: Be more precise about unicode type and disabled unicode behaviour. | Damien George | |
2015-01-27 | py: Add support for floats in mp_binary_{get,set}_val() | David Steinberg | |
- This then provides support for floats in the struct package | |||
2015-01-27 | py: Specify unary/binary op name in TypeError error message. | Damien George | |
Eg, "() + 1" now tells you that __add__ is not supported for tuple and int types (before it just said the generic "binary operator"). We reuse the table of names for slot lookup because it would be a waste of code space to store the pretty name for each operator. |