-
Notifications
You must be signed in to change notification settings - Fork 684
Remove completion value. #888
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
Conversation
RPi2 performance measurements
|
f702614
to
444e3a2
Compare
bool __attr_pure___ __attr_always_inline___ | ||
ecma_is_value_error (ecma_value_t value) /**< ecma value */ | ||
{ | ||
return (value & (1 << ECMA_VALUE_ERROR_POS)) != 0; |
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 this should be return (value & (1ull << ECMA_VALUE_ERROR_POS)) != 0;
like in other places in our code.
6420631
to
bba2fee
Compare
Patch is updated and rebased to master. |
* Check if the value is false. | ||
* | ||
* Warning: | ||
* value must be boolean |
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.
Why this warning? If value
is not a boolean, does it cause any trouble (assertion, etc.)? I get from the code that the function will simply return false
, wont it?
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.
To tell the truth I just copied&pasted the description from above (see: ecma_is_value_true
). We can remove that warning message, it looks useless to me too.
Made my observations above. (Those idiomatically used empty string error messages smell bad. However, it might need all-over-the-code changes to remove them properly, e.g., with functions that don't even expect a string, if they are not used whatsoever.) The rest is OK, as far as I can tell. |
@akiss77, maintaining and improving the error messages would be great and we need to do that. Do you mind if I raise an issue for that and do it in a separate PR? |
@LaszloLango, the patch is good with me as it is. And we don't necessarily have to come up with fancy error messages if we don't want to. But then we should declare that and then we can remove the string argument of those |
lgtm |
I think we can improve error messages in a follow-up patch, this patch focuses on removing the completion value and already big enough. |
9e4b36a
to
786dc32
Compare
Remove ecma_completion_value_t, and add an extra bit to ecma_value_t to represent errors. From the long list of completion types only normal and error remained. JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected] JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
786dc32
to
b2426a7
Compare
Remove ecma_completion_value_t, and an extra bit to ecma_value_t to represent errors. From the long list of completion types only normal and error remained.