Optimize string concatenation. (#2141)

This patch adds two new string concatenation functions:
ecma_append_chars_to_string and ecma_append_magic_string_to_string

The former appends a cesu8 byte array and the latter appends a magic string
to the end of an ecma-string. These two free (dereference) their ecma-string
argument, and this change is also applied to the original ecma_concat_ecma_strings
function which simplifies string handling in most cases.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-12-19 13:45:48 +01:00
committed by GitHub
parent bd574956e3
commit a2d3ea61eb
16 changed files with 369 additions and 555 deletions
@@ -284,6 +284,7 @@ ecma_op_function_has_instance (ecma_object_t *func_obj_p, /**< Function object *
if (!ecma_is_value_object (prototype_obj_value))
{
ecma_free_value (prototype_obj_value);
return ecma_raise_type_error (ECMA_ERR_MSG ("Object expected."));
}