Introducing getter and setter for named data property's value field, ecma_named_data_property_assign_value interface; using boolean flags for 'Writable', 'Enumerable' and 'Configurable' attributes values while passing them in routine arguments.

This commit is contained in:
Ruben Ayrapetyan
2014-12-03 14:49:38 +03:00
parent 668eef73c8
commit 3190089818
15 changed files with 288 additions and 206 deletions
@@ -258,9 +258,7 @@ TRY_TO_INSTANTIATE_PROPERTY_ROUTINE_NAME (BUILTIN_UNDERSCORED_ID) (ecma_object_t
enumerable,
configurable);
prop_p->u.named_data_property.value = ecma_copy_value (value, false);
ecma_gc_update_may_ref_younger_object_flag_by_value (obj_p,
prop_p->u.named_data_property.value);
ecma_named_data_property_assign_value (obj_p, prop_p, value);
ecma_free_value (value, true);
+2 -4
View File
@@ -341,16 +341,14 @@ ecma_builtin_make_function_object_for_routine (ecma_builtin_id_t builtin_id, /**
ecma_string_t* magic_string_length_p = ecma_get_magic_string (ECMA_MAGIC_STRING_LENGTH);
ecma_property_t *len_prop_p = ecma_create_named_data_property (func_obj_p,
magic_string_length_p,
ECMA_PROPERTY_NOT_WRITABLE,
ECMA_PROPERTY_NOT_ENUMERABLE,
ECMA_PROPERTY_NOT_CONFIGURABLE);
false, false, false);
ecma_deref_ecma_string (magic_string_length_p);
ecma_number_t* len_p = ecma_alloc_number ();
*len_p = length_prop_num_value;
len_prop_p->u.named_data_property.value = ecma_make_number_value (len_p);
ecma_set_named_data_property_value (len_prop_p, ecma_make_number_value (len_p));
return func_obj_p;
} /* ecma_builtin_make_function_object_for_routine */