Add @@species accessor to Array and Promise builtin objects (#3440)

Fully support @@species and SpeciesConstructor in Array and Promise builtins.
Also added partial support to TypedArrays, but a rework is needed in %TypedArray%.prototype functions' typedarray constructor, which is out of this patch's scope.

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
This commit is contained in:
Daniel Balla
2019-12-16 11:44:15 +01:00
committed by Robert Fancsik
parent 40d930d62c
commit e0d8c4ca10
28 changed files with 743 additions and 116 deletions
+3 -1
View File
@@ -16,6 +16,7 @@
#ifndef ECMA_OBJECTS_H
#define ECMA_OBJECTS_H
#include "ecma-builtins.h"
#include "ecma-conversion.h"
#include "ecma-globals.h"
@@ -70,7 +71,8 @@ bool ecma_object_is_regexp_object (ecma_value_t arg);
#if ENABLED (JERRY_ES2015)
ecma_value_t ecma_op_is_concat_spreadable (ecma_value_t arg);
ecma_value_t ecma_op_is_regexp (ecma_value_t arg);
#endif /* !ENABLED (JERRY_ES2015) */
ecma_value_t ecma_op_species_constructor (ecma_object_t *this_value, ecma_builtin_id_t default_constructor_id);
#endif /* ENABLED (JERRY_ES2015) */
/**
* @}