Add support for new.target (#3469)
Notable changes:
* Extracted the pure JS/builtin and external C method invocations
into two new methods (`ecma_op_function_call_{simple, external}`).
* Updated parser/scanner to handle "new.target" correctly.
* Added JS test case.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Robert Fancsik
parent
be8ae3aae8
commit
0fd1ed6f27
@@ -3044,7 +3044,14 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
|
||||
options |= PARSE_EXPR_HAS_LITERAL;
|
||||
}
|
||||
|
||||
if (context_p->status_flags & PARSER_IS_FUNCTION)
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
bool is_eval = (context_p->status_flags & PARSER_IS_EVAL) != 0;
|
||||
#else /* !ENABLED (JERRY_ES2015) */
|
||||
/* In case of ES5.1 it does not matter that this is an eval parsing or not. */
|
||||
bool is_eval = false;
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
if ((context_p->status_flags & PARSER_IS_FUNCTION) && !is_eval)
|
||||
{
|
||||
parser_parse_expression_statement (context_p, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user