@@ -815,13 +815,12 @@ typedef enum
815
815
*/
816
816
typedef enum
817
817
{
818
- /* Types between 0 - 12 are ecma_object_type_t which can have a built-in flag. */
819
-
820
- ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE = 29 , /**< declarative lexical environment */
818
+ /* Types between 0 - 12 are ecma_object_type_t. */
819
+ ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE = 13 , /**< declarative lexical environment */
821
820
#if JERRY_ESNEXT
822
- ECMA_LEXICAL_ENVIRONMENT_CLASS = 30 , /**< lexical environment with class */
821
+ ECMA_LEXICAL_ENVIRONMENT_CLASS = 14 , /**< lexical environment with class */
823
822
#endif /* JERRY_ESNEXT */
824
- ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 31 , /**< object-bound lexical environment */
823
+ ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 15 , /**< object-bound lexical environment */
825
824
826
825
ECMA_LEXICAL_ENVIRONMENT_TYPE_START = ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE , /**< first lexical
827
826
* environment type */
@@ -875,12 +874,12 @@ typedef enum
875
874
/**
876
875
* Ecma object type mask for getting the object type.
877
876
*/
878
- #define ECMA_OBJECT_TYPE_MASK 0x01fu
877
+ #define ECMA_OBJECT_TYPE_MASK 0x00fu
879
878
880
879
/**
881
880
* Extensible object.
882
881
*/
883
- #define ECMA_OBJECT_FLAG_EXTENSIBLE 0x20
882
+ #define ECMA_OBJECT_FLAG_EXTENSIBLE 0x10
884
883
885
884
/**
886
885
* Declarative lexical environments created for non-closure code blocks
@@ -895,7 +894,7 @@ typedef enum
895
894
/**
896
895
* Bitshift index for an ecma-object reference count field
897
896
*/
898
- #define ECMA_OBJECT_REF_SHIFT 6
897
+ #define ECMA_OBJECT_REF_SHIFT 5
899
898
900
899
/**
901
900
* Value for increasing or decreasing the object reference counter.
@@ -904,30 +903,25 @@ typedef enum
904
903
905
904
#if JERRY_CPOINTER_32_BIT
906
905
907
- /**
908
- * Bitmask for an ecma-object reference count field
909
- */
910
- #define ECMA_OBJECT_REF_MASK (((1u << 26) - 1) << ECMA_OBJECT_REF_SHIFT)
911
-
912
906
/**
913
907
* Type of the descriptor field of an object
914
908
*/
915
909
typedef uint32_t ecma_object_descriptor_t ;
916
910
917
911
#else /* !JERRY_CPOINTER_32_BIT */
918
912
919
- /**
920
- * Bitmask for an ecma-object reference count field
921
- */
922
- #define ECMA_OBJECT_REF_MASK (((1u << 10) - 1) << ECMA_OBJECT_REF_SHIFT)
923
-
924
913
/**
925
914
* Type of the descriptor field of an object
926
915
*/
927
916
typedef uint16_t ecma_object_descriptor_t ;
928
917
929
918
#endif /* JERRY_CPOINTER_32_BIT */
930
919
920
+ /**
921
+ * Bitmask for an ecma-object reference count field
922
+ */
923
+ #define ECMA_OBJECT_REF_MASK ((ecma_object_descriptor_t) (~0u << ECMA_OBJECT_REF_SHIFT))
924
+
931
925
/**
932
926
* Represents non-visited white object
933
927
*/
0 commit comments