-
Notifications
You must be signed in to change notification settings - Fork 677
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
Implement String.prototype.substring() #244
Implement String.prototype.substring() #244
Conversation
arg2, | ||
ret_value); | ||
|
||
if (ecma_is_completion_value_empty (ret_value)) |
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.
at this point the ret_value
is empty, no need for the check
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs [email protected]
f965609
to
69a2739
Compare
Right, the patch is updated, thanks. |
arg2, | ||
ret_value); | ||
|
||
if (ecma_number_is_nan (end_num) || ecma_number_is_negative (end_num)) |
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.
This if-else block seems identical with the one above, could we have maybe a helper method for it? Another thing: there is the ecma_builtin_helper_array_index_normalize
function which does something like this, could you check if that could be used?
/* 1 */ | ||
ECMA_TRY_CATCH (check_coercible_val, | ||
ecma_op_check_object_coercible (this_arg), | ||
ret_value); |
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.
Is this implicitly changes the this value?
69a2739
to
5a32c27
Compare
Continued in PR #318 |
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs [email protected]