Repository navigation
Support BigInt64Array/BigUint64Array - #43
Conversation
Add support for typed arrays of 64-bit integers (BigInt) now available in many browsers. Without this patch these typed arrays were given the "generic" dtype, which then attempted to use getters and setters rather than indexing, causing an error since typed arrays do not provide these. These changes are compatible with browsers that do not have these 64-bit typed arrays.
|
Pinging to see if there's anything I can do to move this towards merging, e.g., more tests. Thanks! |
|
This PR passes and looks pretty good to me, though I haven't followed the progress of bigint too closely. Does Seems similar modules like typedarray-pool and dtype might need similar updates. Pinging @mikolalysenko for a second opinion. |
|
While I personally like the consistency of My goal is to get this downstream to e: I now see |
|
Sounds good! The only question I have is about the official status of bigint. Is it officially in the spec such that it's appropriate to build on it? Is chrome the spec these days? And yes, sorry, I didn't mean those were dependencies, just that they were analogous modules in the same general ecosystem that should talk coherently about types. I've created a quick branch here for typedarray-pool: https://github.com/rreusser/typedarray-pool/tree/bigint-support |
|
BigInt status: The spec has been in stage 3 for 2 years. It's been fairly stable for some time, though, and has been in Chrome for years and unflagged for quite some time. Chrome follows the spec. Consequently it's also in V8/Node since 10.4 (last June). Firefox is strangely a straggler, but has been moving quickly recently, largely because the rust-wasm ecosystem (which is closely tied up with Firefox) uses It's also been in Opera for a year or so, making 3 people very happy I'm sure. |
|
And thanks for the |
|
Thanks for the details. PRified here: mikolalysenko/typedarray-pool#8 |
Add support for typed arrays of 64-bit integers (BigInt) now available
in many browsers. Without this patch these typed arrays were given the
"generic" dtype, which then attempted to use getters and setters rather
than indexing, causing an error since typed arrays do not provide these.
These changes are compatible with browsers that do not have these 64-bit
typed arrays.
Simple tests are included.