Fixing performance degradation that occured in commit 9b040f31d2a2e1e4d43dd347d5e81282997dd2b5.
This commit is contained in:
@@ -924,11 +924,11 @@ ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma-
|
||||
int32_t
|
||||
ecma_string_get_length (const ecma_string_t *string_p) /**< ecma-string */
|
||||
{
|
||||
if (string_p->container != ECMA_STRING_CONTAINER_CONCATENATION)
|
||||
if (likely (string_p->length != ECMA_STRING_LENGTH_SHOULD_BE_CALCULATED))
|
||||
{
|
||||
return string_p->length;
|
||||
}
|
||||
else if (string_p->length != ECMA_STRING_LENGTH_SHOULD_BE_CALCULATED)
|
||||
else if (string_p->container != ECMA_STRING_CONTAINER_CONCATENATION)
|
||||
{
|
||||
return string_p->length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user