comparison graal/com.oracle.graal.phases/src/com/oracle/graal/phases/tiers/Suites.java @ 21543:93c50cefb9e8

moved GraalInternalError to com.oracle.jvmci.common and renamed it to JVMCIError (JBS:GRAAL-53)
author Doug Simon <doug.simon@oracle.com>
date Mon, 25 May 2015 23:30:34 +0200
parents c1e2fdb5fea3
children b1530a6cce8c
comparison
equal deleted inserted replaced
21542:543957c1c6a6 21543:93c50cefb9e8
24 24
25 import static com.oracle.graal.phases.tiers.Suites.Options.*; 25 import static com.oracle.graal.phases.tiers.Suites.Options.*;
26 26
27 import java.util.*; 27 import java.util.*;
28 28
29 import com.oracle.graal.compiler.common.*;
30 import com.oracle.graal.lir.phases.*; 29 import com.oracle.graal.lir.phases.*;
31 import com.oracle.graal.options.*; 30 import com.oracle.graal.options.*;
32 import com.oracle.graal.phases.*; 31 import com.oracle.graal.phases.*;
32 import com.oracle.jvmci.common.*;
33 import com.oracle.jvmci.runtime.*; 33 import com.oracle.jvmci.runtime.*;
34 34
35 public final class Suites { 35 public final class Suites {
36 36
37 static class Options { 37 static class Options {
96 * There is either no extended configuration available, or more than one. In that case, 96 * There is either no extended configuration available, or more than one. In that case,
97 * default to "basic". 97 * default to "basic".
98 */ 98 */
99 defaultConfiguration = basic; 99 defaultConfiguration = basic;
100 if (defaultConfiguration == null) { 100 if (defaultConfiguration == null) {
101 throw new GraalInternalError("unable to find basic compiler configuration"); 101 throw new JVMCIError("unable to find basic compiler configuration");
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 public Suites(PhaseSuite<HighTierContext> highTier, PhaseSuite<MidTierContext> midTier, PhaseSuite<LowTierContext> lowTier) { 106 public Suites(PhaseSuite<HighTierContext> highTier, PhaseSuite<MidTierContext> midTier, PhaseSuite<LowTierContext> lowTier) {
125 } 125 }
126 126
127 public static Suites createSuites(String name) { 127 public static Suites createSuites(String name) {
128 CompilerConfiguration config = configurations.get(name); 128 CompilerConfiguration config = configurations.get(name);
129 if (config == null) { 129 if (config == null) {
130 throw new GraalInternalError("unknown compiler configuration: " + name); 130 throw new JVMCIError("unknown compiler configuration: " + name);
131 } 131 }
132 return new Suites(config); 132 return new Suites(config);
133 } 133 }
134 134
135 public static LIRSuites createDefaultLIRSuites() { 135 public static LIRSuites createDefaultLIRSuites() {
143 } 143 }
144 144
145 public static LIRSuites createLIRSuites(String name) { 145 public static LIRSuites createLIRSuites(String name) {
146 CompilerConfiguration config = configurations.get(name); 146 CompilerConfiguration config = configurations.get(name);
147 if (config == null) { 147 if (config == null) {
148 throw new GraalInternalError("unknown compiler configuration: " + name); 148 throw new JVMCIError("unknown compiler configuration: " + name);
149 } 149 }
150 return new LIRSuites(config.createPreAllocationOptimizationStage(), config.createAllocationStage(), config.createPostAllocationOptimizationStage()); 150 return new LIRSuites(config.createPreAllocationOptimizationStage(), config.createAllocationStage(), config.createPostAllocationOptimizationStage());
151 } 151 }
152 152
153 } 153 }