-
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
Use 'ecma_value_t' in Jerry API #1138
Use 'ecma_value_t' in Jerry API #1138
Conversation
|
||
/** | ||
* Converters of 'jerry_value_t' | ||
*/ | ||
jerry_string_t *jerry_value_to_string (const jerry_value_t *); | ||
jerry_value_t jerry_value_to_string (const jerry_value_t 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.
"value" is not needed.
I think the general direction is very good. However, I feel people will not understand how the exception handling works in Jerry. Namely a value has an exception bit, and a value with an exception bit set cannot be passed to any function as input argument. I am open to other ideas, but I see two directions at this moment:
|
c2104ff
to
205f264
Compare
@zherczeg, I prefer the second, but maybe the first one would be better for newcomers. |
The second is obviously simpler and faster, but it might be confusing. What do others think? |
205f264
to
5c0babf
Compare
In my opinion going with the simpler solution is always the best choice, and would also behave similarly to how the engine currently works. The first approach would be the complete opposite, which, the way I see it, could create more confusion than the second one. |
@zherczeg, I raised an issue for this problem. I think we can do it in a follow up patch, because this PR is big enough and barely related to the problem. |
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
5c0babf
to
a816ab8
Compare
Ok, LGTM |
LGTM |
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]