Commit message (Collapse) | Author | Age | |
---|---|---|---|
* | py: Add option to micropython.qstr_info() to dump actual qstrs. | Damien George | 2015-02-10 |
| | |||
* | 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 | 2015-02-09 |
| | | | | Addresses issue #1109. | ||
* | 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-09 |
| | |||
* | 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 | 2015-02-08 |
| | | | | | | | | | 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. | ||
* | py: Fix instance lookup, since object is not a real type. | Damien George | 2015-02-08 |
| | |||
* | py: Protect mp_parse and mp_compile with nlr push/pop block. | Damien George | 2015-02-07 |
| | | | | | | | | | | 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. | ||
* | py: Put mp_sys_path, mp_sys_argv and gc_collected in mp_state_ctx_t. | Damien George | 2015-02-07 |
| | | | | | Without mp_sys_path and mp_sys_argv in the root pointer section of the state, their memory was being incorrectly collected by GC. | ||
* | py: Make list.sort keep stack usage within O(log(N)) bound. | Damien George | 2015-02-02 |
| | | | | | | | Also fix list.sort so it works with user-defined types, and parse the keyword arguments properly. Addresses issue #338. | ||
* | py: Fix cmath.log10; fix printing of complex number with negative imag. | Damien George | 2015-02-02 |
| | |||
* | py: Add MICROPY_PY_ALL_SPECIAL_METHODS and __iadd__ special method under it. | Paul Sokolovsky | 2015-01-31 |
| | |||
* | py: Convert CR to LF and CR LF to LF in lexer. | Damien George | 2015-01-30 |
| | | | | | Only noticeable difference is how newlines are encoded in triple-quoted strings. The behaviour now matches CPython3. | ||
* | 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-29 |
| | |||
* | py: Make REPL printing function print repr of object, not str. | Damien George | 2015-01-28 |
| | | | | Addresses issue #1014. | ||
* | py: Change vstr so that it doesn't null terminate buffer by default. | Damien George | 2015-01-28 |
| | | | | | | | | | 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. | ||
* | 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-28 |
| | |||
* | py: Add support for floats in mp_binary_{get,set}_val() | David Steinberg | 2015-01-27 |
| | | | | - This then provides support for floats in the struct package | ||
* | py: Specify unary/binary op name in TypeError error message. | Damien George | 2015-01-27 |
| | | | | | | | 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. | ||
* | py: Fix comparison of minus-zero long int. | Damien George | 2015-01-27 |
| | |||
* | py: Check for NDEBUG using #ifdef rather than #if. | Damien George | 2015-01-25 |
| | | | | | Defining NDEBUG (to any value, even 0) disables debugging. Otherwise, if it's not defined, debugging is enabled. | ||
* | py: Don't use anonymous unions, name them instead. | Damien George | 2015-01-24 |
| | | | | This makes the code (more) compatible with the C99 standard. | ||
* | py: Be more machine-portable with size of bit fields. | Damien George | 2015-01-24 |
| | |||
* | py: Use float-to-int classifications for mp_obj_new_int_from_float() functions | David Steinberg | 2015-01-24 |
| | |||
* | py: Add float-to-int classification function | David Steinberg | 2015-01-24 |
| | |||
* | py: Fix issue in mpz_set_from_float() when mp_int_t is larger than float | David Steinberg | 2015-01-24 |
| | |||
* | py: Move mp_float_t related defines to misc.h | David Steinberg | 2015-01-24 |
| | |||
* | py: Fix segfault in namedtuple when name is a non-interned string | stijn | 2015-01-24 |
| | | | | | | | | - namedtuple was wrongly using MP_OBJ_QSTR_VALUE instead of mp_obj_str_get_qstr, so when passed a non-interned string it would segfault; fix this by using mp_obj_str_get_qstr - store the namedtuple field names as qstrs so it is not needed to use mp_obj_str_get_qstr everytime the field name has to be accessed. This also slighty increases performance when fetching attributes | ||
* | binary: Rework array accessors. They work with native, not stdint types. | Paul Sokolovsky | 2015-01-24 |
| | |||
* | stream: readall(): Make sure there's a trailing NUL char. | Paul Sokolovsky | 2015-01-24 |
| | |||
* | stream: Fix readall() implementation in respect to NUL terminator bytes. | Paul Sokolovsky | 2015-01-23 |
| | | | | After vstr refactor. Fixes #1084. | ||
* | objstr: Remove code duplication and unbreak Windows build. | Paul Sokolovsky | 2015-01-23 |
| | | | | | | | | There was really weird warning (promoted to error) when building Windows port. Exact cause is still unknown, but it uncovered another issue: 8-bit and unicode str_make_new implementations should be mutually exclusive, and not built at the same time. What we had is that bytes_decode() pulled 8-bit str_make_new() even for unicode build. | ||
* | objstr*: Use separate names for locals_dict of 8-bit and unicode str's. | Paul Sokolovsky | 2015-01-23 |
| | | | | To somewhat unbreak -DSTATIC="" compile. | ||
* | py: Allow asmx64 to compile with -Wsign-compare. | Damien George | 2015-01-22 |
| | | | | See issue #699. | ||
* | stmhal: Put mod_network_nic_list in global root-pointer state. | Damien George | 2015-01-22 |
| | | | | It needs to be scanned by GC. Thanks to Daniel Campora. | ||
* | py: Add comments for vstr_init and mp_obj_new_str. | Damien George | 2015-01-21 |
| | |||
* | py: Remove mp_obj_str_builder and use vstr instead. | Damien George | 2015-01-21 |
| | | | | | | | | | | | | With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64. | ||
* | py: Add mp_obj_new_str_from_vstr, and use it where relevant. | Damien George | 2015-01-21 |
| | | | | | | | | This patch allows to reuse vstr memory when creating str/bytes object. This improves memory usage. Also saves code ROM: 128 bytes on stmhal, 92 bytes on bare-arm, and 88 bytes on unix x64. | ||
* | builtinimport: Make sure that qstr is used properly to load frozen modules. | Paul Sokolovsky | 2015-01-21 |
| | |||
* | py: Implement proper re-raising in native codegen's finally handler. | Damien George | 2015-01-21 |
| | | | | | This allows an exception to propagate correctly through a finally handler. | ||
* | py: Implement __reversed__ slot. | Damien George | 2015-01-21 |
| | | | | Addresses issue #1073. | ||
* | py: Prevent segfault for operations on closed StringIO. | stijn | 2015-01-20 |
| | | | | Addresses issue #1067. | ||
* | py: Use mp_arg_check_num in some _make_new functions. | Damien George | 2015-01-20 |
| | | | | Reduces stmhal code size by about 250 bytes. | ||
* | py, unix: Allow to compile with -Wunused-parameter. | Damien George | 2015-01-20 |
| | | | | See issue #699. | ||
* | py, unix, stmhal: Allow to compile with -Wshadow. | Damien George | 2015-01-20 |
| | | | | See issue #699. |