-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
[Merged by Bors] - Implement JsArrayBuffer
#2170
Conversation
- Added example `jsarraybuffer.rs`
208751a
to
0f88f7b
Compare
Test262 conformance changesVM implementation
|
Codecov Report
@@ Coverage Diff @@
## main #2170 +/- ##
==========================================
- Coverage 42.28% 42.19% -0.10%
==========================================
Files 228 229 +1
Lines 21167 21206 +39
==========================================
- Hits 8951 8948 -3
- Misses 12216 12258 +42
Continue to review full report at Codecov.
|
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.
Looks really good! Thanks!!
bors r+ |
This PR adds the `ArrayBuffer` rust wrapper. It also provides a capability to construct a `JsArrayBuffer` from a user defined blob of data ( `Vec<u8>` ) and it is not cloned, it is directly used as the internal buffer. This allows us to replace the inifficent `Vec<u8>` to `JsArray` then to `TypedArray` (in typed arrays `from_iter`), with a `JsArrayBuffer` created from user data to `TypedArray`. With this `Vec<u8>` to `JsTypedArray` should be fully fixed as discussed in #2058.
Pull request successfully merged into main. Build succeeded: |
JsArrayBuffer
JsArrayBuffer
This PR adds the
ArrayBuffer
rust wrapper. It also provides a capability to construct aJsArrayBuffer
from a user defined blob of data (Vec<u8>
) and it is not cloned, it is directly used as the internal buffer.This allows us to replace the inifficent
Vec<u8>
toJsArray
then toTypedArray
(in typed arraysfrom_iter
), with aJsArrayBuffer
created from user data toTypedArray
. With thisVec<u8>
toJsTypedArray
should be fully fixed as discussed in #2058.