Introduce parser scope types, add scope flags, indicating whether scope contains a function declaration, a 'try' statement, 'with' statement or 'delete' operator.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
@@ -91,10 +91,12 @@ ecma_op_eval_chars_buffer (const jerry_api_char_t *code_p, /**< code characters
|
||||
|
||||
bool is_strict_call = (is_direct && is_called_from_strict_mode_code);
|
||||
|
||||
bool code_contains_functions;
|
||||
parse_status = parser_parse_eval (code_p,
|
||||
code_buffer_size,
|
||||
is_strict_call,
|
||||
&instrs_p);
|
||||
&instrs_p,
|
||||
&code_contains_functions);
|
||||
|
||||
if (parse_status == JSP_STATUS_SYNTAX_ERROR)
|
||||
{
|
||||
@@ -158,7 +160,7 @@ ecma_op_eval_chars_buffer (const jerry_api_char_t *code_p, /**< code characters
|
||||
JERRY_ASSERT (ecma_is_completion_value_throw (completion));
|
||||
}
|
||||
|
||||
if (!parser_is_code_contains_functions ())
|
||||
if (!code_contains_functions)
|
||||
{
|
||||
serializer_remove_instructions (instrs_p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user