src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases/src/org/graalvm/compiler/phases/PhaseSuite.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
193 if (phaseClass.isInstance(phase)) { |
193 if (phaseClass.isInstance(phase)) { |
194 it.set(newPhase); |
194 it.set(newPhase); |
195 return true; |
195 return true; |
196 } else if (phase instanceof PhaseSuite) { |
196 } else if (phase instanceof PhaseSuite) { |
197 PhaseSuite<C> innerSuite = (PhaseSuite<C>) phase; |
197 PhaseSuite<C> innerSuite = (PhaseSuite<C>) phase; |
198 if (innerSuite.removePhase(phaseClass)) { |
198 if (innerSuite.replacePhase(phaseClass, newPhase)) { |
199 if (innerSuite.phases.isEmpty()) { |
|
200 it.set(newPhase); |
|
201 } |
|
202 return true; |
199 return true; |
203 } |
200 } |
204 } |
201 } |
205 } |
202 } |
206 return false; |
203 return false; |