circuitpython/py
Damien George 1e1779eacf py: Reluctantly add an extra pass to bytecode compiler.
Bytecode also needs a pass to compute the stack size.  This is because
the state size of the bytecode function is encoded as a variable uint,
so we must know the value of this uint before we encode it (otherwise
the size of the generated code changes from one pass to the next).

Having an entire pass for this seems wasteful (in time).  Alternative is
to allocate fixed space for the state size (would need 3-4 bytes to be
general, when 1 byte is usually sufficient) which uses a bit of extra
RAM per bytecode function, and makes the code less elegant in places
where this uint is encoded/decoded.

So, for now, opt for an extra pass.
2015-01-14 00:20:28 +00:00
..
argcheck.c msvc: Fix unresolved mp_arg_error_terse_mismatch since 7f23384 2015-01-02 16:53:54 +01:00
asmarm.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
asmarm.h py: Add guarded includes for asm-based headers. 2015-01-01 18:07:43 +00:00
asmthumb.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
asmthumb.h py: Add guarded includes for asm-based headers. 2015-01-01 18:07:43 +00:00
asmx64.c py: Make a function static and comment out those not used. 2015-01-12 22:22:46 +00:00
asmx64.h py: Add guarded includes for asm-based headers. 2015-01-01 18:07:43 +00:00
asmx86.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
asmx86.h py: Add guarded includes for asm-based headers. 2015-01-01 18:07:43 +00:00
bc.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
bc.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
bc0.h py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
binary.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
binary.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
builtin.h py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
builtinevex.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
builtinimport.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
compile.c py: Reluctantly add an extra pass to bytecode compiler. 2015-01-14 00:20:28 +00:00
compile.h py: Move to guarded includes for compile.h and related headers. 2014-12-27 16:12:17 +02:00
emit.h py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
emitbc.c py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
emitcommon.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
emitcpy.c py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
emitglue.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
emitglue.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
emitinlinethumb.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
emitnative.c py, unix: Trace root pointers with native emitter under unix port. 2015-01-14 00:11:09 +00:00
emitpass1.c py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
formatfloat.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
formatfloat.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
gc.c py, unix, lib: Allow to compile with -Wold-style-definition. 2015-01-12 22:34:38 +00:00
gc.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
grammar.h py: Allow to properly disable builtin slice operation. 2014-12-27 17:33:30 +00:00
lexer.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
lexer.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
lexerstr.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
lexerunix.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
makeqstrdata.py py/makeqstrdata.py: Make it work again with both Python2 and Python3. 2015-01-11 22:40:38 +00:00
malloc.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
map.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
misc.h py: Add include guards to mpconfig,misc,qstr,obj,runtime,parsehelper. 2014-12-29 01:02:19 +00:00
mkenv.mk py, mk: Revert change where build variables set with ?=. 2014-06-07 13:14:45 +01:00
mkrules.mk py: Fix order-only dependencies in mkrules.mk and py.mk. 2014-11-06 18:48:38 +00:00
modarray.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modbuiltins.c py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
modcmath.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modcollections.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modgc.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
modio.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modmath.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modmicropython.c py, unix, lib: Allow to compile with -Wold-style-definition. 2015-01-12 22:34:38 +00:00
modstruct.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
modsys.c py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
mpconfig.h py, unix: Trace root pointers with native emitter under unix port. 2015-01-14 00:11:09 +00:00
mpstate.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
mpstate.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
mpz.c py: Fix handling of "0" mpz in some functions. 2015-01-09 20:58:58 +00:00
mpz.h py: Fix float to int conversion for large exponents. 2015-01-02 22:31:41 +00:00
nativeglue.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
nlr.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
nlrsetjmp.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
nlrthumb.S py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
nlrx64.S py: Fix nlr mp_state_ctx symbol error for Mac. 2015-01-08 16:24:44 +00:00
nlrx86.S py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
nlrxtensa.S py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
obj.c py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
obj.h py: Remove unnecessary BINARY_OP_EQUAL code that just checks pointers. 2015-01-11 21:07:15 +00:00
objarray.c objarray: Make sure that longint works as bytearray size. 2015-01-04 17:19:16 +02:00
objbool.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objboundmeth.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objcell.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objclosure.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objcomplex.c py: Allow to compile with -Wredundant-decls. 2015-01-12 22:41:55 +00:00
objdict.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objenumerate.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objexcept.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
objexcept.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
objfilter.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objfloat.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objfun.c py: Allow to compile with -Wstrict-prototypes. 2015-01-12 22:45:35 +00:00
objfun.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objgenerator.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objgenerator.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objgetitemiter.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objint.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objint.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objint_longlong.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objint_mpz.c py: Temporary fix for conversion of float to int when fits in small int. 2015-01-07 12:10:47 +00:00
objlist.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objlist.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objmap.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objmodule.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
objmodule.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objnamedtuple.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objnone.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objobject.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objproperty.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objrange.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objreversed.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objset.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objslice.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objstr.c py, unix: Allow to compile with -Wdouble-promotion. 2015-01-12 21:56:35 +00:00
objstr.h objstr: Implement kwargs support for str.format(). 2015-01-04 00:26:31 +02:00
objstringio.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objstrunicode.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objtuple.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objtuple.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
objtype.c py: Remove unnecessary BINARY_OP_EQUAL code that just checks pointers. 2015-01-11 21:07:15 +00:00
objtype.h py: Add option to cache map lookup results in bytecode. 2015-01-07 21:07:23 +00:00
objzip.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
opmethods.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parse.c py: Never intern data of large string/bytes object; add relevant tests. 2015-01-13 16:21:23 +00:00
parse.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsehelper.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsehelper.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsenum.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsenum.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsenumbase.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
parsenumbase.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
pfenv.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
pfenv.h py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
pfenv_printf.c py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00
py-version.sh - Let the build environment decide about the toolchain to be used, in case 2014-06-07 09:16:42 +02:00
py.mk py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
qstr.c py: Never intern data of large string/bytes object; add relevant tests. 2015-01-13 16:21:23 +00:00
qstr.h py: Add qstr cfg capability; generate QSTR_NULL and QSTR_ from script. 2015-01-11 22:06:53 +00:00
qstrdefs.h py: Add MICROPY_QSTR_BYTES_IN_LEN config option, defaulting to 1. 2015-01-11 22:27:30 +00:00
repl.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
repl.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
runtime.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
runtime.h py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
runtime0.h py: Move to guarded includes for compile.h and related headers. 2014-12-27 16:12:17 +02:00
scope.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
scope.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
sequence.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
showbc.c py/showbc.c: Handle new LOAD_CONST_OBJ opcode, and opcodes with cache. 2015-01-13 23:08:47 +00:00
smallint.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
smallint.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
stackctrl.c py: Put all global state together in state structures. 2015-01-07 20:33:00 +00:00
stackctrl.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
stream.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
stream.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
unicode.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
unicode.h py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
vm.c py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
vmentrytable.h py: Add load_const_obj to emitter, add LOAD_CONST_OBJ to bytecode. 2015-01-13 15:55:54 +00:00
vstr.c py: Move to guarded includes, everywhere in py/ core. 2015-01-01 20:32:09 +00:00
warning.c py: Can compile with -Wmissing-declarations and -Wmissing-prototypes. 2015-01-12 22:30:49 +00:00