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

Improved WasmPtr, added WasmCell #2442

Merged
merged 17 commits into from
Jul 2, 2021
Merged

Improved WasmPtr, added WasmCell #2442

merged 17 commits into from
Jul 2, 2021

Conversation

syrusakbary
Copy link
Member

@syrusakbary syrusakbary commented Jun 24, 2021

Description

This PR improves a bit our WasmPtr API by making it a bit more safer and reliable.

Breaking changes

  • WasmPtr.deref will now return WasmCell<'a, T> instead of &'a Cell<T>
  • WasmPtr.deref_mut is no needed any longer

Copy link
Contributor

@MarkMcCaskey MarkMcCaskey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is workable if we're good with the breakage in API and the performance decrease for the array method. I think this is a reasonable path forward: we can always add more APIs later for better performance.

lib/api/src/cell.rs Outdated Show resolved Hide resolved
lib/api/src/ptr.rs Outdated Show resolved Hide resolved
@syrusakbary
Copy link
Member Author

bors r+

bors bot added a commit that referenced this pull request Jun 24, 2021
2442: Improved WasmPtr, added WasmCell r=syrusakbary a=syrusakbary


# Description

This PR improves a bit our WasmPtr API by making it a bit more safer and reliable.

## Breaking changes
* `WasmPtr`.`deref` will now return `WasmCell<'a, T>` instead of `&'a Cell<T>`
* `WasmPtr`.`deref_mut` is no needed any longer

Co-authored-by: Syrus Akbary <[email protected]>
lib/api/src/ptr.rs Outdated Show resolved Hide resolved
lib/api/src/ptr.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
@MarkMcCaskey
Copy link
Contributor

bors r-

@bors
Copy link
Contributor

bors bot commented Jun 24, 2021

Canceled.

Copy link
Contributor

@MarkMcCaskey MarkMcCaskey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to fix the major bugs first

lib/api/src/ptr.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
lib/wasi/src/syscalls/mod.rs Outdated Show resolved Hide resolved
@syrusakbary
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 2, 2021
@bors
Copy link
Contributor

bors bot commented Jul 2, 2021

try

Build failed:

@syrusakbary
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 2, 2021
@bors
Copy link
Contributor

bors bot commented Jul 2, 2021

try

Build failed:

lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
lib/types/src/memory_view.rs Outdated Show resolved Hide resolved
@syrusakbary
Copy link
Member Author

bors try

bors bot added a commit that referenced this pull request Jul 2, 2021
@bors
Copy link
Contributor

bors bot commented Jul 2, 2021

@syrusakbary
Copy link
Member Author

I assume everything is good to go now, given that all feedback is addressed and it was previously approved. Merging manually :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants