Use 'ecma_make_boolean_value' where possible. (#1394)

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2016-10-18 09:12:05 +02:00
committed by Zoltan Herczeg
parent 42be0704b9
commit e8428383f1
4 changed files with 4 additions and 32 deletions
@@ -151,14 +151,7 @@ ecma_builtin_object_prototype_object_has_own_property (ecma_value_t this_arg, /*
ecma_object_t *obj_p = ecma_get_object_from_value (obj_val);
/* 3. */
if (ecma_op_object_has_own_property (obj_p, property_name_string_p))
{
return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
}
else
{
return_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
}
return_value = ecma_make_boolean_value (ecma_op_object_has_own_property (obj_p, property_name_string_p));
ECMA_FINALIZE (obj_val);
@@ -330,14 +330,7 @@ ecma_builtin_regexp_prototype_test (ecma_value_t this_arg, /**< this argument */
ecma_builtin_regexp_prototype_exec (this_arg, arg),
ret_value);
if (ecma_is_value_null (match_value))
{
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_FALSE);
}
else
{
ret_value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
}
ret_value = ecma_make_boolean_value (!ecma_is_value_null (match_value));
ECMA_FINALIZE (match_value);