Fix attributes of length property for bound function (#3659)

fix length property of bound function objects to be configurable (ECMA-262 v6, 19.2.4.1)

JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
This commit is contained in:
Hyukwoo Park
2020-04-04 09:04:02 +09:00
committed by GitHub
parent e470b13096
commit 73a78bd223
7 changed files with 153 additions and 58 deletions
+12 -1
View File
@@ -897,7 +897,7 @@ typedef struct
*/
struct
{
ecma_value_t target_function; /**< target function */
jmem_cpointer_tag_t target_function; /**< target function */
ecma_value_t args_len_or_this; /**< length of arguments or this value */
} bound_function;
@@ -947,6 +947,17 @@ typedef struct
#define ECMA_REGEXP_PROTO_COMPILED_CODE_SIZE \
(JERRY_ALIGNUP (sizeof (ecma_compiled_code_t), JMEM_ALIGNMENT) + sizeof (ecma_value_t))
/**
* Description of bound function objects.
*/
typedef struct
{
ecma_extended_object_t header; /**< extended object header */
#if ENABLED (JERRY_ES2015)
ecma_integer_value_t target_length; /**< length of target function */
#endif /* ENABLED (JERRY_ES2015) */
} ecma_bound_function_t;
#if ENABLED (JERRY_SNAPSHOT_EXEC)
/**