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:
committed by
Robert Fancsik
parent
40d930d62c
commit
e0d8c4ca10
@@ -460,6 +460,18 @@ ecma_builtin_array_object_of (ecma_value_t this_arg, /**< 'this' argument */
|
||||
|
||||
return ecma_make_object_value (obj_p);
|
||||
} /* ecma_builtin_array_object_of */
|
||||
|
||||
/**
|
||||
* 22.1.2.5 get Array [ @@species ] accessor
|
||||
*
|
||||
* @return ecma_value
|
||||
* returned value must be freed with ecma_free_value
|
||||
*/
|
||||
ecma_value_t
|
||||
ecma_builtin_array_species_get (ecma_value_t this_value) /**< This Value */
|
||||
{
|
||||
return ecma_copy_value (this_value);
|
||||
} /* ecma_builtin_array_species_get */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user