Skip to content
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

Read-only typed data arrays #32028

Closed
zanderso opened this issue Feb 1, 2018 · 1 comment
Closed

Read-only typed data arrays #32028

zanderso opened this issue Feb 1, 2018 · 1 comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-typed-data os-fuchsia type-enhancement A request for a change that isn't a bug

Comments

@zanderso
Copy link
Member

zanderso commented Feb 1, 2018

In Fuchsia in dart:zircon there will be a need to map read-only VMOs as external typed-data arrays. Attempting to perform a write to a typed-data array backed by a read-only VMO will cause a crash. Instead, we should add read-only typed data arrays to dart:typed_data, and use those to map read-only VMOs.

@zanderso zanderso added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-typed-data type-enhancement A request for a change that isn't a bug os-fuchsia labels Feb 1, 2018
@zanderso
Copy link
Member Author

This CL adds unmodifiable list views, but it would also be good to have first-class unmodifiable typed data lists that aren't views of another list. These would have to be baked into the VM, and probably also require some design work around initialization.

dart-bot pushed a commit that referenced this issue Feb 12, 2018
On Fuchsia, we need external typed data arrays that are backed by
read-only regions of memory. Today, writes to these typed data
lists crash the process. This change allows us to wrap the
external typed data in unmodifiable views so that an exception
is thrown instead of crashing.

related #32028

Change-Id: I94dc5e1771b73480cb0eb21799215c090000fd5f
Reviewed-on: https://dart-review.googlesource.com/40201
Reviewed-by: Lasse R.H. Nielsen <[email protected]>
Commit-Queue: Zach Anderson <[email protected]>
copybara-service bot pushed a commit that referenced this issue Aug 9, 2022
These types now work with Dart_TypedDataAcquireData.

The presence of these types no longer degrades the performance of typed data indexed loads.

The presence of these types degrades the performance of typed data indexed stores much less. The performance of indexed stores is somewhat regressed if these types were not used.

TEST=ci
Bug: #32028
Bug: #40924
Bug: #42785
Change-Id: I05ac5c9543f6f61ac37533b9efe511254778caed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253700
Reviewed-by: Aske Simon Christensen <[email protected]>
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
copybara-service bot pushed a commit that referenced this issue Aug 10, 2022
This reverts commit d1112d3.

Reason for revert: b/242043014

Original change's description:
> [vm] Recognize unmodifiabled typed data views.
>
> These types now work with Dart_TypedDataAcquireData.
>
> The presence of these types no longer degrades the performance of typed data indexed loads.
>
> The presence of these types degrades the performance of typed data indexed stores much less. The performance of indexed stores is somewhat regressed if these types were not used.
>
> TEST=ci
> Bug: #32028
> Bug: #40924
> Bug: #42785
> Change-Id: I05ac5c9543f6f61ac37533b9efe511254778caed
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253700
> Reviewed-by: Aske Simon Christensen <[email protected]>
> Reviewed-by: Martin Kustermann <[email protected]>
> Commit-Queue: Ryan Macnak <[email protected]>

[email protected],[email protected],[email protected]

TEST=ci
Change-Id: I32c1c460fc30c51bc0d42e7cfaafe72bf5630069
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #32028
Bug: #40924
Bug: #42785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254560
Reviewed-by: Siva Annamalai <[email protected]>
Reviewed-by: Ryan Macnak <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
copybara-service bot pushed a commit that referenced this issue Aug 11, 2022
These types now work with Dart_TypedDataAcquireData.

The presence of these types no longer degrades the performance of typed data indexed loads.

The presence of these types degrades the performance of typed data indexed stores much less. The performance of indexed stores is somewhat regressed if these types were not used.

TEST=ci
Bug: #32028
Bug: #40924
Bug: #42785
Change-Id: Iffad865708501acf96db418985cd5a69bd9afa55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/254501
Reviewed-by: Martin Kustermann <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-typed-data os-fuchsia type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants