Mercurial > hg > graal-compiler
diff graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhaseSuite.java @ 10029:839791e70ff1
Method for adding a new phase at the beginning of a suite.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Thu, 13 Jun 2013 13:19:56 +0200 |
parents | f5c6a9b0262f |
children | 0ffb6ed18ea4 |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhaseSuite.java Wed Jun 12 17:09:18 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/PhaseSuite.java Thu Jun 13 13:19:56 2013 +0200 @@ -34,7 +34,17 @@ this.phases = new ArrayList<>(); } - public final void addPhase(BasePhase<? super C> phase) { + /** + * Add a new phase at the beginning of this suite. + */ + public final void prependPhase(BasePhase<? super C> phase) { + phases.add(0, phase); + } + + /** + * Add a new phase at the end of this suite. + */ + public final void appendPhase(BasePhase<? super C> phase) { phases.add(phase); }