mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Fix function parsing for debugger. (#2119)
Since the JerryScript can able to parse functions directly the PARSER_LEXICAL_ENV_NEEDED and the PARSER_NO_REG_STORE flags should be in the context's status flags for executing eval operations by the debugger. JerryScript-DCO-1.0-Signed-off-by: Imre Kiss kissi.szeged@partner.samsung.com
This commit is contained in:
parent
29056f9ab9
commit
1ed886b872
@ -2117,6 +2117,14 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
|
||||
else
|
||||
{
|
||||
context.status_flags = PARSER_IS_FUNCTION;
|
||||
#ifdef JERRY_DEBUGGER
|
||||
if (JERRY_CONTEXT (debugger_flags) & JERRY_DEBUGGER_CONNECTED)
|
||||
{
|
||||
/* This option has a high memory and performance costs,
|
||||
* but it is necessary for executing eval operations by the debugger. */
|
||||
context.status_flags |= PARSER_LEXICAL_ENV_NEEDED | PARSER_NO_REG_STORE;
|
||||
}
|
||||
#endif /* JERRY_DEBUGGER */
|
||||
context.source_p = arg_list_p;
|
||||
context.source_end_p = arg_list_p + arg_list_size;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user