summaryrefslogtreecommitdiffstatshomepage
path: root/py/emit.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-09 12:43:17 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-09 12:43:17 +0100
commit922ddd64155b3893f71cbf0b0c71a4cffbe4b1c8 (patch)
tree290159fd07150a2365c7861a3607484aed6fa549 /py/emit.h
parent78035b995ff7bd518cc1291aa70c966b53510fd9 (diff)
downloadmicropython-922ddd64155b3893f71cbf0b0c71a4cffbe4b1c8.tar.gz
micropython-922ddd64155b3893f71cbf0b0c71a4cffbe4b1c8.zip
py, compile: Combine have_star_arg, have_dbl_star_arg into star_flags.
Small reduction in ROM, heap and stack usage.
Diffstat (limited to 'py/emit.h')
-rw-r--r--py/emit.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/py/emit.h b/py/emit.h
index 20128fc75b..47ac045af0 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);