Skip to content

IR Event Handling#996

Closed
komax wants to merge 25 commits intojruby:masterfrom
komax:komax_ir_eventing
Closed

IR Event Handling#996
komax wants to merge 25 commits intojruby:masterfrom
komax:komax_ir_eventing

Conversation

@komax
Copy link
Member

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

komax added 25 commits September 2, 2013 15:23
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
@enebo
Copy link
Member

enebo 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
Copy link
Member Author

komax 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
Copy link
Member

enebo 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
Copy link
Member Author

komax 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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants