Rename ecma_is_value_error to ECMA_IS_VALUE_ERROR.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-06-10 01:04:08 -07:00
parent 1eeed7e07e
commit b828d4a463
28 changed files with 147 additions and 154 deletions
@@ -179,12 +179,12 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
// c.
ecma_value_t completion = ecma_op_to_number (property_desc_p->value);
if (ecma_is_value_error (completion))
if (ECMA_IS_VALUE_ERROR (completion))
{
return completion;
}
JERRY_ASSERT (!ecma_is_value_error (completion)
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (completion)
&& ecma_is_value_number (completion));
ecma_number_t new_len_num = ecma_get_number_from_value (completion);
@@ -255,7 +255,7 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
if (!ecma_is_value_true (succeeded))
{
JERRY_ASSERT (ecma_is_value_false (succeeded)
|| ecma_is_value_error (succeeded));
|| ECMA_IS_VALUE_ERROR (succeeded));
// k.
ret_value = succeeded;
+2 -2
View File
@@ -108,7 +108,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
// 4.
ecma_value_t x_num_value = ecma_op_to_number (x);
if (ecma_is_value_error (x_num_value))
if (ECMA_IS_VALUE_ERROR (x_num_value))
{
return x_num_value;
}
@@ -146,7 +146,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
// 9.
ecma_value_t x_prim_value = ecma_op_to_primitive (x, ECMA_PREFERRED_TYPE_NO);
if (ecma_is_value_error (x_prim_value))
if (ECMA_IS_VALUE_ERROR (x_prim_value))
{
return x_prim_value;
}
+7 -7
View File
@@ -599,7 +599,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (enumerable_magic_string_p);
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -621,7 +621,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (configurable_magic_string_p);
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -643,7 +643,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (value_magic_string_p);
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -665,7 +665,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (writable_magic_string_p);
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -708,7 +708,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (get_magic_string_p);
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -752,7 +752,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
ecma_deref_ecma_string (set_magic_string_p);
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
@@ -768,7 +768,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
}
}
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
JERRY_ASSERT (ecma_is_value_empty (ret_value));
}
@@ -601,7 +601,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
// 3., 4.
this_binding = ecma_op_to_object (this_arg_value);
JERRY_ASSERT (!ecma_is_value_error (this_binding));
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (this_binding));
}
// 5.
+2 -2
View File
@@ -162,7 +162,7 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme
is_deletable, /* Configurable */
true); /* Failure handling */
if (ecma_is_value_error (completion))
if (ECMA_IS_VALUE_ERROR (completion))
{
return completion;
}
@@ -218,7 +218,7 @@ ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment
value,
is_strict);
if (ecma_is_value_error (completion))
if (ECMA_IS_VALUE_ERROR (completion))
{
return completion;
}
@@ -43,7 +43,7 @@ ecma_op_create_number_object (ecma_value_t arg) /**< argument passed to the Numb
{
ecma_value_t conv_to_num_completion = ecma_op_to_number (arg);
if (ecma_is_value_error (conv_to_num_completion))
if (ECMA_IS_VALUE_ERROR (conv_to_num_completion))
{
return conv_to_num_completion;
}
@@ -291,7 +291,7 @@ ecma_arguments_get_mapped_arg_value (ecma_object_t *map_p, /**< [[ParametersMap]
ecma_string_t *arg_name_p = ecma_get_string_from_value (arg_name_prop_value);
ecma_value_t completion = ecma_op_get_binding_value (lex_env_p, arg_name_p, true);
JERRY_ASSERT (!ecma_is_value_error (completion));
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (completion));
return completion;
} /* ecma_arguments_get_mapped_arg_value */
@@ -424,7 +424,7 @@ ecma_op_general_object_put (ecma_object_t *obj_p, /**< the object */
&value,
1);
if (!ecma_is_value_error (ret_value))
if (!ECMA_IS_VALUE_ERROR (ret_value))
{
ecma_fast_free_value (ret_value);
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
@@ -533,7 +533,7 @@ ecma_op_general_object_default_value (ecma_object_t *obj_p, /**< the object */
ecma_deref_ecma_string (function_name_p);
if (ecma_is_value_error (function_value_get_completion))
if (ECMA_IS_VALUE_ERROR (function_value_get_completion))
{
return function_value_get_completion;
}
@@ -552,7 +552,7 @@ ecma_op_general_object_default_value (ecma_object_t *obj_p, /**< the object */
ecma_free_value (function_value_get_completion);
if (ecma_is_value_error (call_completion)
if (ECMA_IS_VALUE_ERROR (call_completion)
|| (!ecma_is_value_empty (call_completion)
&& !ecma_is_value_object (call_completion)))
{
+16 -16
View File
@@ -306,7 +306,7 @@ ecma_op_create_regexp_object (ecma_string_t *pattern_p, /**< input pattern */
ECMA_FINALIZE (empty);
if (ecma_is_value_error (ret_value))
if (ECMA_IS_VALUE_ERROR (ret_value))
{
ecma_deref_object (obj_p);
}
@@ -552,7 +552,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!sub_str_p)
{
match_value = re_match_regexp (re_ctx_p, bc_p, str_curr_p, &sub_str_p);
if (ecma_is_value_error (match_value))
if (ECMA_IS_VALUE_ERROR (match_value))
{
break;
}
@@ -561,7 +561,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
while (re_get_opcode (&bc_p) == RE_OP_ALTERNATIVE);
if (!ecma_is_value_error (match_value))
if (!ECMA_IS_VALUE_ERROR (match_value))
{
JERRY_DDLOG ("Execute RE_OP_LOOKAHEAD_POS/NEG: ");
ecma_free_value (match_value);
@@ -578,7 +578,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
}
if (!ecma_is_value_error (match_value))
if (!ECMA_IS_VALUE_ERROR (match_value))
{
if (ecma_is_value_true (match_value))
{
@@ -707,7 +707,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -792,7 +792,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -850,7 +850,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -874,7 +874,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -928,7 +928,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -997,7 +997,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1021,7 +1021,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1042,7 +1042,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1077,7 +1077,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1087,7 +1087,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!ecma_is_value_true (match_value))
{
if (ecma_is_value_error (match_value))
if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1120,7 +1120,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
if (!ecma_is_value_true (match_value))
{
if (ecma_is_value_error (match_value))
if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -1141,7 +1141,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
*out_str_p = sub_str_p;
return match_value; /* match */
}
else if (ecma_is_value_error (match_value))
else if (ECMA_IS_VALUE_ERROR (match_value))
{
return match_value;
}
@@ -60,13 +60,13 @@ ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of
{
ecma_value_t to_str_arg_value = ecma_op_to_string (arguments_list_p[0]);
if (ecma_is_value_error (to_str_arg_value))
if (ECMA_IS_VALUE_ERROR (to_str_arg_value))
{
return to_str_arg_value;
}
else
{
JERRY_ASSERT (!ecma_is_value_error (to_str_arg_value));
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (to_str_arg_value));
JERRY_ASSERT (ecma_is_value_string (to_str_arg_value));
prim_prop_str_value_p = ecma_get_string_from_value (to_str_arg_value);
@@ -32,7 +32,7 @@
#define ECMA_TRY_CATCH(var, op, return_value) \
JERRY_ASSERT (return_value == ecma_make_simple_value (ECMA_SIMPLE_VALUE_EMPTY)); \
ecma_value_t var ## _completion = op; \
if (unlikely (ecma_is_value_error (var ## _completion))) \
if (ECMA_IS_VALUE_ERROR (var ## _completion)) \
{ \
return_value = var ## _completion; \
} \