Remove JERRY_CONTEXT_INVALID_NEW_TARGET (#3643)

Until now JERRY_CONTEXT_INVALID_NEW_TARGET was used to represent whether the eval called from the script directly.
This information can be retrieved from the parser, so it simplifies the runtime handling of the new.target.

This patch fixes #3630, fixes #3640 and fixes #3641.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-03-27 11:21:50 +01:00
committed by GitHub
parent 14bcc98089
commit 76b8555210
15 changed files with 96 additions and 52 deletions
+1 -1
View File
@@ -3585,7 +3585,7 @@ jerry_get_new_target (void)
#if ENABLED (JERRY_ES2015)
ecma_object_t *current_new_target = JERRY_CONTEXT (current_new_target);
if (current_new_target == NULL || current_new_target == JERRY_CONTEXT_INVALID_NEW_TARGET)
if (current_new_target == NULL)
{
return jerry_create_undefined ();
}