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:
@@ -228,7 +228,6 @@ struct jerry_context_t
|
||||
/**
|
||||
* Allowed values and it's meaning:
|
||||
* * NULL (0x0): the current "new.target" is undefined, that is the execution is inside a normal method.
|
||||
* * JERRY_CONTEXT_INVALID_NEW_TARGET (0x1): the current "new.target" is invalid, that is outside of a method.
|
||||
* * Any other valid function object pointer: the current "new.target" is valid and it is constructor call.
|
||||
*/
|
||||
ecma_object_t *current_new_target;
|
||||
@@ -237,11 +236,6 @@ struct jerry_context_t
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
};
|
||||
|
||||
/**
|
||||
* Magic constant used to indicate that the current "new.target" is not inside a function.
|
||||
*/
|
||||
#define JERRY_CONTEXT_INVALID_NEW_TARGET ((ecma_object_t *) 0x1)
|
||||
|
||||
#if ENABLED (JERRY_EXTERNAL_CONTEXT)
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user