- 14 Jan, 2016 2 commits
-
-
chrysn authored
this allows python code to use property(lambda:..., doc=...) idiom. named versions for the fget, fset and fdel arguments are left out in the interest of saving space; they are rarely used and easy to enable when actually needed. a test case is included.
-
stijn authored
This is essentially a duplicate of obj_dict.py
-
- 13 Jan, 2016 3 commits
-
-
Peter Hinch authored
-
Damien George authored
Makes code easier to read and more maintainable.
-
Damien George authored
-
- 12 Jan, 2016 1 commit
-
-
Antonin ENFRUN authored
-
- 11 Jan, 2016 5 commits
-
-
Damien George authored
-
Dave Hylands authored
-
Damien George authored
The first argument to the type.make_new method is naturally a uPy type, and all uses of this argument cast it directly to a pointer to a type structure. So it makes sense to just have it a pointer to a type from the very beginning (and a const pointer at that). This patch makes such a change, and removes all unnecessary casting to/from mp_obj_t.
-
Damien George authored
With this patch the n_args parameter is changed type from mp_uint_t to size_t.
-
Damien George authored
This patch changes the type signature of .make_new and .call object method slots to use size_t for n_args and n_kw (was mp_uint_t. Makes code more efficient when mp_uint_t is larger than a machine word. Doesn't affect ports when size_t and mp_uint_t have the same size.
-
- 10 Jan, 2016 3 commits
-
-
Dave Hylands authored
-
Paul Sokolovsky authored
Instead of struct tm like structure, as required by CPython.
-
Damien George authored
-
- 09 Jan, 2016 1 commit
-
-
Paul Sokolovsky authored
Replace hyphens with undescores in modules.
-
- 08 Jan, 2016 9 commits
-
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
This allows a port to specify exactly how many bits are in a small int (eg for a uPy bytecode cross compiler).
-
Damien George authored
-
Damien George authored
In some cases ssize_t is not defined by already included headers.
-
Damien George authored
Need to record in .mpy file whether unicode is enabled, and how many bits are in a small int.
-
- 07 Jan, 2016 10 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
Minimal support code for a Cortex-M CPU is added, along with set-up code for an STM32F4xx MCU, including a UART for a REPL. Tested on a pyboard. Code size is 77592 bytes.
-
Damien George authored
-
Damien George authored
They are no longer needed because stm constants can now be 32 bits wide.
-
Damien George authored
Adds 924 bytes of code, but means that no more hacks and work-arounds are needed due to large constants becoming negative.
-
Damien George authored
movwt can now move a full 32-bit constant into a register.
-
Damien George authored
-
Damien George authored
Constant folding in the parser can now operate on big ints, whatever their representation. This is now possible because the parser can create parse nodes holding arbitrary objects. For the case of small ints the folding is still efficient in RAM because the folded small int is stored inplace in the parse node. Adds 48 bytes to code size on Thumb2 architecture. Helps reduce heap usage because more constants can be computed at compile time, leading to a smaller parse tree, and most importantly means that the constants don't have to be computed at runtime (perhaps more than once). Parser will now be a little slower when folding due to calls to runtime to do the arithmetic.
-
Damien George authored
This function returns the sign (-1, 0 or 1) of the integer object.
-
Damien George authored
Before this patch, (x+y)*z would be parsed to a tree that contained a redundant identity parse node corresponding to the parenthesis. With this patch such nodes are optimised away, which reduces memory requirements for expressions with parenthesis, and simplifies the compiler because it doesn't need to handle this identity case. A parenthesis parse node is still needed for tuples.
-
- 04 Jan, 2016 4 commits
-
-
Henrik Sölver authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Handles, eg, "{:>20}".format("foo"), where there is no explicit spec for the type of the argument.
-
- 03 Jan, 2016 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-