Repository navigation
Fix a number of shared-everything-threads issues - #2828
Open
alexcrichton wants to merge 2 commits into
Open
alexcrichton wants to merge 2 commits into
alexcrichton wants to merge 2 commits into
Conversation
This commit fixes a number of implementation issues with the shared-everything-threads proposal and syncs it with the current upstream specification which has changed a bit since this was all originally implemented. The changes here are: * Component model `thread.spawn-ref` and related builtins have an immediate indicating whether they create a `shared` function or not. * The encoding of RMW instructions now uses the same encoding scheme as the acquire-release-atomics proposal. * The opcode of `ref.i31_shared` was adjusted. * With custom descriptors enabled the `shared` bit for descriptors must match the type being described. * Shared functions now require all operands on the operand stack to be shared. * Shared functions now require all locals to be shared. * Shared functions now require referenced memories to be shared. * Shared functions now require referenced tables to be shared. * Shared functions now require referenced functions to be shared. * The "expected" type for cmpxchg instructions is now correctly typed as an `eqref` or shared version, not the type of the item in question. * Polymorphic instructions like `call_ref` now accept both shared and unshared references.
This branch has not been deployed
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.
This commit fixes a number of implementation issues with the shared-everything-threads proposal and syncs it with the current upstream specification which has changed a bit since this was all originally implemented. The changes here are:
thread.spawn-refand related builtins have an immediate indicating whether they create asharedfunction or not.ref.i31_sharedwas adjusted.sharedbit for descriptors must match the type being described.eqrefor shared version, not the type of the item in question.call_refnow accept both shared and unshared references.