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
@@ -99,6 +99,12 @@ ecma_op_eval_chars_buffer (const lit_utf8_byte_t *code_p, /**< code characters b
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_CLEAR_SUPER_EVAL_PARSER_OPTS ();
|
||||
|
||||
/* If an eval is used inside the function the info should be propagated. */
|
||||
if (JERRY_CONTEXT (current_new_target) != JERRY_CONTEXT_INVALID_NEW_TARGET)
|
||||
{
|
||||
parse_opts |= ECMA_PARSE_FUNCTION;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
ecma_value_t parse_status = parser_parse_script (NULL,
|
||||
|
||||
Reference in New Issue
Block a user