Skip to content

Conversation

dbatyai
Copy link
Member

@dbatyai dbatyai commented May 22, 2015

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]

@ILyoan ILyoan mentioned this pull request May 22, 2015
25 tasks
@dbatyai dbatyai added the ecma builtins Related to ECMA built-in routines label May 22, 2015
@galpeter galpeter added this to the ECMA builtins milestone May 22, 2015
@dbatyai dbatyai force-pushed the array_prototype_sort branch 2 times, most recently from f939751 to 233dd6e Compare May 26, 2015 11:42
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we're using 2 here?

@egavrin egavrin self-assigned this May 27, 2015
@dbatyai dbatyai force-pushed the array_prototype_sort branch from 233dd6e to 0fd2a85 Compare May 28, 2015 14:32
@dbatyai
Copy link
Member Author

dbatyai commented May 28, 2015

Hi @egavrin,
I've made some updates. The previous implementation, even though it was working as expected, had some problems with indexing. I've gone over it and fixed the indexes, so now it works as it should.
I've added some comments as well to make it easier to read.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbatyai, could you, please, add assertions with bound checking in the function?

@dbatyai dbatyai force-pushed the array_prototype_sort branch from 0fd2a85 to 761c079 Compare May 28, 2015 15:26
@dbatyai
Copy link
Member Author

dbatyai commented May 28, 2015

@ruben-ayrapetyan, I've added asserts to make sure we stay in bounds.

@ruben-ayrapetyan
Copy link
Contributor

@dbatyai, thank you!

@egavrin
Copy link
Contributor

egavrin commented May 29, 2015

May we push it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add _p suffix.

@dbatyai dbatyai force-pushed the array_prototype_sort branch from 761c079 to 7fe0d39 Compare May 29, 2015 11:40
@dbatyai
Copy link
Member Author

dbatyai commented May 29, 2015

I've updated the patch.

@ruben-ayrapetyan
Copy link
Contributor

Looks good to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add FIXME to the comment.
Seems that we should change the ecma_op_create_array_object interface to take another type for length argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you, please, raise an issue about this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added FIXME, and opened an issue about it: #133

@dbatyai dbatyai force-pushed the array_prototype_sort branch from 7fe0d39 to 9a88ef0 Compare May 29, 2015 12:31
@egavrin
Copy link
Contributor

egavrin commented May 29, 2015

@dbatyai great! make push

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
JerryScript-DCO-1.0-Signed-off-by: Szilard Ledan [email protected]
@dbatyai dbatyai force-pushed the array_prototype_sort branch from 9a88ef0 to 0fc82e2 Compare May 29, 2015 13:16
@dbatyai
Copy link
Member Author

dbatyai commented May 29, 2015

merged: 6b8e34a

@dbatyai dbatyai closed this May 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecma builtins Related to ECMA built-in routines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants