Replacing ecma_array_first_chunk_t with ecma_string_t for ecma-strings.
This commit is contained in:
@@ -80,10 +80,10 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
}
|
||||
else if (is_x_string)
|
||||
{ // d.
|
||||
ecma_array_first_chunk_t* x_str = (ecma_array_first_chunk_t*)(ECMA_GET_POINTER(x.value));
|
||||
ecma_array_first_chunk_t* y_str = (ecma_array_first_chunk_t*)(ECMA_GET_POINTER(y.value));
|
||||
ecma_string_t* x_str_p = ECMA_GET_POINTER(x.value);
|
||||
ecma_string_t* y_str_p = ECMA_GET_POINTER(y.value);
|
||||
|
||||
return ecma_compare_ecma_string_to_ecma_string (x_str, y_str);
|
||||
return ecma_compare_ecma_string_to_ecma_string (x_str_p, y_str_p);
|
||||
}
|
||||
else if (is_x_boolean)
|
||||
{ // e.
|
||||
|
||||
@@ -134,8 +134,8 @@ ecma_op_same_value (ecma_value_t x, /**< ecma-value */
|
||||
|
||||
if (is_x_string)
|
||||
{
|
||||
ecma_array_first_chunk_t* x_str_p = (ecma_array_first_chunk_t*)(ECMA_GET_POINTER(x.value));
|
||||
ecma_array_first_chunk_t* y_str_p = (ecma_array_first_chunk_t*)(ECMA_GET_POINTER(y.value));
|
||||
ecma_string_t* x_str_p = ECMA_GET_POINTER(x.value);
|
||||
ecma_string_t* y_str_p = ECMA_GET_POINTER(y.value);
|
||||
|
||||
return ecma_compare_ecma_string_to_ecma_string (x_str_p, y_str_p);
|
||||
}
|
||||
@@ -234,9 +234,9 @@ ecma_op_to_boolean (ecma_value_t value) /**< ecma-value */
|
||||
}
|
||||
case ECMA_TYPE_STRING:
|
||||
{
|
||||
ecma_array_first_chunk_t *str_p = ECMA_GET_POINTER(value.value);
|
||||
ecma_string_t *str_p = ECMA_GET_POINTER(value.value);
|
||||
|
||||
return ecma_make_simple_completion_value ((str_p->header.unit_number == 0) ? ECMA_SIMPLE_VALUE_FALSE
|
||||
return ecma_make_simple_completion_value ((str_p->length == 0) ? ECMA_SIMPLE_VALUE_FALSE
|
||||
: ECMA_SIMPLE_VALUE_TRUE);
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user