diff options
author | Teddy <[email protected]> | 2014-05-07 12:13:22 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2014-05-07 12:13:22 +0800 |
commit | e21ca1cab7e2a577bc5f3aba5fdac72a73ef5df4 (patch) | |
tree | 063d362ca4763912c941871805deb36a53f50710 | |
parent | 30ecc9941b8da7a3c0108bc6117a1434e9caab94 (diff) |
unnecessary cscope_enter
-rw-r--r-- | semantics.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/semantics.c b/semantics.c index eb584a7..e40a26a 100644 --- a/semantics.c +++ b/semantics.c @@ -1390,20 +1390,16 @@ CVar_t semantics_if(CNode *p, CScope_t scope) { CVar_t res; if (!IS_SCALAR(exp.type->type)) ERROR((p->chd, "a scalar is required in 'if' condition")); - cscope_enter(scope); res = semantics_stmt(body1, scope); - cscope_exit(scope); if (body2->type != NOP) { CVar_t h, t; - cscope_enter(scope); if ((h = semantics_stmt(p->chd->next->next, scope))) { for (t = h; t->next; t = t->next); t->next = res; res = h; } - cscope_exit(scope); } return res; } @@ -1415,11 +1411,9 @@ CVar_t semantics_for(CNode *p, CScope_t scope) { CVar_t res; if (p->chd->next->type != NOP && !IS_SCALAR(exp.type->type)) ERROR((p->chd->next, "a scalar is required in 'for' condition")); - cscope_enter(scope); scope->inside_loop++; res = semantics_stmt(p->chd->next->next->next, scope); scope->inside_loop--; - cscope_exit(scope); return res; } @@ -1428,11 +1422,9 @@ CVar_t semantics_while(CNode *p, CScope_t scope) { CVar_t res; if (!IS_SCALAR(exp.type->type)) ERROR((p->chd, "a scalar is required in 'while' condition")); - cscope_enter(scope); scope->inside_loop++; res = semantics_stmt(p->chd->next, scope); scope->inside_loop--; - cscope_exit(scope); return res; } |