History

remove incr/decr_local_scope functions

matthias committed 7 years ago

Commit d27ea511 parent 08e22d81 file · +7 −16Browse files

Unified · Split

tccgen.c+7−16
@@ -113,15 +113,6 @@ static void gv_dup(void); · 112 unmodified lines
113113 static int get_temp_local_var(int size,int align);
114114 static void clear_temp_local_var_list();
115115
116−static void incr_local_scope(void)
117−{
118− ++local_scope;
119−}
120−
121−static void decr_local_scope(void)
122−{
123− --local_scope;
124−}
125116
126117 static void reset_local_scope(void)
127118 {
@@ -6152,11 +6143,11 @@ static void block(int *bsym, int *csym, int is_expr) · 6024 unmodified lines
61526143 skip(')');
61536144 a = gvtst(1, 0);
61546145 b = 0;
6155− incr_local_scope();
6146+ ++local_scope;
61566147 saved_nocode_wanted = nocode_wanted;
61576148 block(&a, &b, 0);
61586149 nocode_wanted = saved_nocode_wanted;
6159− decr_local_scope();
6150+ --local_scope;
61606151 gjmp_addr(d);
61616152 gsym(a);
61626153 gsym_addr(b, d);
@@ -6170,8 +6161,8 @@ static void block(int *bsym, int *csym, int is_expr) · 7 unmodified lines
61706161 s = local_stack;
61716162 llabel = local_label_stack;
61726163 lcleanup = current_cleanups;
6173− incr_local_scope();
6174−
6164+ ++local_scope;
6165+
61756166 /* handle local labels declarations */
61766167 while (tok == TOK_LABEL) {
61776168 next();
@@ -6232,7 +6223,7 @@ static void block(int *bsym, int *csym, int is_expr) · 54 unmodified lines
62326223 /* pop locally defined labels */
62336224 label_pop(&local_label_stack, llabel, is_expr);
62346225 /* pop locally defined symbols */
6235− decr_local_scope();
6226+ --local_scope;
62366227 /* In the is_expr case (a statement expression is finished here),
62376228 vtop might refer to symbols on the local_stack. Either via the
62386229 type or via vtop->sym. We can't pop those nor any that in turn
@@ -6291,7 +6282,7 @@ static void block(int *bsym, int *csym, int is_expr) · 52 unmodified lines
62916282 next();
62926283 skip('(');
62936284 s = local_stack;
6294− incr_local_scope();
6285+ ++local_scope;
62956286 if (tok != ';') {
62966287 /* c99 for-loop init decl? */
62976288 if (!decl0(VT_LOCAL, 1, NULL)) {
@@ -6327,7 +6318,7 @@ static void block(int *bsym, int *csym, int is_expr) · 29 unmodified lines
63276318 gjmp_addr(c);
63286319 gsym(a);
63296320 gsym_addr(b, c);
6330− decr_local_scope();
6321+ --local_scope;
63316322 sym_pop(&local_stack, s, 0);
63326323
63336324 } else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t