Implement Symbol.isConcatSpreadable (#3307)

Algorithm is based on ECMA-262 v6, 22.1.3.1.1

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2019-11-19 13:55:49 +01:00
committed by Dániel Bátyai
parent 8bdb32cc88
commit a7d129c8b2
7 changed files with 186 additions and 39 deletions
+13
View File
@@ -405,6 +405,19 @@ ecma_check_value_type_is_spec_defined (ecma_value_t value) /**< ecma value */
|| ecma_is_value_object (value));
} /* ecma_check_value_type_is_spec_defined */
/**
* Checks if the given argument is an array or not.
*
* @return true - if the given argument is an array object
* false - otherwise
*/
inline bool JERRY_ATTR_CONST JERRY_ATTR_ALWAYS_INLINE
ecma_is_value_array (ecma_value_t arg) /**< argument */
{
return (ecma_is_value_object (arg)
&& ecma_get_object_type (ecma_get_object_from_value (arg)) == ECMA_OBJECT_TYPE_ARRAY);
} /* ecma_is_value_array */
/**
* Creates an ecma value from the given raw boolean.
*
+1
View File
@@ -184,6 +184,7 @@ bool JERRY_ATTR_CONST ecma_is_value_direct_string (ecma_value_t value);
bool JERRY_ATTR_CONST ecma_is_value_non_direct_string (ecma_value_t value);
bool JERRY_ATTR_CONST ecma_is_value_object (ecma_value_t value);
bool JERRY_ATTR_CONST ecma_is_value_error_reference (ecma_value_t value);
bool JERRY_ATTR_CONST ecma_is_value_array (ecma_value_t arg);
void ecma_check_value_type_is_spec_defined (ecma_value_t value);