Remove 'ecma_completion_value_t'

Remove ecma_completion_value_t, and add an extra bit to
ecma_value_t to represent errors. From the long list of
completion types only normal and error remained.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-02-16 04:06:18 -08:00
committed by László Langó
parent c25d8617a5
commit b2426a7a94
96 changed files with 2691 additions and 3272 deletions
@@ -35,21 +35,21 @@
*
* See also: ECMA-262 v5, 15.6.2.1
*
* @return completion value
* Returned value must be freed with ecma_free_completion_value
* @return ecma value
* Returned value must be freed with ecma_free_value
*/
ecma_completion_value_t
ecma_value_t
ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boolean constructor */
{
ecma_completion_value_t conv_to_boolean_completion = ecma_op_to_boolean (arg);
ecma_value_t conv_to_boolean_completion = ecma_op_to_boolean (arg);
if (!ecma_is_completion_value_normal (conv_to_boolean_completion))
if (ecma_is_value_error (conv_to_boolean_completion))
{
return conv_to_boolean_completion;
}
ecma_simple_value_t bool_value = (ecma_is_value_true (ecma_get_completion_value_value (conv_to_boolean_completion)) ?
ECMA_SIMPLE_VALUE_TRUE : ECMA_SIMPLE_VALUE_FALSE);
ecma_simple_value_t bool_value = (ecma_is_value_true (conv_to_boolean_completion) ? ECMA_SIMPLE_VALUE_TRUE
: ECMA_SIMPLE_VALUE_FALSE);
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_BOOLEAN_BUILTIN
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_BOOLEAN_PROTOTYPE);
@@ -69,7 +69,7 @@ ecma_op_create_boolean_object (ecma_value_t arg) /**< argument passed to the Boo
ECMA_INTERNAL_PROPERTY_PRIMITIVE_BOOLEAN_VALUE);
prim_value_prop_p->u.internal_property.value = bool_value;
return ecma_make_normal_completion_value (ecma_make_object_value (obj_p));
return ecma_make_object_value (obj_p);
} /* ecma_op_create_boolean_object */
/**