micropython/py
Damien George ad7213d3c3 py: Add mp_raise_msg_varg helper and use it where appropriate.
This commit adds mp_raise_msg_varg(type, fmt, ...) as a helper for
nlr_raise(mp_obj_new_exception_msg_varg(type, fmt, ...)).  It makes the
C-level API for raising exceptions more consistent, and reduces code size
on most ports:

   bare-arm:   +28 +0.042%
minimal x86:  +100 +0.067%
   unix x64:   -56 -0.011%
unix nanbox:  -300 -0.068%
      stm32:  -204 -0.054% PYBV10
     cc3200:    +0 +0.000%
    esp8266:   -64 -0.010% GENERIC
      esp32:  -104 -0.007% GENERIC
        nrf:  -136 -0.094% pca10040
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
2020-02-13 11:52:40 +11:00
..
argcheck.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
asmarm.c py/asmarm: Use __builtin___clear_cache instead of __clear_cache. 2019-07-12 16:48:37 +10:00
asmarm.h
asmbase.c py: Define EMIT_MACHINE_CODE as EMIT_NATIVE || EMIT_INLINE_ASM. 2019-06-28 13:54:45 +10:00
asmbase.h py/persistentcode: Add ability to relocate loaded native code. 2019-12-12 20:15:28 +11:00
asmthumb.c py/asmthumb: Support asm_thumb code running on normal ARM processors. 2019-05-01 15:24:21 +10:00
asmthumb.h
asmx64.c
asmx64.h
asmx86.c py/asmx86: Remove unused 5th argument facility. 2019-12-27 12:30:51 +11:00
asmx86.h py/asmx86: Remove unused 5th argument facility. 2019-12-27 12:30:51 +11:00
asmxtensa.c py: Add new Xtensa-Windowed arch for native emitter. 2019-10-05 13:44:53 +10:00
asmxtensa.h py/asmxtensa: Add support for Xtensa with windowed registers. 2019-10-05 13:44:08 +10:00
bc.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
bc.h py/persistentcode: Add ability to relocate loaded native code. 2019-12-12 20:15:28 +11:00
bc0.h py: Split RAISE_VARARGS opcode into 3 separate ones. 2019-09-26 15:39:50 +10:00
binary.c py/binary: Change mp_uint_t to size_t for index, size, align args. 2019-09-02 13:14:27 +10:00
binary.h py/binary: Change mp_uint_t to size_t for index, size, align args. 2019-09-02 13:14:27 +10:00
builtin.h extmod/modbluetooth: Rename module to "ubluetooth". 2019-10-22 21:58:05 +11:00
builtinevex.c
builtinhelp.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
builtinimport.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
compile.c py/compile: Allow 'return' outside function in minimal builds. 2020-02-06 00:41:55 +11:00
compile.h py: Add global default_emit_opt variable to make emit kind persistent. 2019-08-28 12:47:58 +10:00
dynruntime.h py/dynruntime: Implement uint new/get, mp_obj_len and mp_obj_subscr. 2019-12-13 13:29:11 +11:00
dynruntime.mk py/dynruntime: Add support for float API to make/get floats. 2019-12-12 20:15:28 +11:00
emit.h py: Add new Xtensa-Windowed arch for native emitter. 2019-10-05 13:44:53 +10:00
emitbc.c py: Remove commented-out debug printf's from emitbc and objlist. 2019-12-20 23:34:46 +11:00
emitcommon.c
emitglue.c py: Integrate sys.settrace feature into the VM and runtime. 2019-08-30 16:44:12 +10:00
emitglue.h py: Integrate sys.settrace feature into the VM and runtime. 2019-08-30 16:44:12 +10:00
emitinlinethumb.c
emitinlinextensa.c
emitnarm.c
emitnative.c py/emitnative: Stop after finding an unwind target. 2020-01-27 13:22:03 +11:00
emitnthumb.c
emitnx64.c
emitnx86.c py/nativeglue: Add new header file with native function table typedef. 2019-12-12 20:15:28 +11:00
emitnxtensa.c
emitnxtensawin.c py: Add new Xtensa-Windowed arch for native emitter. 2019-10-05 13:44:53 +10:00
formatfloat.c
formatfloat.h
frozenmod.c
frozenmod.h various: Update early copyright years to match actual edit history. 2019-05-17 18:06:11 +10:00
gc.c py/gc: Don't include or init gc_mutex when GIL is enabled. 2020-01-23 13:28:42 +11:00
gc.h
grammar.h py: Add support for matmul operator @ as per PEP 465. 2019-09-26 15:12:39 +10:00
lexer.c py: Add support for matmul operator @ as per PEP 465. 2019-09-26 15:12:39 +10:00
lexer.h py: Remove 3 obsolete commented-out lines from header files. 2019-11-26 21:36:41 +11:00
makemoduledefs.py
makeqstrdata.py py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
makeqstrdefs.py py/makeqstrdefs.py: Remove unused blacklist. 2019-10-04 17:18:56 +10:00
makeversionhdr.py
malloc.c
map.c
misc.h py/unicode: Add unichar_isalnum(). 2020-01-12 13:03:57 +11:00
mkenv.mk py/mkenv.mk: Move usage of 32-bit flags to py.mk. 2020-01-12 10:34:10 +11:00
mkrules.mk py/mkrules.mk: Add warning/error for invalid frozen config. 2019-10-21 23:21:04 +11:00
modarray.c py/modarray: Rename "array" module to "uarray". 2019-10-22 16:35:46 +11:00
modbuiltins.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
modcmath.c
modcollections.c
modgc.c
modio.c py/modio: Call mp_import_name to do resource stream import. 2019-07-31 22:37:44 +10:00
modmath.c py/modmath: Implement math.isclose() for non-complex numbers. 2019-08-17 23:23:17 +10:00
modmicropython.c py/scheduler: Rename sched_stack to sched_queue. 2019-07-17 16:09:32 +10:00
modstruct.c py/binary: Change mp_uint_t to size_t for index, size, align args. 2019-09-02 13:14:27 +10:00
modsys.c py/modsys: Report .mpy version in sys.implementation. 2019-11-04 16:00:41 +11:00
modthread.c py: Add mp_raise_type helper macro and use it where appropriate. 2020-02-13 11:03:37 +11:00
moduerrno.c py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
mpconfig.h py/scheduler: Allow a port to specify attrs for mp_keyboard_interrupt. 2020-02-07 16:08:29 +11:00
mperrno.h
mphal.h lib/utils/sys_stdio_mphal: Add support to poll sys.stdin and sys.stdout. 2019-07-01 17:10:12 +10:00
mpprint.c
mpprint.h
mpstate.c
mpstate.h py/qstr: Don't include or init qstr_mutex when GIL is enabled. 2020-01-23 13:29:11 +11:00
mpthread.h py/mpthread.h: Use strong type for mp_thread_set_state() argument. 2020-01-29 17:10:32 +11:00
mpz.c
mpz.h
nativeglue.c py/nativeglue: Fix typo about where the native fun table enum is. 2020-01-27 13:22:19 +11:00
nativeglue.h py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
nlr.c
nlr.h powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
nlrpowerpc.c powerpc: Add initial port to bare metal PowerPC arch. 2019-10-22 22:45:33 +11:00
nlrsetjmp.c
nlrthumb.c py: Introduce MP_UNREACHABLE macro to annotate unreachable code. 2019-08-19 16:14:33 +10:00
nlrx64.c py/nlr: Use MP_UNREACHABLE at the end of arch-specific nlr_jump funcs. 2019-08-19 16:14:57 +10:00
nlrx86.c py/nlrx86: Silence possible warnings about unused nlr argument. 2019-12-23 00:07:03 +11:00
nlrxtensa.c py/nlr: Use MP_UNREACHABLE at the end of arch-specific nlr_jump funcs. 2019-08-19 16:14:57 +10:00
obj.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
obj.h py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objarray.c py: Expand type equality flags to 3 separate ones, fix bool/namedtuple. 2020-02-11 11:06:00 +11:00
objarray.h
objattrtuple.c
objbool.c py: Expand type equality flags to 3 separate ones, fix bool/namedtuple. 2020-02-11 11:06:00 +11:00
objboundmeth.c
objcell.c
objclosure.c
objcomplex.c py: Expand type equality flags to 3 separate ones, fix bool/namedtuple. 2020-02-11 11:06:00 +11:00
objdeque.c
objdict.c py/objdict: Support ujson.dump() of OrderedDict objects. 2019-11-13 13:51:18 +11:00
objenumerate.c py/objenumerate: Check for valid args in enumerate constructor. 2019-12-09 14:28:24 +11:00
objexcept.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objexcept.h
objfilter.c
objfloat.c py: Expand type equality flags to 3 separate ones, fix bool/namedtuple. 2020-02-11 11:06:00 +11:00
objfun.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
objfun.h py: Integrate sys.settrace feature into the VM and runtime. 2019-08-30 16:44:12 +10:00
objgenerator.c py: Add mp_raise_type helper macro and use it where appropriate. 2020-02-13 11:03:37 +11:00
objgenerator.h
objgetitemiter.c
objint.c all: Convert nlr_raise(mp_obj_new_exception_msg(x)) to mp_raise_msg(x). 2019-11-05 11:35:45 +11:00
objint.h
objint_longlong.c
objint_mpz.c py/objint: Add mp_obj_int_get_uint_checked() helper. 2020-01-14 23:35:22 +11:00
objlist.c py: Introduce MP_ROM_NONE macro for ROM to refer to None object. 2019-12-27 22:51:17 +11:00
objlist.h
objmap.c
objmodule.c extmod/modbluetooth: Rename module to "ubluetooth". 2019-10-22 21:58:05 +11:00
objmodule.h py/objmodule.h: Remove obsolete mp_builtin_module_weak_links_map decl. 2020-02-11 15:43:13 +11:00
objnamedtuple.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objnamedtuple.h
objnone.c py/obj: Add MICROPY_OBJ_IMMEDIATE_OBJS option to reduce code size. 2020-01-13 01:01:45 +11:00
objobject.c py/objobject: Fix __setattr__/__delattr__ to build in nanbox mode. 2019-12-27 22:54:53 +11:00
objpolyiter.c
objproperty.c py: Introduce MP_ROM_NONE macro for ROM to refer to None object. 2019-12-27 22:51:17 +11:00
objrange.c
objreversed.c
objset.c py: Expand type equality flags to 3 separate ones, fix bool/namedtuple. 2020-02-11 11:06:00 +11:00
objsingleton.c py/objsingleton: Use mp_generic_unary_op for singleton objects. 2019-12-27 12:53:36 +11:00
objslice.c py/objslice: Inline fetching of slice paramters in str_subscr(). 2019-12-29 00:06:02 +11:00
objstr.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objstr.h py/objstr: Don't use inline GET_STR_DATA_LEN for object-repr D. 2019-12-27 23:15:52 +11:00
objstringio.c py/objstringio: Slightly optimize stringio_copy_on_write for code size. 2019-11-26 14:26:24 +11:00
objstringio.h
objstrunicode.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objtuple.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
objtuple.h
objtype.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
objtype.h py/runtime: Don't allocate iter buf for user-defined types. 2019-12-27 12:34:22 +11:00
objzip.c
opmethods.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
pairheap.c py/pairheap: Add generic implementation of pairing heap data structure. 2020-01-22 17:31:18 +11:00
pairheap.h py/pairheap: Add generic implementation of pairing heap data structure. 2020-01-22 17:31:18 +11:00
parse.c py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
parse.h
parsenum.c py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c py: Release GIL during syscalls in reader and writer code. 2020-01-26 23:26:31 +11:00
persistentcode.h py/persistentcode: Make ARM Thumb archs support multiple sub-archs. 2019-12-12 20:15:28 +11:00
profile.c py/profile: Fix debug opcode decoding of MP_BC_RAISE_xxx opcodes. 2019-12-20 14:57:44 +11:00
profile.h py/profile: Add debugging for sys.settrace feature. 2019-08-30 16:48:47 +10:00
py.mk py/pairheap: Add generic implementation of pairing heap data structure. 2020-01-22 17:31:18 +11:00
pystack.c
pystack.h
qstr.c py/qstr: Don't include or init qstr_mutex when GIL is enabled. 2020-01-23 13:29:11 +11:00
qstr.h py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
qstrdefs.h
reader.c py: Release GIL during syscalls in reader and writer code. 2020-01-26 23:26:31 +11:00
reader.h
repl.c py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions. 2019-09-26 16:04:56 +10:00
repl.h
ringbuf.c py/ringbuf: Add peek16 method. 2019-11-21 12:04:53 +11:00
ringbuf.h py/ringbuf: Add peek16 method. 2019-11-21 12:04:53 +11:00
runtime.c py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
runtime.h py: Add mp_raise_msg_varg helper and use it where appropriate. 2020-02-13 11:52:40 +11:00
runtime0.h py/nativeglue: Add new header file with native function table typedef. 2019-12-12 20:15:28 +11:00
runtime_utils.c
scheduler.c py/scheduler: Move clearing of kbd traceback to mp_keyboard_interrupt. 2020-02-07 16:08:31 +11:00
scope.c
scope.h
sequence.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
showbc.c py: Rework and compress second part of bytecode prelude. 2019-10-01 12:26:22 +10:00
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c py: Make mp_obj_get_type() return a const ptr to mp_obj_type_t. 2020-01-09 11:25:26 +11:00
stream.h py/stream.h: Add MP_STREAM_POLL_NVAL constant. 2019-10-31 12:54:37 +11:00
unicode.c py/unicode: Add unichar_isalnum(). 2020-01-12 13:03:57 +11:00
unicode.h
vm.c py/vm: Fix comment to refer to MP_BC_RAISE_OBJ instead of RAISE_VARARGS. 2019-12-20 14:57:06 +11:00
vmentrytable.h py: Split RAISE_VARARGS opcode into 3 separate ones. 2019-09-26 15:39:50 +10:00
vstr.c various: Add and update my copyright line based on git history. 2019-05-17 18:04:15 +10:00
warning.c