| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2015-04-22 | py: Fix printing of "inf" and "nan" floating point values. | Damien George | |
| 2015-04-21 | py: Clean up some bits and pieces in parser, grammar. | Damien George | |
| 2015-04-21 | py: Simplify grammar for stmt rule (this is also how CPython has it). | Damien George | |
| 2015-04-21 | stmhal: Implement os.uname() to get details of OS and hardware. | Damien George | |
| 2015-04-21 | py: Add sys.implementation, containing uPy name and version number. | Damien George | |
| Uses attrtuple if it's enabled, otherwise just a normal tuple. | |||
| 2015-04-21 | py: Add attrtuple object, for space-efficient tuples with attr access. | Damien George | |
| If you need the functionality of a namedtuple but will only make 1 or a few instances, then use an attrtuple instead. | |||
| 2015-04-20 | py: Make viper codegen raise proper exception (ViperTypeError) on error. | Damien George | |
| This fixes a long standing problem that viper code generation gave terrible error messages, and actually no errors on pyboard where assertions are disabled. Now all compile-time errors are raised as proper Python exceptions, and are of type ViperTypeError. Addresses issue #940. | |||
| 2015-04-19 | py/inlinethumb: Support for core floating point instructions. | = | |
| Adds support for the following Thumb2 VFP instructions, via the option MICROPY_EMIT_INLINE_THUMB_FLOAT: vcmp vsqrt vneg vcvt_f32_to_s32 vcvt_s32_to_f32 vmrs vmov vldr vstr vadd vsub vmul vdiv | |||
| 2015-04-19 | py: Fix builtin ord so that it can handle bytes values >= 0x80. | Damien George | |
| Addresses issue #1188. | |||
| 2015-04-18 | py/vstr.c: Allow vstr_printf to print correctly to a fixed buffer. | Damien George | |
| This patch allows vstr_printf to use all the available space of a fixed vstr buffer. vstr_printf is a good alternative to snprintf. | |||
| 2015-04-16 | py: Add %q format support to mp_[v]printf, and use it. | Damien George | |
| 2015-04-16 | py: Convert occurrences of non-debug printf to mp_printf. | Damien George | |
| 2015-04-16 | py: Make mp_sys_stdout_print object, wrapping sys.stdout for mp_print*. | Damien George | |
| So now all printing should go via either mp_plat_print or mp_sys_stdout_print. | |||
| 2015-04-16 | py: Overhaul and simplify printf/pfenv mechanism. | Damien George | |
| Previous to this patch the printing mechanism was a bit of a tangled mess. This patch attempts to consolidate printing into one interface. All (non-debug) printing now uses the mp_print* family of functions, mainly mp_printf. All these functions take an mp_print_t structure as their first argument, and this structure defines the printing backend through the "print_strn" function of said structure. Printing from the uPy core can reach the platform-defined print code via two paths: either through mp_sys_stdout_obj (defined pert port) in conjunction with mp_stream_write; or through the mp_plat_print structure which uses the MP_PLAT_PRINT_STRN macro to define how string are printed on the platform. The former is only used when MICROPY_PY_IO is defined. With this new scheme printing is generally more efficient (less layers to go through, less arguments to pass), and, given an mp_print_t* structure, one can call mp_print_str for efficiency instead of mp_printf("%s", ...). Code size is also reduced by around 200 bytes on Thumb2 archs. | |||
| 2015-04-16 | objarray: Support assignment of bytes to bytearray slice. | Paul Sokolovsky | |
| 2015-04-12 | py/formatfloat.c: Fix format of floating point numbers near 1.0. | Dave Hylands | |
| In particular, numbers which are less than 1.0 but which round up to 1.0. This also makes those numbers which round up to 1.0 to print with e+00 rather than e-00 for those formats which print exponents. Addresses issue #1178. | |||
| 2015-04-12 | objstr: split(None): Fix whitespace properly. | Paul Sokolovsky | |
| 2015-04-11 | py: In emitinlinethumb, use qstr_data instead of qstr_str and strlen. | Damien George | |
| 2015-04-11 | py: Remove old debugging printf's in compile.c. | Damien George | |
| 2015-04-11 | py: Combine load_attr and store_attr type methods into one (attr). | Damien George | |
| This simplifies the API for objects and reduces code size (by around 400 bytes on Thumb2, and around 2k on x86). Performance impact was measured with Pystone score, but change was barely noticeable. | |||
| 2015-04-09 | py: Provide typedefs for function types instead of writing them inline. | Damien George | |
| 2015-04-09 | py: Adjust some spaces in code style/format, purely for consistency. | Damien George | |
| 2015-04-09 | py: Use a dummy type for referring to extern structs | stijn | |
| Fixes msvc linker warnings about mismatching sizes between the mp_obj_fdfile_t struct defined in file.c and the mp_uint_t declarations found in modsys.c and modbuiltins.c | |||
| 2015-04-09 | py: Fix msvc warning '*/ found outside of comment' | stijn | |
| Also prevents some of the weaker syntax parsers out there treating the whole '*/*const*/' part as a comment | |||
| 2015-04-07 | py: Implement full func arg passing for native emitter. | Damien George | |
| This patch gets full function argument passing working with native emitter. Includes named args, keyword args, default args, var args and var keyword args. Fully Python compliant. It reuses the bytecode mp_setup_code_state function to do all the hard work. This function is slightly adjusted to accommodate native calls, and the native emitter is forced a bit to emit similar prelude and code-info as bytecode. | |||
| 2015-04-07 | py: Simplify bytecode prelude when encoding closed over variables. | Damien George | |
| 2015-04-06 | py: Implement calling functions with *args in native emitter. | Damien George | |
| 2015-04-07 | py: Add MICROPY_PY_BUILTINS_REVERSED, disable for minimal ports. | Paul Sokolovsky | |
| 2015-04-06 | py: Add MICROPY_PY_BUILTINS_ENUMERATE, disable for minimal ports. | Paul Sokolovsky | |
| 2015-04-04 | py: Implement delete for property and descriptors. | Damien George | |
| Without this patch deleting a property, or class with descriptor, will call the setter with a NULL value and lead to a crash. | |||
| 2015-04-04 | py: In str unicode, str_subscr will never be passed a bytes object. | Damien George | |
| 2015-04-04 | py: Some trivial cosmetic changes, for code style consistency. | Damien George | |
| 2015-04-04 | objstr: Fix bugs introduced by inability to have shadow variables. | Paul Sokolovsky | |
| Warnings lead to programming errors - as expected. | |||
| 2015-04-04 | objstr: Avoid variable shadowing. | Paul Sokolovsky | |
| 2015-04-04 | objstr: Add .splitlines() method. | Paul Sokolovsky | |
| splitlines() occurs ~179 times in CPython3 standard library, so was deemed worthy to implement. The method has subtle semantic differences from just .split("\n"). It is also defined as working for any end-of-line combination, but this is currently not implemented - it works only with LF line-endings (which should be OK for text strings on any platforms, but not OK for bytes). | |||
| 2015-04-03 | py: Fix bug in native emitter when closing over an argument. | Damien George | |
| 2015-04-03 | py: Get native emitter working again with x86 (now supports closures). | Damien George | |
| 2015-04-03 | py: Implement closures in native code generator. | Damien George | |
| Currently supports only x64 and Thumb2 archs. | |||
| 2015-04-03 | py: Implement (non-compliant) support for delete_fast in native emitter. | Damien George | |
| This implementation is smaller (in code size) than #1024. | |||
| 2015-04-03 | py: Make heap printing compatible with 16-bit word size. | Damien George | |
| 2015-04-03 | py: Allow MPZ_DIG_SIZE to be optionally configured by a port. | Damien George | |
| 2015-04-03 | py: Allow configurable object representation, with 2 different options. | Damien George | |
| 2015-04-02 | py: Add finer configuration of static funcs when not in stackless mode. | Damien George | |
| Also rename call_args_t to mp_call_args_t. | |||
| 2015-04-03 | vm: Support strict stackless mode, with proper exception reporting. | Paul Sokolovsky | |
| I.e. in this mode, C stack will never be used to call a Python function, but if there's no free heap for a call, it will be reported as RuntimeError (as expected), not MemoryError. | |||
| 2015-04-03 | vm: Implement stackless for CALL_FUNCTION_VAR_KW & CALL_METHOD_VAR_KW. | Paul Sokolovsky | |
| 2015-04-03 | runtime: Split mp_call_prepare_args_n_kw_var() from mp_call_method_n_kw_var(). | Paul Sokolovsky | |
| Allow for reuse for stackless design, where preparing args is separate from calling. | |||
| 2015-04-03 | vm: Stackless support for MP_BC_CALL_METHOD. | Paul Sokolovsky | |
| 2015-04-03 | vm: If there's no heap to call function in stackless manner, call via C stack. | Paul Sokolovsky | |
| 2015-04-03 | vm: Initial support for calling bytecode functions w/o C stack ("stackless"). | Paul Sokolovsky | |
| 2015-04-02 | makeqstrdata.py: Add support for strings with backslash escapes. | Paul Sokolovsky | |
