Changing size of ecma-array's chunk to fixed 8 bytes.

This commit is contained in:
Ruben Ayrapetyan
2014-08-08 18:23:02 +04:00
parent 0007adce8b
commit cd0246bedc
5 changed files with 7 additions and 12 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ FIXME( Pack ecma_object_t )
JERRY_STATIC_ASSERT( sizeof (ecma_object_t) <= 2 * sizeof (uint64_t) );
JERRY_STATIC_ASSERT( sizeof (ecma_array_header_t) <= sizeof (uint32_t) );
JERRY_STATIC_ASSERT( sizeof (ecma_array_first_chunk_t) == ECMA_ARRAY_CHUNK_SIZE_IN_BYTES );
JERRY_STATIC_ASSERT( sizeof (ecma_array_non_first_chunk_t) == ECMA_ARRAY_CHUNK_SIZE_IN_BYTES );
JERRY_STATIC_ASSERT( sizeof (ecma_array_first_chunk_t) == sizeof(uint64_t) );
JERRY_STATIC_ASSERT( sizeof (ecma_array_non_first_chunk_t) == sizeof(uint64_t) );
JERRY_STATIC_ASSERT( sizeof (ecma_completion_value_t) == sizeof(uint32_t) );
/**
+2 -7
View File
@@ -459,11 +459,6 @@ typedef struct {
ecma_length_t unit_number;
} ecma_array_header_t;
/**
* Size of a chunk, containing a String's part, in bytes
*/
#define ECMA_ARRAY_CHUNK_SIZE_IN_BYTES 8
/**
* Description of first chunk in a chain of chunks that contains an Array.
*/
@@ -472,7 +467,7 @@ typedef struct {
ecma_array_header_t header;
/** Elements */
uint8_t data[ ECMA_ARRAY_CHUNK_SIZE_IN_BYTES - sizeof (ecma_array_header_t) ];
uint8_t data[ sizeof(uint64_t) - sizeof (ecma_array_header_t) ];
} ecma_array_first_chunk_t;
/**
@@ -483,7 +478,7 @@ typedef struct {
uint16_t next_chunk_p;
/** Characters */
uint8_t data[ ECMA_ARRAY_CHUNK_SIZE_IN_BYTES - sizeof (uint16_t) ];
uint8_t data[ sizeof(uint64_t) - sizeof (uint16_t) ];
} ecma_array_non_first_chunk_t;
/**