Change internal property values of built-in primitive objects (namely Number,

String, Boolean) to use ecma-values. When the value of a Number object is
a small integer number, this change reduces the memory consumption, since no
double is allocated.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-05-20 03:06:14 -07:00
parent 1c028d96d6
commit 5ecf83ee8a
13 changed files with 44 additions and 68 deletions
@@ -549,7 +549,7 @@ ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**<
ecma_set_internal_property_value (class_prop_p, LIT_MAGIC_STRING_DATE_UL);
ecma_property_t *prim_value_prop_p = ecma_create_internal_property (obj_p,
ECMA_INTERNAL_PROPERTY_PRIMITIVE_NUMBER_VALUE);
ECMA_INTERNAL_PROPERTY_DATE_FLOAT);
ecma_number_t *prim_value_num_p = ecma_alloc_number ();
*prim_value_num_p = prim_value_num;