diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-31 11:59:23 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-31 11:59:23 +0100 |
commit | 523b575039d96d63669ad8c1fa318ba4db046aca (patch) | |
tree | bc191c86845b3c5714d11f24e8848f22020308e5 /py/showbc.c | |
parent | 3056509e00c02e4faef44d90bf3953dcf0b0d4a0 (diff) |
py: Add LOAD_NULL bytecode and use it to simplify function calls.
Adding this bytecode allows to remove 4 others related to
function/method calls with * and ** support. Will also help with
bytecodes that make functions/closures with default positional and
keyword args.
Diffstat (limited to 'py/showbc.c')
-rw-r--r-- | py/showbc.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/py/showbc.c b/py/showbc.c index 10b3e7490..823769c0e 100644 --- a/py/showbc.c +++ b/py/showbc.c @@ -399,16 +399,6 @@ void mp_byte_code_print(const byte *ip, int len) { printf("CALL_FUNCTION n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); break; - case MP_BC_CALL_FUNCTION_VAR: - DECODE_UINT; - printf("CALL_FUNCTION_VAR n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); - break; - - case MP_BC_CALL_FUNCTION_KW: - DECODE_UINT; - printf("CALL_FUNCTION_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); - break; - case MP_BC_CALL_FUNCTION_VAR_KW: DECODE_UINT; printf("CALL_FUNCTION_VAR_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); @@ -419,16 +409,6 @@ void mp_byte_code_print(const byte *ip, int len) { printf("CALL_METHOD n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); break; - case MP_BC_CALL_METHOD_VAR: - DECODE_UINT; - printf("CALL_METHOD_VAR n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); - break; - - case MP_BC_CALL_METHOD_KW: - DECODE_UINT; - printf("CALL_METHOD_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); - break; - case MP_BC_CALL_METHOD_VAR_KW: DECODE_UINT; printf("CALL_METHOD_VAR_KW n=" UINT_FMT " nkw=" UINT_FMT, unum & 0xff, (unum >> 8) & 0xff); |