WebAssembly Shared Memory - #4762
Merged
Merged
Conversation
Cellule
force-pushed
the
wasm/shared_memory
branch
2 times, most recently
from
March 7, 2018 23:46
f3218e8 to
57c2b26
Compare
Cellule
force-pushed
the
wasm/shared_memory
branch
from
March 8, 2018 21:37
57c2b26 to
06aa106
Compare
MikeHolman
reviewed
Mar 14, 2018
| return false; | ||
| } | ||
| #endif | ||
| return (uint32)(type - 1) < (WasmTypes::Limit - 1); |
Contributor
There was a problem hiding this comment.
can you do type > Void && type < Limit? I checked and compiler generates same code.
MikeHolman
reviewed
Mar 14, 2018
| newBuffer = m_buffer->GrowMemory(newBytes); | ||
| if (newBuffer == nullptr) | ||
| AssertOrFailFast(Wasm::Threads::IsEnabled()); | ||
| if (!((WebAssemblySharedArrayBuffer*)PointerValue(m_buffer))->GrowMemory(newBytes)) |
Contributor
There was a problem hiding this comment.
doing PointerValue strikes me as a bad practice, maybe we should be casting to Field(WebAssemblySharedArrayBuffer*)?
Contributor
MikeHolman
reviewed
Mar 15, 2018
| } | ||
|
|
||
|
|
||
| __checkReturn bool WebAssemblyMemory::AreLimitsValid(uint32 initial, uint32 maximum) |
Contributor
There was a problem hiding this comment.
nit: that's old sal, better to use _Must_inspect_result_
MikeHolman
reviewed
Mar 15, 2018
| @@ -98,6 +98,7 @@ namespace Js | |||
| class SourceTextModuleRecord; | |||
| class ArrayBufferBase; | |||
| class SharedContents; | |||
MikeHolman
reviewed
Mar 15, 2018
| } | ||
| } | ||
|
|
||
| void SharedArrayBuffer::FreeBuffer(BYTE* buffer, uint32 length, uint32 maxLength) |
Contributor
There was a problem hiding this comment.
nit: there deserve to be some comments explaining maxLength, since this is a wasm specific parameter, and makes no sense for JS where you can't grow SABs
Revert "Temporarily allow non-shared memory for atomic operator in wabt" Enable WasmThreads only if ESSharedArrayBuffer is enabled
Cellule
force-pushed
the
wasm/shared_memory
branch
from
March 16, 2018 01:27
6a13913 to
6aadf05
Compare
chakrabot
pushed a commit
that referenced
this pull request
Mar 20, 2018
Merge pull request #4762 from Cellule:wasm/shared_memory Implementation for WebAssembly shared memory. Currently WebAssemblySharedArrayBuffer depends directly on SharedArrayBuffer and thus are available only if SharedArrayBuffer are available. See [ChakraFull PR](https://devdiv.visualstudio.com/DevDiv/Chakra/_git/Chakra/pullrequest/108729?_a=overview) for chakra full changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation for WebAssembly shared memory.
Currently WebAssemblySharedArrayBuffer depends directly on SharedArrayBuffer and thus are available only if SharedArrayBuffer are available.
See ChakraFull PR for chakra full changes.
This change isâ