summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2014-04-24Makefile: Allow to override "super optimization" options used for some files.Paul Sokolovsky
To help with debugging issue like #510 for example.
2014-04-23showbc: MAKE_CLOSURE*: Update for new closed-over encoding.Paul Sokolovsky
2014-04-23emitglue: Typo fix in var name.Paul Sokolovsky
2014-04-22builtinimport: If there was error compiling imported module, raise exception.Paul Sokolovsky
2014-04-22objexcept: Add mp_obj_new_exception_arg1() convenience function.Paul Sokolovsky
2014-04-21py: Add 'align' and 'data' meta-instructions to inline assembler.Damien George
2014-04-21py: Fix super() bug, where it didn't allow instance access.Damien George
This is a one-liner fix. It gets the class-super.py test passing, but is probably not a complete fix.
2014-04-21Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-21py: Small change to mp_arg_parse_all.Damien George
2014-04-20py: Add win32-specific header for alloca().Paul Sokolovsky
2014-04-20nlrx86.S: Another ifdef for win32 symbol underscoring issues.Paul Sokolovsky
2014-04-20objarray: Slice subscription operation: properly test for op subtype.Paul Sokolovsky
Also, checked that both bytearray and array.array actually support generic (a-la list) slice assignment and deletion. Added TODOs.
2014-04-20gc: gc_realloc(): Fix byte-to-block calculation.Paul Sokolovsky
2014-04-20py, gc: Further simplify coding-style of gc_realloc.Damien George
No logic changes, just coding style to make it easy to read.
2014-04-20py: Wrap #if's around emitter functions that are used only by emitcpy.Damien George
3 emitter functions are needed only for emitcpy, and so we can #if them out when compiling with emitcpy support. Also remove unused SETUP_LOOP bytecode.
2014-04-20py: Making closures now passes pointer to stack, not a tuple for vars.Damien George
Closed over variables are now passed on the stack, instead of creating a tuple and passing that. This way memory for the closed over variables can be allocated within the closure object itself. See issue #510 for background.
2014-04-20objclosure: Store reference to entire closed variables tuple.Paul Sokolovsky
Avoids pointer-to-field garbage collection issue. Fixes #510.
2014-04-20objcell: Add disabled by default print method for debugging.Paul Sokolovsky
2014-04-20gc: "new" gc_realloc: Rewrite in plain C, fixing bunch of bugs.Paul Sokolovsky
There were typos, various rounding errors trying to do concurrent counting in bytes vs blocks, complex conditional paths, superfluous variables, etc., etc., all leading to obscure segfaults.
2014-04-20gc: Recover simple gc_realloc implementation, make easier to switch between.Paul Sokolovsky
2014-04-20modstruct: Add 'O' typecode for passing mp_obj_t.Paul Sokolovsky
Useful as callback data, etc.
2014-04-20modstruct: Use proper int accessor which checks input value type.Paul Sokolovsky
2014-04-20Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-20py: Fix mp_arg_parse_all.Damien George
2014-04-20py: Add arg checking helper functions.Damien George
These are to assist in writing native C functions that take positional and keyword arguments. mp_arg_check_num is for just checking the number of arguments is correct. mp_arg_parse_all is for parsing positional and keyword arguments with default values.
2014-04-19objarray: Implement slice subscription.Paul Sokolovsky
2014-04-19modstruct: Initial implementation of struct.pack().Paul Sokolovsky
2014-04-19objstr: Init hash in mp_obj_str_builder_start() to 0.Paul Sokolovsky
2014-04-19obj.h: Typo fix in comment.Paul Sokolovsky
2014-04-19modstruct: Fix .calcsize() to account for struct type/alignment.Paul Sokolovsky
2014-04-19modstruct: Support 'q' & 'Q' type codes.Paul Sokolovsky
2014-04-18Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-18py: Add mp_binary_set_val_array_from_int, to store an int directly.Damien George
2014-04-18py: Allow to pass buffer protocol flags to get_buffer helper funcs.Damien George
2014-04-18py: Add typecode to buffer protocol.Damien George
When querying an object that supports the buffer protocol, that object must now return a typecode (as per binary.[ch]). This does not have to be honoured by the caller, but can be useful for determining element size.
2014-04-18py: Tidy up function argument error messages.Damien George
We are not as verbose as CPython, and maybe a bit too cryptic sometimes.
2014-04-18py: Tidy up array.array; add more error handling.Damien George
2014-04-18sequence: Further simplify sequence comparison.Paul Sokolovsky
2014-04-18sequence: Fix glaring bug in sequence comparison.Paul Sokolovsky
2014-04-18objfloat: Try to achieve the same float printing format as CPython does.Paul Sokolovsky
Test usecase I used is print(time.time()) and print(time.time() - time.time()). On Linux/Glibc they now give the same output as CPython 3.3. Specifically, time.time() gives non-exponential output with 7 decimal digits, and subtraction gives exponential output e-06/e-07.
2014-04-18inlinethumb: Add wfi, cpsid and cpsie instructions.Damien George
2014-04-18py: from import * should not import symbols starting with underscore.Paul Sokolovsky
I skipped implementing this initially, but then it causes __name__ of current module be overwritten and relative imports fail.
2014-04-17py: Rename USE_COMPUTED_GOTOS to USE_COMPUTED_GOTO and enable on stmhal.Damien George
On stmhal, computed gotos make the binary about 1k bigger, but makes it run faster, and we have the room, so why not. All tests pass on pyboard using computed gotos.
2014-04-17py: Add MP_OBJ_STOP_ITERATION and make good use of it.Damien George
Also make consistent use of MP_OBJ_NOT_SUPPORTED and MP_OBJ_NULL. This helps a lot in debugging and understanding of function API.
2014-04-17py: Merge BINARY_OP_SUBSCR and store_subscr (w/ delete) into subscr.Damien George
mp_obj_t->subscr now does load/store/delete.
2014-04-17py: Simplify objfun/objgenerator connection, no need to call bc_get.Damien George
2014-04-17Merge branch 'master' of github.com:micropython/micropythonDamien George
2014-04-17py: Fix pfenv_print_strn to return correct number of chars printed.Damien George
With this fix, all tests in tests/basics pass on pyboard.
2014-04-17objgenerator: Generator must execute in its defining lexical context.Paul Sokolovsky
I.e. with its own globals. So, just as for functions, we need to switch globals when resuming a generator.
2014-04-17objfun: Add local header.Paul Sokolovsky
This follows pattern already used for objtuple, etc.: objfun.h's content is not public - each and every piece of code should not have access to it. It's not private either - with out architecture and implementation language (C) it doesn't make sense to keep implementation of each object strictly private and maintain cumbersome accessors. It's "local" - intended to be used by a small set of "friend" (in C++ terms) objects.