aboutsummaryrefslogtreecommitdiff
path: root/py/bc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-22 23:45:37 +0100
committerDamien George <damien.p.george@gmail.com>2015-11-13 12:49:18 +0000
commit3a3db4dcf0400cffef860f61a84979cb1f7a7541 (patch)
treecfdcb6931cb120f2f993e10e7db6dc14f40b1ded /py/bc.h
parent9b7f583b0ca37ee87e5fb82e2d65fcd96a609b2f (diff)
py: Put all bytecode state (arg count, etc) in bytecode.
Diffstat (limited to 'py/bc.h')
-rw-r--r--py/bc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/bc.h b/py/bc.h
index 73b67bc10..5824688d8 100644
--- a/py/bc.h
+++ b/py/bc.h
@@ -33,6 +33,10 @@
//
// n_state : var uint
// n_exc_stack : var uint
+// scope_flags : byte
+// n_pos_args : byte number of arguments this function takes
+// n_kwonly_args : byte number of keyword-only arguments this function takes
+// n_def_pos_args : byte number of default positional arguments
//
// <word alignment padding>
//
@@ -85,7 +89,7 @@ mp_uint_t mp_decode_uint(const byte **ptr);
mp_vm_return_kind_t mp_execute_bytecode(mp_code_state *code_state, volatile mp_obj_t inject_exc);
mp_code_state *mp_obj_fun_bc_prepare_codestate(mp_obj_t func, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args);
void mp_setup_code_state(mp_code_state *code_state, mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, const mp_obj_t *args);
-void mp_bytecode_print(const void *descr, mp_uint_t n_total_args, const byte *code, mp_uint_t len);
+void mp_bytecode_print(const void *descr, const byte *code, mp_uint_t len);
void mp_bytecode_print2(const byte *code, mp_uint_t len);
const byte *mp_bytecode_print_str(const byte *ip);
#define mp_bytecode_print_inst(code) mp_bytecode_print2(code, 1)