-
Notifications
You must be signed in to change notification settings - Fork 683
Array.prototype.reduceRight() #105
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
Array.prototype.reduceRight() #105
Conversation
// check for init value | ||
try { | ||
[].reduceRight(func); | ||
} |
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.
There should be an assert(false)
after the reduceRight call.
503d889
to
3a1653e
Compare
Updated based on review comments (also from reduce). |
|
||
JERRY_ASSERT (ecma_is_value_object (arg1)); | ||
func_object_p = ecma_get_object_from_value (arg1); | ||
ecma_value_t accumulator = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED); |
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.
As I see the accumulator
and num_p
variables are only used in the following else
block, could we move them there?
fc85657
to
0960607
Compare
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
0960607
to
3e58541
Compare
The patch is updated. |
AFAIK: looks good to me |
|
rebased & merged: 2a8c928 |
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com