-
Notifications
You must be signed in to change notification settings - Fork 683
Use [[DefineOwnProperty]] in Array builtins where necessary. #458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use [[DefineOwnProperty]] in Array builtins where necessary. #458
Conversation
ecma_free_completion_value (put_comp_value); | ||
|
||
/* 10.c.ii */ | ||
ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should introduce a helper function to eliminate repetitive code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added helper.
a5e5fe8
to
e2a4498
Compare
good to me |
* Returned value must be freed with ecma_free_completion_value. | ||
*/ | ||
ecma_completion_value_t | ||
ecma_builtin_helper_def_prop (ecma_object_t *obj, /**< object */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be: obj_p
e2a4498
to
fd09ada
Compare
@@ -35,6 +35,13 @@ extern ecma_completion_value_t ecma_builtin_helper_array_concat_value (ecma_obje | |||
ecma_value_t); | |||
extern uint32_t ecma_builtin_helper_array_index_normalize (ecma_number_t index, uint32_t length); | |||
extern uint32_t ecma_builtin_helper_string_index_normalize (ecma_number_t index, uint32_t length); | |||
extern ecma_completion_value_t ecma_builtin_helper_def_prop (ecma_object_t *obj, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be: obj_p
fd09ada
to
b154597
Compare
@galpeter, fixed. |
lgtm |
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
b154597
to
1193de8
Compare
[[Put]] fails to create the property when we have inherited properties from Array.prototype.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com