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:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user