- Apr 06, 2014
-
-
Paul Sokolovsky authored
Two things: 1) set flags in copy properly; make mp_map_init() not be too smart and do something with requested alloc size. Policy of using prime numbers for alloc size is high-level policy which should be applied at corresponding high levels. Low-level functions should just do what they're asked to, because they don't have enough context to be smarter than that. For example, munging with alloc size of course breaks dict copying (as changing sizes requires rehashing).
-
Paul Sokolovsky authored
-
Damien George authored
On x64, native emitter now passes 70 of the tests.
-
Damien George authored
Also add command line option to unix port to select emitter.
-
Damien George authored
-
- Apr 05, 2014
-
-
Paul Sokolovsky authored
Based on the discussion in #433. mp_load_attr() is critical-path function, so any extra check will slowdown any script. As supporting default val required only for getattr() builtin, move correspending implementation there (still as a separate function due to concerns of maintainability of such almost-duplicated code instances).
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
This is to reduce ROM usage. stream_p is used in file and socket types only (at the moment), so seems a good idea to make the protocol functions a pointer instead of the actual structure. It saves 308 bytes of ROM in the stmhal/ port, 928 in unix/.
-
Paul Sokolovsky authored
-
Damien George authored
This makes isinstance(X, object) and issubclass(X, object) true for all X.
-
Damien George authored
Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
-
Damien George authored
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
-
Damien George authored
-
Damien George authored
-
Damien George authored
Implement del
-
Damien George authored
This does not affect code size or performance when debugging turned off. To address issue #420.
-
Damien George authored
-
Damien George authored
Change pfenv_print_int to take machine_uint_t rather than unsinged in
-
Damien George authored
Allow floating point arguments with %d,i,u,o,x,X formats
-
Damien George authored
py: Support 3-arg getattr() builtin (with default value).
-
Dave Hylands authored
With this change, the following works: >>> print('%#x' % 0x1234567890abcdef) 0x1234567890abcdef
-
Damien George authored
-
Damien George authored
Hash table can now be completely full (ie now NULL entry) before a resize is triggered. Use sentinel value to indicate delete entry in the table.
-
Damien George authored
-
Dave Hylands authored
-
Paul Sokolovsky authored
-
mux authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
map: When removing a key, don't NULL the entry, but mark as deleted.
-
Paul Sokolovsky authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
Quite natural to have d[int] = handle_int .
-