summaryrefslogtreecommitdiff
path: root/py/bc.c
AgeCommit message (Collapse)Author
2015-09-04py: Eliminate some cases which trigger unused parameter warnings.Damien George
2015-04-16py: Add %q format support to mp_[v]printf, and use it.Damien George
2015-04-07py: 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-07py: Simplify bytecode prelude when encoding closed over variables.Damien George
2015-04-03vm: Initial support for calling bytecode functions w/o C stack ("stackless").Paul Sokolovsky
2015-03-20py: Allow retrieving a function's __name__.stijn
Disabled by default. Enabled on unix and stmhal ports.
2015-01-16py, unix: Allow to compile with -Wsign-compare.Damien George
See issue #699.
2015-01-01py: Move to guarded includes, everywhere in py/ core.Damien George
Addresses issue #1022.
2015-01-01py: Make terse_arg_mismatch a global function and use it elsewhere.Damien George
Reduces code size when MICROPY_ERROR_REPORTING_TERSE is selected.
2014-11-05py: Fix some macros defines; cleanup some includes.Damien George
2014-10-25py: Store bytecode arg names in bytecode (were in own array).Damien George
This saves a lot of RAM for 2 reasons: 1. For functions that don't have default values, var args or var kw args (which is a large number of functions in the general case), the mp_obj_fun_bc_t type now fits in 1 GC block (previously needed 2 because of the extra pointer to point to the arg_names array). So this saves 16 bytes per function (32 bytes on 64-bit machines). 2. Combining separate memory regions generally saves RAM because the unused bytes at the end of the GC block are saved for 1 of the blocks (since that block doesn't exist on its own anymore). So generally this saves 8 bytes per function. Tested by importing lots of modules: - 64-bit Linux gave about an 8% RAM saving for 86k of used RAM. - pyboard gave about a 6% RAM saving for 31k of used RAM.
2014-10-03py: Convert [u]int to mp_[u]int_t where appropriate.Damien George
Addressing issue #50.
2014-09-04py: Use variable length encoded uints in more places in bytecode.Damien George
Code-info size, block name, source name, n_state and n_exc_stack now use variable length encoded uints. This saves 7-9 bytes per bytecode function for most functions.
2013-10-05Further factorise PASS_1 out of specific emit code.Damien
2013-10-04Initial commit.Damien