Reorganize property descriptor flags (#4622)

Furthermore rename JERRY_PROP_IS_THROW to JERRY_PROP_SHOULD_THROW
and add more invalid descriptor checks.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-03-10 08:17:20 +01:00
committed by GitHub
parent dc3ae4ff06
commit 7a2665621b
18 changed files with 112 additions and 97 deletions
+11 -10
View File
@@ -173,18 +173,19 @@ typedef uint32_t jerry_value_t;
typedef enum
{
JERRY_PROP_NO_OPTS = (0), /** empty property descriptor */
JERRY_PROP_IS_GET_DEFINED = (1 << 0), /** Is [[Get]] defined? */
JERRY_PROP_IS_SET_DEFINED = (1 << 1), /** Is [[Set]] defined? */
JERRY_PROP_IS_CONFIGURABLE = (1 << 0), /** [[Configurable]] */
JERRY_PROP_IS_ENUMERABLE = (1 << 1), /** [[Enumerable]] */
JERRY_PROP_IS_WRITABLE = (1 << 2), /** [[Writable]] */
JERRY_PROP_IS_CONFIGURABLE = (1 << 2), /** [[Configurable]] */
JERRY_PROP_IS_ENUMERABLE = (1 << 3), /** [[Enumerable]] */
JERRY_PROP_IS_WRITABLE = (1 << 4), /** [[Writable]] */
JERRY_PROP_IS_THROW = (1 << 5), /** Flag that controls failure handling */
JERRY_PROP_IS_CONFIGURABLE_DEFINED = (1 << 3), /** is [[Configurable]] defined? */
JERRY_PROP_IS_ENUMERABLE_DEFINED = (1 << 4), /** is [[Enumerable]] defined? */
JERRY_PROP_IS_WRITABLE_DEFINED = (1 << 5), /** is [[Writable]] defined? */
JERRY_PROP_IS_VALUE_DEFINED = (1 << 6), /** Is [[Value]] defined? */
JERRY_PROP_IS_CONFIGURABLE_DEFINED = (1 << 7), /** Is [[Configurable]] defined? */
JERRY_PROP_IS_ENUMERABLE_DEFINED = (1 << 8), /** Is [[Enumerable]] defined? */
JERRY_PROP_IS_WRITABLE_DEFINED = (1 << 9), /** Is [[Writable]] defined? */
JERRY_PROP_IS_VALUE_DEFINED = (1 << 6), /** is [[Value]] defined? */
JERRY_PROP_IS_GET_DEFINED = (1 << 7), /** is [[Get]] defined? */
JERRY_PROP_IS_SET_DEFINED = (1 << 8), /** is [[Set]] defined? */
JERRY_PROP_SHOULD_THROW = (1 << 9), /** should throw on error, instead of returning with false */
} jerry_property_descriptor_flags_t;
/**