Converting ecma_value_t to class that is used for on-stack storage of ecma-values.

Original ecma_value_t is renamed to ecma_value_packed_t and is used for on-heap storage.
Copy and move constructors, move assignment operator of ecma_value_t are not created.
New ecma-value return convention is introduced: ecma-values are now returned through ecma_value_t &ret_val argument.
This commit is contained in:
Ruben Ayrapetyan
2015-01-30 22:52:43 +03:00
parent 4cd7f96acc
commit 00afd4e0e2
70 changed files with 1192 additions and 976 deletions
+8 -5
View File
@@ -41,14 +41,17 @@
ecma_completion_value_t
ecma_op_create_number_object (const ecma_value_t& arg) /**< argument passed to the Number constructor */
{
ecma_completion_value_t conv_to_num_completion = ecma_op_to_number (arg);
ecma_completion_value_t to_num_completion = ecma_op_to_number (arg);
if (!ecma_is_completion_value_normal (conv_to_num_completion))
if (!ecma_is_completion_value_normal (to_num_completion))
{
return conv_to_num_completion;
return to_num_completion;
}
ecma_number_t *prim_value_p = ecma_get_number_from_completion_value (conv_to_num_completion);
ecma_value_t num_value;
ecma_get_completion_value_value (num_value, to_num_completion);
ecma_number_t *prim_value_p = ecma_get_number_from_value (num_value);
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_NUMBER_BUILTIN
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_NUMBER_PROTOTYPE);
@@ -68,5 +71,5 @@ ecma_op_create_number_object (const ecma_value_t& arg) /**< argument passed to t
ECMA_INTERNAL_PROPERTY_PRIMITIVE_NUMBER_VALUE);
ECMA_SET_POINTER (prim_value_prop_p->u.internal_property.value, prim_value_p);
return ecma_make_normal_completion_value (ecma_make_object_value (obj_p));
return ecma_make_normal_completion_value (ecma_value_t (obj_p));
} /* ecma_op_create_number_object */