-
Notifications
You must be signed in to change notification settings - Fork 4
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
Massively simplify and equalise primitive commands #150
Open
MattWindsor91
wants to merge
13
commits into
master
Choose a base branch
from
mw-simplified-atomic-assigns
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
MattWindsor91
force-pushed
the
mw-simplified-atomic-assigns
branch
from
March 16, 2017 15:26
8d0f36b
to
e7a78f9
Compare
@septract I've rebased this onto master now, so it should be ok to look at. Less priority than the last PRQ though. (Also, I wonder if Travis will work today…) |
We now instead check the arguments directly to see if an assignment is local or not. This is in preparation for eliminating intrinsic and symbolic PrimCommands.
Microcode can now contain stored commands, which are removed during processing. PrimCommands are now just a specialisation of Microcode to use StoredCommand as the stored command type.
This is to make sure the local command restrictions are not thwarted when I generalise atomics.
This fixes #147 and does a bit more, getting rid of some now-unnecessary stored commands.
This rather large refactor means that the only difference between assignments etc. in <| atomic brackets |> and outside them is scoping: atomic bracket commands can use shared variables. This also, in principle, means that CAS and ++/-- are available for use outside of atomic brackets. This has not been rigorously tested yet.
As seen in issue #147.
MattWindsor91
force-pushed
the
mw-simplified-atomic-assigns
branch
from
April 19, 2017 09:33
e7a78f9
to
cd686b2
Compare
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.
NOTE: In typical me fashion, this is based on a previous pull request (#142), and shouldn't be merged (or really looked at in detail) until that one is up.
This is a fairly heavy PRQ (got a bit carried away with simplification, as usual) that does a lot of simplifying and expressivity-boosting changes to the primitive commands (assignment, postfix, assume, etc).
What does this do?
Microcode
andPrimCommand
s have been merged (sort of): Microcode can now contain stored commands (atomic function calls), and does so until the point where we used to expand out PrimCommands.PrimCommand
is now a type alias for a certain type ofMicrocode
. This makesMicrocode
the only internal representation of Starling's command language.BCAS
andICAS
is gone, and the modeller models postfixes, assumes, and id-transitions directly as microcode.{| foo() |} local++ {| bar() |}
are now possible.