micropython/py
Damien George 40d8430ee3 py/vm: Add macros to hook into various points in the VM.
These can be used to insert arbitrary checks, polling, etc into the VM.
They are left general because the VM is a highly tuned loop and it should
be up to a given port how that port wants to modify the VM internals.

One common use would be to insert a polling check, but only done after
a certain number of opcodes were executed, so as not to slow down the VM
too much.  For example:

 #define MICROPY_VM_HOOK_COUNT (30)
 #define MICROPY_VM_HOOK_INIT static uint vm_hook_divisor = MICROPY_VM_HOOK_COUNT
 #define MICROPY_VM_HOOK_POLL if (--vm_hook_divisor == 0) { \
     vm_hook_divisor = MICROPY_VM_HOOK_COUNT;
     extern void vm_hook_function(void);
     vm_hook_function();
 }
 #define MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_POLL
 #define MICROPY_VM_HOOK_RETURN MICROPY_VM_HOOK_POLL
2016-02-17 09:02:19 +00:00
..
argcheck.c
asmarm.c
asmarm.h
asmthumb.c
asmthumb.h
asmx64.c py/asmx64: Support all 16 regs in reg to memory move instructions. 2016-02-15 09:05:50 +00:00
asmx64.h
asmx86.c
asmx86.h
bc.c
bc.h
bc0.h
binary.c
binary.h
builtin.h
builtinevex.c
builtinimport.c
compile.c
compile.h
emit.h
emitbc.c
emitcommon.c
emitglue.c
emitglue.h
emitinlinethumb.c
emitnative.c py/emitnative: Add check that RHS of viper store is of integral type. 2016-02-15 09:38:02 +00:00
formatfloat.c
formatfloat.h
frozenmod.c
frozenmod.h
gc.c
gc.h
grammar.h
lexer.c
lexer.h
lexerstr.c
lexerunix.c
makeqstrdata.py
makeversionhdr.py
malloc.c
map.c
misc.h py/repl: Check for an identifier char after the keyword. 2016-02-17 08:56:15 +00:00
mkenv.mk
mkrules.mk
modarray.c
modbuiltins.c
modcmath.c
modcollections.c
modgc.c
modio.c
modmath.c
modmicropython.c
modstruct.c
modsys.c
mpconfig.h py/vm: Add macros to hook into various points in the VM. 2016-02-17 09:02:19 +00:00
mphal.h
mpprint.c
mpprint.h
mpstate.c
mpstate.h py/mpstate.h: fs_user_mount is now standard, reusable uPy functionality. 2016-02-15 00:02:03 +02:00
mpz.c
mpz.h
nativeglue.c
nlr.h
nlrsetjmp.c
nlrthumb.S
nlrx64.S
nlrx86.S
nlrxtensa.S
obj.c
obj.h
objarray.c
objattrtuple.c
objbool.c
objboundmeth.c
objcell.c
objclosure.c
objcomplex.c
objdict.c
objenumerate.c
objexcept.c
objexcept.h
objfilter.c
objfloat.c
objfun.c
objfun.h
objgenerator.c
objgenerator.h
objgetitemiter.c
objint.c
objint.h
objint_longlong.c
objint_mpz.c
objlist.c
objlist.h
objmap.c
objmodule.c
objmodule.h
objnamedtuple.c
objnone.c
objobject.c
objpolyiter.c
objproperty.c
objrange.c
objreversed.c
objset.c
objsingleton.c
objslice.c
objstr.c
objstr.h
objstringio.c
objstrunicode.c
objtuple.c
objtuple.h
objtype.c
objtype.h
objzip.c
opmethods.c
parse.c
parse.h
parsenum.c
parsenum.h
parsenumbase.c
parsenumbase.h
py.mk extmod/vfs_fat_ffconf: Reusable FatFs module, move from stmhal/ffconf. 2016-02-15 00:19:27 +02:00
qstr.c
qstr.h
qstrdefs.h py/qstrdefs.h: qstrs for VfsFat. 2016-02-15 12:49:32 +02:00
repl.c py/repl: Check for an identifier char after the keyword. 2016-02-17 08:56:15 +00:00
repl.h
runtime.c
runtime.h
runtime0.h
scope.c
scope.h
sequence.c
showbc.c
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c
stream.h
unicode.c py/repl: Check for an identifier char after the keyword. 2016-02-17 08:56:15 +00:00
unicode.h
vm.c py/vm: Add macros to hook into various points in the VM. 2016-02-17 09:02:19 +00:00
vmentrytable.h
vstr.c
warning.c