Rename the jerry_value_has_abort_flag function. (#2291)

Rename the function to represent it's real functionality.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
This commit is contained in:
Istvan Miklos
2018-05-03 16:50:16 +02:00
committed by Robert Sipka
parent 51e193de57
commit 369447aa09
4 changed files with 70 additions and 71 deletions
+23 -23
View File
@@ -626,6 +626,27 @@ jerry_get_global_object (void)
return ecma_make_object_value (ecma_builtin_get (ECMA_BUILTIN_ID_GLOBAL));
} /* jerry_get_global_object */
/**
* Check if the specified value is an abort value.
*
* @return true - if both the error and abort values are set,
* false - otherwise
*/
bool
jerry_value_is_abort (const jerry_value_t value) /**< api value */
{
jerry_assert_api_available ();
if (!ecma_is_value_error_reference (value))
{
return false;
}
ecma_error_reference_t *error_ref_p = ecma_get_error_reference_from_value (value);
return (error_ref_p->refs_and_flags & ECMA_ERROR_REF_ABORT) != 0;
} /* jerry_value_is_abort */
/**
* Check if the specified value is an array object value.
*
@@ -904,27 +925,6 @@ bool jerry_is_feature_enabled (const jerry_feature_t feature)
);
} /* jerry_is_feature_enabled */
/**
* Check if the specified value is an abort value.
*
* @return true - if both the error and abort flags of the specified value are true,
* false - otherwise
*/
bool
jerry_value_has_abort_flag (const jerry_value_t value) /**< api value */
{
jerry_assert_api_available ();
if (!ecma_is_value_error_reference (value))
{
return false;
}
ecma_error_reference_t *error_ref_p = ecma_get_error_reference_from_value (value);
return (error_ref_p->refs_and_flags & ECMA_ERROR_REF_ABORT) != 0;
} /* jerry_value_has_abort_flag */
/**
* Clear the error flag
*/
@@ -951,7 +951,7 @@ jerry_value_set_error_flag (jerry_value_t *value_p)
{
/* This is a rare case so it is optimized for
* binary size rather than performance. */
if (!jerry_value_has_abort_flag (*value_p))
if (!jerry_value_is_abort (*value_p))
{
return;
}
@@ -974,7 +974,7 @@ jerry_value_set_abort_flag (jerry_value_t *value_p)
{
/* This is a rare case so it is optimized for
* binary size rather than performance. */
if (jerry_value_has_abort_flag (*value_p))
if (jerry_value_is_abort (*value_p))
{
return;
}