micropython/py
Damien George 534b7c368d py: Do adjacent str/bytes literal concatenation in lexer, not compiler.
It's much more efficient in RAM and code size to do implicit literal string
concatenation in the lexer, as opposed to the compiler.

RAM usage is reduced because the concatenation can be done right away in the
tokeniser by just accumulating the string/bytes literals into the lexer's
vstr.  Prior to this patch adjacent strings/bytes would create a parse tree
(one node per string/bytes) and then in the compiler a whole new chunk of
memory was allocated to store the concatenated string, which used more than
double the memory compared to just accumulating in the lexer.

This patch also significantly reduces code size:

bare-arm: -204
minimal:  -204
unix x64: -328
stmhal:   -208
esp8266:  -284
cc3200:   -224
2017-02-17 12:12:40 +11:00
..
argcheck.c
asmarm.c py/asmarm: Fix assembler's PASS_EMIT constant name. 2017-01-03 15:40:50 +11:00
asmarm.h py: Move arch-specific assembler macros from emitnative to asmXXX.h. 2016-12-09 16:51:49 +11:00
asmbase.c py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmbase.h py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmthumb.c py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmthumb.h py: Move arch-specific assembler macros from emitnative to asmXXX.h. 2016-12-09 16:51:49 +11:00
asmx64.c py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmx64.h py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmx86.c py/asm: Fix x86 and ARM assemblers due to recent code refactoring. 2016-12-09 22:54:45 +11:00
asmx86.h py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmxtensa.c py/asm: Remove need for dummy_data when doing initial assembler passes. 2016-12-09 22:50:58 +11:00
asmxtensa.h py/asmxtensa.h: Explicitly cast args to 32-bits so left-shift is legal. 2017-02-08 10:48:51 +11:00
bc.c
bc.h py/showbc: Make sure to set the const_table before printing bytecode. 2017-01-27 12:34:09 +11:00
bc0.h py: Allow bytecode/native to put iter_buf on stack for simple for loops. 2017-02-16 18:38:06 +11:00
binary.c py/binary: mp_binary_get_size: Raise error on unsupported typecodes. 2017-01-17 22:53:06 +03:00
binary.h
builtin.h py: Add builtin help function to core, with default help msg. 2017-01-22 11:56:16 +11:00
builtinevex.c
builtinhelp.c py/builtinhelp: Implement help('modules') to list available modules. 2017-01-22 12:12:54 +11:00
builtinimport.c py: Move weak-link map to objmodule.c, and expose module maps as public. 2017-01-22 11:59:29 +11:00
compile.c py: Do adjacent str/bytes literal concatenation in lexer, not compiler. 2017-02-17 12:12:40 +11:00
compile.h py: Allow inline-assembler emitter to be generic. 2016-12-09 17:06:21 +11:00
emit.h py: Remove unused "use_stack" argument from for_iter_end emit function. 2017-02-16 18:38:06 +11:00
emitbc.c py: Remove unused "use_stack" argument from for_iter_end emit function. 2017-02-16 18:38:06 +11:00
emitcommon.c
emitglue.c py/emitglue: Refactor to remove assert(0), to improve coverage. 2016-12-21 11:52:05 +11:00
emitglue.h
emitinlinethumb.c py/grammar: Group no-compile grammar rules together to shrink tables. 2017-02-16 19:45:06 +11:00
emitinlinextensa.c py/emitinline: Move common code for end of final pass to compiler. 2016-12-09 21:23:17 +11:00
emitnative.c py: Remove unused "use_stack" argument from for_iter_end emit function. 2017-02-16 18:38:06 +11:00
formatfloat.c py/formatfloat: Remove unreachable code. 2017-01-19 23:32:16 +11:00
formatfloat.h
frozenmod.c
frozenmod.h
gc.c
gc.h
grammar.h py: Do adjacent str/bytes literal concatenation in lexer, not compiler. 2017-02-17 12:12:40 +11:00
lexer.c py: Do adjacent str/bytes literal concatenation in lexer, not compiler. 2017-02-17 12:12:40 +11:00
lexer.h py/lexer: Simplify handling of line-continuation error. 2017-02-17 11:30:14 +11:00
makeqstrdata.py
makeqstrdefs.py
makeversionhdr.py
malloc.c
map.c py/map: Change mp_uint_t to size_t where appropriate. 2017-02-08 11:00:15 +11:00
misc.h cc3200: Re-add support for UART REPL (MICROPY_STDIO_UART setting). 2016-12-27 01:05:37 +03:00
mkenv.mk
mkrules.mk py/mkrules.mk: Add MPY_CROSS_FLAGS option to pass flags to mpy-cross. 2017-01-05 15:51:36 +11:00
modarray.c
modbuiltins.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
modcmath.c
modcollections.c
modgc.c
modio.c
modmath.c
modmicropython.c
modstruct.c py/binary: mp_binary_get_size: Raise error on unsupported typecodes. 2017-01-17 22:53:06 +03:00
modsys.c
modthread.c py/modthread: Use system-provided mutexs for _thread locks. 2017-02-15 11:28:02 +11:00
moduerrno.c
mpconfig.h py/vm: Add MICROPY_PY_THREAD_GIL_VM_DIVISOR option. 2017-02-15 11:28:15 +11:00
mperrno.h
mphal.h
mpprint.c py/mpprint: Add assertion for, and comment about, valid base values. 2016-12-28 12:45:33 +11:00
mpprint.h
mpstate.c
mpstate.h extmod: Remove MICROPY_FSUSERMOUNT and related files. 2017-01-30 12:26:07 +11:00
mpthread.h
mpz.c py/mpz: Change type of "base" args from mp_uint_t to unsigned int. 2017-02-16 16:51:16 +11:00
mpz.h py/mpz: Change type of "base" args from mp_uint_t to unsigned int. 2017-02-16 16:51:16 +11:00
nativeglue.c py: Optimise storage of iterator so it takes only 4 slots on Py stack. 2017-02-16 18:38:06 +11:00
nlr.h
nlrsetjmp.c
nlrthumb.c
nlrx64.S py/nlr: Fix execstack builds for ARM. 2017-02-08 11:12:26 +11:00
nlrx86.S py/nlr: Fix execstack builds for ARM. 2017-02-08 11:12:26 +11:00
nlrxtensa.S py/nlr: Fix execstack builds for ARM. 2017-02-08 11:12:26 +11:00
obj.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
obj.h py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objarray.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
objarray.h py/objarray: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:16 +11:00
objattrtuple.c py/objtuple: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:16 +11:00
objbool.c
objboundmeth.c py/objtype: Implement __call__ handling for an instance w/o heap alloc. 2016-11-22 01:33:55 +03:00
objcell.c
objclosure.c py/objclosure: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objcomplex.c py/objcomplex: Fix typo in ternary expression. 2017-02-04 00:23:56 +11:00
objdict.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
objenumerate.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objexcept.c py/objexcept: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objexcept.h py/objexcept: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objfilter.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objfloat.c py/objfloat: Raise ZeroDivisionError for 0 to negative power. 2017-02-03 00:01:37 +11:00
objfun.c py/objfun: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:16 +11:00
objfun.h
objgenerator.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objgenerator.h
objgetitemiter.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objint.c py/objint: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objint.h py: Added optimised support for 3-argument calls to builtin.pow() 2017-02-02 22:23:10 +03:00
objint_longlong.c py/objint: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objint_mpz.c py/objint: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:17 +11:00
objlist.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
objlist.h py/objlist: Convert mp_uint_t to size_t where appropriate. 2017-02-16 16:51:16 +11:00
objmap.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objmodule.c py/objmodule: Move module init/deinit code into runtime functions. 2017-01-26 23:30:38 +11:00
objmodule.h py/objmodule: Move module init/deinit code into runtime functions. 2017-01-26 23:30:38 +11:00
objnamedtuple.c
objnone.c
objobject.c
objpolyiter.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objproperty.c
objrange.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objreversed.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objset.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
objsingleton.c
objslice.c
objstr.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objstr.h py/objstr: Convert mp_uint_t to size_t (and use int) where appropriate. 2017-02-16 16:51:16 +11:00
objstringio.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objstringio.h
objstrunicode.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objtuple.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
objtuple.h py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objtype.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
objtype.h
objzip.c py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
opmethods.c
parse.c py/grammar: Group no-compile grammar rules together to shrink tables. 2017-02-16 19:45:06 +11:00
parse.h
parsenum.c py/parsenum: Fix warning for signed/unsigned comparison. 2016-12-28 12:25:00 +11:00
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c py/persistentcode: Bump .mpy version due to change in bytecode. 2017-02-17 00:19:34 +11:00
persistentcode.h
py.mk extmod: Remove MICROPY_FSUSERMOUNT and related files. 2017-01-30 12:26:07 +11:00
qstr.c
qstr.h
qstrdefs.h extmod: Add generic VFS sub-system. 2017-01-27 17:19:06 +11:00
reader.c
reader.h
repl.c
repl.h
ringbuf.h
runtime.c py: De-optimise some uses of mp_getiter, so they don't use the C stack. 2017-02-16 19:11:34 +11:00
runtime.h py: Add iter_buf to getiter type method. 2017-02-16 18:38:06 +11:00
runtime0.h py: Optimise storage of iterator so it takes only 4 slots on Py stack. 2017-02-16 18:38:06 +11:00
runtime_utils.c
scope.c
scope.h
sequence.c
showbc.c py: Allow bytecode/native to put iter_buf on stack for simple for loops. 2017-02-16 18:38:06 +11:00
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c
stream.h py/stream: Move ad-hoc ioctl constants to stream.h and rename them. 2016-12-02 16:37:29 +11:00
unicode.c py/unicode: Comment-out unused function unichar_isprint. 2016-12-28 17:50:10 +11:00
unicode.h
vm.c py: Optimise storage of iterator so it takes only 4 slots on Py stack. 2017-02-16 18:38:06 +11:00
vmentrytable.h py: Allow bytecode/native to put iter_buf on stack for simple for loops. 2017-02-16 18:38:06 +11:00
vstr.c
warning.c