ecma_stringbuilder_revert (ecma_stringbuilder_t *builder_p, /**< string builder */
                           const lit_utf8_size_t size) /**< new size */
{
  ecma_stringbuilder_header_t *header_p = builder_p->header_p;
  JERRY_ASSERT (header_p != NULL);

  const lit_utf8_size_t new_size = size + ECMA_ASCII_STRING_HEADER_SIZE;
  JERRY_ASSERT (new_size <= header_p->current_size);

#if JERRY_MEM_STATS
  jmem_stats_free_string_bytes (header_p->current_size - new_size);
#endif /* JERRY_MEM_STATS */

  header_p = jmem_heap_realloc_block (header_p, header_p->current_size, new_size);
  header_p->current_size = new_size;
  builder_p->header_p = header_p;
} /* ecma_stringbuilder_revert */
ecma_stringbuilder_revert (ecma_stringbuilder_t *builder_p,  
                           const lit_utf8_size_t size)  
{
  ecma_stringbuilder_header_t *header_p = builder_p->header_p;
  JERRY_ASSERT (header_p != NULL);

  const lit_utf8_size_t new_size = size + ECMA_ASCII_STRING_HEADER_SIZE;
  JERRY_ASSERT (new_size <= header_p->current_size);

#if JERRY_MEM_STATS
  jmem_stats_free_string_bytes (header_p->current_size - new_size);
#endif  

  header_p = jmem_heap_realloc_block (header_p, header_p->current_size, new_size);
  header_p->current_size = new_size;
  builder_p->header_p = header_p;
}  