@@ -778,8 +778,7 @@ typedef struct
778778typedef enum
779779{
780780 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 */
783782 ECMA_STRING_CONTAINER_HEAP_NUMBER , /**< actual data is on the heap as a ecma_number_t */
784783 ECMA_STRING_CONTAINER_UINT32_IN_DESC , /**< actual data is UInt32-represeneted Number
785784 stored locally in the string's descriptor */
@@ -795,6 +794,18 @@ FIXME (Move to library that should define the type (literal.h /* ? */))
795794typedef rcs_record_t * literal_t ;
796795typedef rcs_cpointer_t lit_cpointer_t ;
797796
797+ #define ECMA_STRING_DATA_EXTRA_SIZE (sizeof (ecma_string_data_t) - sizeof (lit_utf8_byte_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+
798809/**
799810 * ECMA string-value descriptor
800811 */
@@ -822,7 +833,7 @@ typedef struct ecma_string_t
822833 lit_cpointer_t lit_cp ;
823834
824835 /** 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 ;
826837
827838 /** Compressed pointer to an ecma_number_t */
828839 mem_cpointer_t number_cp : ECMA_POINTER_FIELD_WIDTH ;
0 commit comments