RESOLVED FIXED Bug 190800
[JSC] Implement BigInt64Array and BigUint64Array
https://bugs.webkit.org/show_bug.cgi?id=190800
Summary [JSC] Implement BigInt64Array and BigUint64Array
Caio Lima
Reported 2018-10-22 11:52:08 PDT
...
Attachments
Patch (136.00 KB, patch)
2021-01-30 00:35 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (136.18 KB, patch)
2021-01-30 00:44 PST, Yusuke Suzuki
ews-feeder: commit-queue-
Patch (138.70 KB, patch)
2021-01-30 01:01 PST, Yusuke Suzuki
no flags
Patch (142.71 KB, patch)
2021-01-30 01:47 PST, Yusuke Suzuki
no flags
Patch (145.23 KB, patch)
2021-01-30 02:29 PST, Yusuke Suzuki
no flags
Patch (165.35 KB, patch)
2021-01-31 00:35 PST, Yusuke Suzuki
ross.kirsling: review+
Yusuke Suzuki
Comment 1 2020-05-05 03:46:26 PDT
Because we need to view contiguous int64_t* / uint64_t* memory region via this view, the storage should be just byte sequence. And [] access should wrap the result with JSBigInt when it is accessed from JS world.
lars.sonchocky-helldorf
Comment 2 2020-05-15 13:56:53 PDT
This would be nice to have for that: https://github.com/takahirox/riscv-rust/issues/115
Hao Li
Comment 3 2020-06-17 22:47:59 PDT
We also have the requirement for BigUint64Array in WebGPU: https://github.com/gpuweb/gpuweb/issues/866
johann.hemmann
Comment 4 2020-06-19 06:57:25 PDT
Generally it would be helpful for all projects using wasm_bindgen (https://github.com/rustwasm/wasm-bindgen), so also for the jsapi of the rav1e (https://github.com/xiph/rav1e/tree/master/rav1e_js).
Slim Lim
Comment 5 2020-12-03 23:40:38 PST
Echoing the previous comment, lack of BigUint64Array support means that applications using wasm-bindgen cannot run at all in Safari. This is especially problematic for targeting the iPad.
Yusuke Suzuki
Comment 6 2021-01-30 00:35:08 PST
Yusuke Suzuki
Comment 7 2021-01-30 00:44:23 PST
Yusuke Suzuki
Comment 8 2021-01-30 01:01:36 PST
Yusuke Suzuki
Comment 9 2021-01-30 01:47:10 PST
Yusuke Suzuki
Comment 10 2021-01-30 02:29:08 PST
Yusuke Suzuki
Comment 11 2021-01-31 00:35:41 PST
Ross Kirsling
Comment 12 2021-02-01 11:22:35 PST
Comment on attachment 418821 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418821&action=review r=me, this is awesome! > Source/JavaScriptCore/runtime/AtomicsObject.h:65 > +JSArrayBufferView* validateTypedArray(JSGlobalObject*, JSValue); This seems kind of weird? AtomicsObject.cpp needs to include JSArrayBufferView.h anyway, doesn't it? > Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h:98 > + using Adaptor = PassedAdaptor; What's the purpose of this alias? > Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h:462 > + if constexpr (Adaptor::canConvertToJSQuickly) Cool! > JSTests/test262/expectations.yaml:831 > +test/built-ins/TypedArray/prototype/filter/BigInt/callbackfn-detachbuffer.js: > + default: 'TypeError: Invalid argument type in ToBigInt operation (Testing with BigInt64Array.)' > + strict mode: 'TypeError: Invalid argument type in ToBigInt operation (Testing with BigInt64Array.)' > +test/built-ins/TypedArray/prototype/findIndex/BigInt/predicate-may-detach-buffer.js: > + default: 'Test262Error: throws a TypeError getting a value from the detached buffer Expected a TypeError to be thrown but no exception was thrown at all (Testing with BigInt64Array.)' > + strict mode: 'Test262Error: throws a TypeError getting a value from the detached buffer Expected a TypeError to be thrown but no exception was thrown at all (Testing with BigInt64Array.)' Do you want to submit the patch for these or would you prefer that I do it?
Yusuke Suzuki
Comment 13 2021-02-01 12:44:29 PST
Comment on attachment 418821 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418821&action=review >> Source/JavaScriptCore/runtime/AtomicsObject.h:65 >> +JSArrayBufferView* validateTypedArray(JSGlobalObject*, JSValue); > > This seems kind of weird? AtomicsObject.cpp needs to include JSArrayBufferView.h anyway, doesn't it? Right! I'll remove it. >> Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h:98 >> + using Adaptor = PassedAdaptor; > > What's the purpose of this alias? Because we would like to access ViewClass::Adaptor. >> JSTests/test262/expectations.yaml:831 >> + strict mode: 'Test262Error: throws a TypeError getting a value from the detached buffer Expected a TypeError to be thrown but no exception was thrown at all (Testing with BigInt64Array.)' > > Do you want to submit the patch for these or would you prefer that I do it? I'll quickly do that after landing this patch :)
Yusuke Suzuki
Comment 14 2021-02-01 12:56:58 PST
Radar WebKit Bug Importer
Comment 15 2021-02-01 12:57:20 PST
Note You need to log in before you can comment on or make changes to this bug.