From 922ddd64155b3893f71cbf0b0c71a4cffbe4b1c8 Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 9 Apr 2014 12:43:17 +0100 Subject: py, compile: Combine have_star_arg, have_dbl_star_arg into star_flags. Small reduction in ROM, heap and stack usage. --- py/emit.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'py/emit.h') diff --git a/py/emit.h b/py/emit.h index 20128fc75..47ac045af 100644 --- a/py/emit.h +++ b/py/emit.h @@ -14,6 +14,9 @@ typedef enum { PASS_3 = 3, // emit code } pass_kind_t; +#define MP_EMIT_STAR_FLAG_SINGLE (0x01) +#define MP_EMIT_STAR_FLAG_DOUBLE (0x02) + typedef struct _emit_t emit_t; typedef struct _emit_method_table_t { @@ -98,8 +101,8 @@ typedef struct _emit_method_table_t { void (*unpack_ex)(emit_t *emit, int n_left, int n_right); void (*make_function)(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults); void (*make_closure)(emit_t *emit, scope_t *scope, uint n_pos_defaults, uint n_kw_defaults); - void (*call_function)(emit_t *emit, int n_positional, int n_keyword, bool have_star_arg, bool have_dbl_star_arg); - void (*call_method)(emit_t *emit, int n_positional, int n_keyword, bool have_star_arg, bool have_dbl_star_arg); + void (*call_function)(emit_t *emit, int n_positional, int n_keyword, uint star_flags); + void (*call_method)(emit_t *emit, int n_positional, int n_keyword, uint star_flags); void (*return_value)(emit_t *emit); void (*raise_varargs)(emit_t *emit, int n_args); void (*yield_value)(emit_t *emit); -- cgit v1.2.3