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 [email protected]
This commit is contained in:
Robert Fancsik authored and GitHub committed 2020-03-27 11:21:50 +01:00
1 parent 14bcc98089
commit 76b8555210
15 files changed
+96 -52

No files matched your search

+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 ();
}