@@ -778,8 +778,7 @@ typedef struct
778
778
typedef enum
779
779
{
780
780
ECMA_STRING_CONTAINER_LIT_TABLE , /**< actual data is in literal table */
781
- ECMA_STRING_CONTAINER_HEAP_CHUNKS , /**< actual data is on the heap
782
- in a ecma_collection_chunk_t chain */
781
+ ECMA_STRING_CONTAINER_STRING_DATA , /**< actual data is on the heap */
783
782
ECMA_STRING_CONTAINER_HEAP_NUMBER , /**< actual data is on the heap as a ecma_number_t */
784
783
ECMA_STRING_CONTAINER_UINT32_IN_DESC , /**< actual data is UInt32-represeneted Number
785
784
stored locally in the string's descriptor */
@@ -795,6 +794,18 @@ FIXME (Move to library that should define the type (literal.h /* ? */))
795
794
typedef rcs_record_t * literal_t ;
796
795
typedef rcs_cpointer_t lit_cpointer_t ;
797
796
797
+ #define ECMA_STRING_DATA_EXTRA_SIZE (2 * sizeof (uint16_t))
798
+
799
+ /**
800
+ * ECMA string data descriptor
801
+ */
802
+ typedef struct ecma_string_data_t
803
+ {
804
+ uint16_t size ;
805
+ uint16_t length ;
806
+ lit_utf8_byte_t data ;
807
+ } ecma_string_data_t ;
808
+
798
809
/**
799
810
* ECMA string-value descriptor
800
811
*/
@@ -822,7 +833,7 @@ typedef struct ecma_string_t
822
833
lit_cpointer_t lit_cp ;
823
834
824
835
/** Compressed pointer to an ecma_collection_header_t */
825
- mem_cpointer_t collection_cp : ECMA_POINTER_FIELD_WIDTH ;
836
+ mem_cpointer_t data_cp : ECMA_POINTER_FIELD_WIDTH ;
826
837
827
838
/** Compressed pointer to an ecma_number_t */
828
839
mem_cpointer_t number_cp : ECMA_POINTER_FIELD_WIDTH ;
0 commit comments