Conversation
1. add of instr to the scope 2. begin and end (with its Operand result) of IRBuilder.build() 1. enables traceability from scope to its instructions and 2. the mapping of an IRScope to its (AST)Node
…lock: 1. models the operation of modification 2. callback function to specify what going to change
…calls (listIterator, retainAll) with eventing as side effect
Member
|
I am not going to automerge this but I will cherry-pick and manually merge these. I would have preferred a PR which had rebased against master rather than did a series of merges. I am seeing lots of other diff output here and it always makes me nervous... |
Member
Author
|
Ah, sorry for these inconveniences. I did not know I should have to rebase it. Thank you for manually merging it! Should I close therefore this PR? |
Member
|
In truth, merging with what you had would have been ok but I saw a warning since this was not merged recently so I decided to manually do it to better review the PR since it was somewhat big. It was pretty simple to do manually. |
Member
Author
|
Ok, I closed it, therefore :-) |
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.
As discussed with @enebo and @subbuss, I designed and implemented a simple mechanism, to listen to events on IR, CFG, ... changes/updates. To put it more in detail:
IRScopeListenerlistens to addInstr, when an (IR) Instruction is added to the IRScopeIRScopeListenerkeeps track of theIRBuilder#buildmethod, so it adds a hook before building an (IR) Operand and a hook after building itInstructionsListenerabstracts over anList<Instr>, for instance aBasicBlock. It records all updates/adds/removals to the original list, to enable a fine granular diff mechanismIn addition:
IRScopeIRScope.equals(Object)based on thescopeIdfieldIf you need more information or I should update my PR, just ping me.