Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.jvmci.hotspot/src/com/oracle/jvmci/hotspot/HotSpotOptions.java @ 21789:5b9adb645217
fixed remnants of "graal" names in JVMCI code
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 08 Jun 2015 20:24:51 +0200 |
parents | 55058b8000ea |
children |
comparison
equal
deleted
inserted
replaced
21788:c1610658bba0 | 21789:5b9adb645217 |
---|---|
42 static void printFlags() { | 42 static void printFlags() { |
43 SortedMap<String, OptionDescriptor> options = new TreeMap<>(); | 43 SortedMap<String, OptionDescriptor> options = new TreeMap<>(); |
44 | 44 |
45 for (Options opts : ServiceLoader.load(Options.class, HotSpotOptions.class.getClassLoader())) { | 45 for (Options opts : ServiceLoader.load(Options.class, HotSpotOptions.class.getClassLoader())) { |
46 for (OptionDescriptor desc : opts) { | 46 for (OptionDescriptor desc : opts) { |
47 if (isHotSpotOption(desc)) { | 47 String name = desc.getName(); |
48 String name = desc.getName(); | 48 OptionDescriptor existing = options.put(name, desc); |
49 OptionDescriptor existing = options.put(name, desc); | 49 assert existing == null : "Option named \"" + name + "\" has multiple definitions: " + existing.getLocation() + " and " + desc.getLocation(); |
50 assert existing == null : "Option named \"" + name + "\" has multiple definitions: " + existing.getLocation() + " and " + desc.getLocation(); | |
51 } | |
52 } | 50 } |
53 } | 51 } |
54 | 52 |
55 OptionUtils.printFlags(options, JVMCI_OPTION_PREFIX); | 53 OptionUtils.printFlags(options, JVMCI_OPTION_PREFIX); |
56 } | 54 } |
57 | |
58 /** | |
59 * Determines if a given option is a HotSpot command line option. | |
60 */ | |
61 private static boolean isHotSpotOption(OptionDescriptor desc) { | |
62 return desc.getDeclaringClass().getName().startsWith("com.oracle.graal"); | |
63 } | |
64 } | 55 } |