| Summary: | Control Flow Graph - CQ 4295 (approved) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Matthew Fotzler <incongruous> | ||||
| Component: | Photran.Refactoring Engine | Assignee: | Jeffrey Overbey <com-eclipse-dot-org> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | com-eclipse-dot-org | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 7.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Matthew Fotzler
Created attachment 172898 [details]
control flow graph patch
Thanks. Can you please confirm that 1. you wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others, 2. you have the right to contribute the code to Eclipse, and 3. you have included the EPL license header in all source files? Yes, I confirm that I wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others, I have the right to contribute the code to Eclipse, and I have included the EPL license header in all source files. This is significantly more than 250 LOC, so I will need to file a CQ. Filed CQ 4295 - https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4295 It might be good to have a class comment for the CFG code for anyone trying to understand it later. "This implementation performs two passes over the AST. The first pass collects all labels, assigned labels, and loops mapped to the exit statement nodes contained in their body. This data is necessary for constructs which behave similarly to a GOTO. The second pass builds the Control Flow Graph." I noticed a small problem with the handling of if constructs: It works correctly when there is an else clause, but when there isn't an else clause, there should also be an edge from the if-then statement to the statement following the if construct. (This will be easy to fix after I fix the AST.) The CQ was approved subject to the following: "I note the contributor's name is not contained in the copyright and license header. I realize the author tag is contained further down in the code. However, ideally the Initial Author's name should be contained in the Contributor Section as follows: + * Contributors: + * Matthew Fotzler, UIUC - Initial API and implementation If you could make that change prior to checkin would be appreciated." Committed to CVS. Limitations noted in JavaDoc. |