Tracking variables to reduce the memory consumption of scope chain. (#1819)

Currently we keep all local variables in the scope chain as long as
a nested function is alive. These variables consume memory although
several of them are never used. This patch focuses on removing those
unused ones whose can be detected at parsing time.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-05-15 09:00:57 +02:00
committed by GitHub
parent 8143a0cc10
commit f5b385ca6c
7 changed files with 168 additions and 44 deletions
-1
View File
@@ -393,7 +393,6 @@ parser_parse_function_statement (parser_context_t *context_p) /**< context */
}
name_p = context_p->lit_object.literal_p;
context_p->status_flags |= PARSER_NO_REG_STORE;
status_flags = PARSER_IS_FUNCTION | PARSER_IS_CLOSURE;
if (context_p->lit_object.type != LEXER_LITERAL_OBJECT_ANY)