Implement ECMAScript 2022 private class methods and fields (#4831)

Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu
Co-authored-by: Martin Negyokru mnegyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2021-11-26 12:24:59 +01:00
committed by GitHub
parent 841e21a970
commit 70e275e92f
35 changed files with 2196 additions and 4341 deletions
+1
View File
@@ -115,6 +115,7 @@ bool lit_code_point_is_identifier_part (lit_code_point_t code_point);
#define LIT_CHAR_TILDE ((ecma_char_t) '~') /* tilde */
#define LIT_CHAR_QUESTION ((ecma_char_t) '?') /* question mark */
#define LIT_CHAR_COLON ((ecma_char_t) ':') /* colon */
#define LIT_CHAR_HASHMARK ((ecma_char_t) '#') /* hashmark */
/*
* Special characters for String.prototype.replace.
+7
View File
@@ -66,11 +66,18 @@ typedef enum
* which contains references to other values */
LIT_INTERNAL_MAGIC_STRING_ENVIRONMENT_RECORD, /**< dynamic environment record needed by class constructors */
LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED, /**< computed class field name list */
LIT_INTERNAL_MAGIC_STRING_CLASS_PRIVATE_ELEMENTS, /**< internal collection for storing private elements */
LIT_INTERNAL_MAGIC_STRING_CONTAINER_WEAK_REFS, /**< Weak references to the current container object */
LIT_INTERNAL_MAGIC_STRING_WEAK_REFS, /**< Weak references to the current object */
LIT_MAGIC_STRING__COUNT /**< number of magic strings */
} lit_magic_string_id_t;
/**
* Properties that are need to be ignored for opfunc_set_class_attributes
*/
#define LIT_INTERNAL_MAGIC_STRING_IGNORED(id) \
((id) >= LIT_INTERNAL_MAGIC_STRING_CLASS_FIELD_COMPUTED && (id) <= LIT_INTERNAL_MAGIC_STRING_CLASS_PRIVATE_ELEMENTS)
/**
* Checks whether the given id corresponds to a global symbol
*/