Add typed array utility functions#760
Conversation
chqrlie
left a comment
There was a problem hiding this comment.
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. |
saghul
left a comment
There was a problem hiding this comment.
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_NewTypedArrayfrom upstream.Fixes #758