Make the Set.prototype values, keys and [@@iterator] methods to be one intrinsic method (#3777)

After this patch these methods will be the same function objects

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-06-18 13:59:31 +02:00
committed by GitHub
parent 16750e8171
commit 0f0041d720
8 changed files with 52 additions and 7 deletions
+1
View File
@@ -49,6 +49,7 @@ typedef enum
LIT_INTERNAL_MAGIC_STRING_MAP_KEY, /**< Property key used when an object is a key in a map object */
LIT_INTERNAL_MAGIC_API_INTERNAL, /**< Property key used to add non-visible JS properties from the public API */
LIT_INTERNAL_MAGIC_STRING_ARRAY_PROTOTYPE_VALUES, /**< %ArrayProto_values% intrinsic routine */
LIT_INTERNAL_MAGIC_STRING_SET_PROTOTYPE_KEYS, /**< Set.prototype values, keys and [@@iterator] routines */
LIT_INTERNAL_MAGIC_THIS_BINDING_VALUE, /**< FunctionEnvironmentRecord [[ThisBindingValue]] internal slot */
/* List of well known symbols */
LIT_GLOBAL_SYMBOL_HAS_INSTANCE, /**< @@hasInstance well known symbol */
+2 -1
View File
@@ -53,7 +53,8 @@ LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_MAP_UL, "Map")
#endif
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_NAN, "NaN")
#if ENABLED (JERRY_BUILTIN_CONTAINER) \
|| ENABLED (JERRY_BUILTIN_SET)
|| ENABLED (JERRY_BUILTIN_SET) \
|| ENABLED (JERRY_ESNEXT)
LIT_MAGIC_STRING_DEF (LIT_MAGIC_STRING_SET_UL, "Set")
#endif
#if ENABLED (JERRY_BUILTIN_DATE)