-
Notifications
You must be signed in to change notification settings - Fork 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
Add typed array utility functions #760
Add typed array utility functions #760
Conversation
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 really don't like this approach: instead of 12 more APIs, I suggest a generic extensible method.
IsTupedArray with the enum? That works too. |
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.
One minor nit, LGTM otherwise!
@chqrlie Any further comments? |
Aside from the remark about the obscure code in If we keep this logical ordering, I will have to break backward compatibility when backporting the float16 support. I cannot measure if this may be a problem or not, @saghul and @bnoordhuis what is your experience? |
I'd say that's ok but I wouldn't mind moving it around either. |
@bnoordhuis what is your take on this? |
I'd say it's fine to keep it the way it is. We're not promising AP/ABI stability just yet. |
Expose a few utility functions to check and create typed arrays. Also add
JS_NewTypedArray
from upstream.Fixes #758