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

IR Event Handling #996

Closed
wants to merge 25 commits into from

Conversation

Projects
None yet
2 participants
@komax
Copy link
Member

commented Sep 9, 2013

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:

  • IRScopeListener listens to addInstr, when an (IR) Instruction is added to the IRScope
  • IRScopeListener keeps track of the IRBuilder#build method, so it adds a hook before building an (IR) Operand and a hook after building it
  • InstructionsListener abstracts over an List<Instr>, for instance a BasicBlock. It records all updates/adds/removals to the original list, to enable a fine granular diff mechanism

In addition:

  • fixed Imports for IRScope
  • add of IRScope.equals(Object) based on the scopeId field

If you need more information or I should update my PR, just ping me.

Maximilian Konzack added some commits Sep 2, 2013

Maximilian Konzack
Draft for a Listener Interface on IRScopes:
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
Maximilian Konzack
Listener on changes of a List<Instr> for instance inside of a basic b…
…lock:

1. models the operation of modification
2. callback function to specify what going to change
Maximilian Konzack
Completed implementing the list with orthogonal calls into primitive …
…calls (listIterator, retainAll) with eventing as side effect
@enebo

This comment has been minimized.

Copy link
Member

commented Sep 13, 2013

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...

@komax

This comment has been minimized.

Copy link
Member Author

commented Sep 14, 2013

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?

@ghost ghost assigned enebo Sep 14, 2013

@enebo

This comment has been minimized.

Copy link
Member

commented Sep 16, 2013

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.

@komax komax closed this Sep 16, 2013

@komax

This comment has been minimized.

Copy link
Member Author

commented Sep 16, 2013

Ok, I closed it, therefore :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.