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:
@@ -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."));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user