Passing less number of arguments to a function is generally faster. So

the three boolean arguments of ecma_create_named_data_property and the
two boolean arguments of ecma_create_named_accessor_property are combined
into one uint8_t argument. On ARM-32 it is preferred to have less than
four arguments, since these arguments can be passed in registers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-05-29 23:47:46 -07:00
parent 379698733a
commit 8c92972b2f
17 changed files with 128 additions and 86 deletions
+1 -2
View File
@@ -181,8 +181,7 @@ opfunc_set_accessor (bool is_getter, /**< is getter accessor */
accessor_name_p,
getter_func_p,
setter_func_p,
true,
true);
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE);
}
else if (is_getter)
{
+5 -8
View File
@@ -973,9 +973,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
property_p = ecma_create_named_data_property (object_p,
prop_name_p,
true,
true,
true);
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);
}
ecma_named_data_property_assign_value (object_p, property_p, left_value);
@@ -1038,11 +1036,10 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
{
ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (length_num);
ecma_property_t *prop_p = ecma_create_named_data_property (array_obj_p,
index_str_p,
true, /* Writable */
true, /* Enumerable */
true); /* Configurable */
ecma_property_t *prop_p;
prop_p = ecma_create_named_data_property (array_obj_p,
index_str_p,
ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE);
JERRY_ASSERT (ecma_is_value_undefined (ecma_get_named_data_property_value (prop_p)));