Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
02a4c05c
Commit
02a4c05c
authored
Apr 09, 2014
by
Damien George
Browse files
py, compile: Reduce size of compiler structure.
parent
922ddd64
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/compile.c
View file @
02a4c05c
...
...
@@ -50,12 +50,12 @@ typedef struct _compiler_t {
int
break_continue_except_level
;
uint16_t
cur_except_level
;
// increased for SETUP_EXCEPT, SETUP_FINALLY; decreased for POP_BLOCK, POP_EXCEPT
int
n_arg_keyword
;
u
int
16_t
n_arg_keyword
;
uint8_t
star_flags
;
bool
have_bare_star
;
int
param_pass
;
int
param_pass_num_dict_params
;
int
param_pass_num_default_params
;
uint8_t
have_bare_star
;
u
int
8_t
param_pass
;
u
int
16_t
param_pass_num_dict_params
;
u
int
16_t
param_pass_num_default_params
;
scope_t
*
scope_head
;
scope_t
*
scope_cur
;
...
...
@@ -905,10 +905,10 @@ qstr compile_funcdef_helper(compiler_t *comp, mp_parse_node_struct_t *pns, uint
}
// save variables (probably don't need to do this, since we can't have nested definitions..?)
bool
old_have_bare_star
=
comp
->
have_bare_star
;
int
old_param_pass
=
comp
->
param_pass
;
int
old_param_pass_num_dict_params
=
comp
->
param_pass_num_dict_params
;
int
old_param_pass_num_default_params
=
comp
->
param_pass_num_default_params
;
uint
old_have_bare_star
=
comp
->
have_bare_star
;
u
int
old_param_pass
=
comp
->
param_pass
;
u
int
old_param_pass_num_dict_params
=
comp
->
param_pass_num_dict_params
;
u
int
old_param_pass_num_default_params
=
comp
->
param_pass_num_default_params
;
// compile default parameters
...
...
@@ -2223,7 +2223,7 @@ STATIC void compile_trailer_paren_helper(compiler_t *comp, mp_parse_node_t pn_ar
}
#endif
int
old_n_arg_keyword
=
comp
->
n_arg_keyword
;
u
int
old_n_arg_keyword
=
comp
->
n_arg_keyword
;
uint
old_star_flags
=
comp
->
star_flags
;
comp
->
n_arg_keyword
=
0
;
comp
->
star_flags
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment