Mercurial > hg > graal-compiler
changeset 23290:fd7e09778f42
changed system property prefix for @Option based Graal options to "graal."
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 11 Jan 2016 22:50:34 +0100 |
parents | 468184cf7b34 |
children | 6d1914226c63 |
files | graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompilerFactory.java mx.graal/mx_graal_8.py mx.graal/mx_graal_9.py |
diffstat | 3 files changed, 13 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompilerFactory.java Mon Jan 11 22:49:56 2016 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompilerFactory.java Mon Jan 11 22:50:34 2016 +0100 @@ -57,11 +57,16 @@ private static final String GRAAL_OPTIONS_FILE_PROPERTY_NAME = "graal.options.file"; /** + * The name of the system property specifying the Graal version. + */ + private static final String GRAAL_VERSION_PROPERTY_NAME = "graal.version"; + + /** * The prefix for system properties that correspond to {@link Option} annotated fields. A field * named {@code MyOption} will have its value set from a system property with the name * {@code GRAAL_OPTION_PROPERTY_PREFIX + "MyOption"}. */ - public static final String GRAAL_OPTION_PROPERTY_PREFIX = "graal.option."; + public static final String GRAAL_OPTION_PROPERTY_PREFIX = "graal."; /** * Gets the system property assignment that would set the current value for a given option. @@ -141,7 +146,7 @@ for (Map.Entry<Object, Object> e : savedProps.entrySet()) { String name = (String) e.getKey(); if (name.startsWith(GRAAL_OPTION_PROPERTY_PREFIX)) { - if (name.equals(GRAAL_OPTIONS_FILE_PROPERTY_NAME) || name.equals(PROFILE_OPTIONVALUE_PROPERTY_NAME)) { + if (name.equals(GRAAL_OPTIONS_FILE_PROPERTY_NAME) || name.equals(GRAAL_VERSION_PROPERTY_NAME) || name.equals(PROFILE_OPTIONVALUE_PROPERTY_NAME)) { // Ignore well known properties that do not denote an option } else { String value = (String) e.getValue();
--- a/mx.graal/mx_graal_8.py Mon Jan 11 22:49:56 2016 +0100 +++ b/mx.graal/mx_graal_8.py Mon Jan 11 22:50:34 2016 +0100 @@ -389,15 +389,15 @@ if arg.startswith('-G:+'): if '=' in arg: mx.abort('Mixing + and = in -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:+'):] + '=true' + arg = '-Dgraal.' + arg[len('-G:+'):] + '=true' elif arg.startswith('-G:-'): if '=' in arg: mx.abort('Mixing - and = in -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:+'):] + '=false' + arg = '-Dgraal.' + arg[len('-G:+'):] + '=false' elif arg.startswith('-G:'): if '=' not in arg: mx.abort('Missing "=" in non-boolean -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:'):] + arg = '-Dgraal.' + arg[len('-G:'):] return arg def run_vm(*positionalargs, **kwargs):
--- a/mx.graal/mx_graal_9.py Mon Jan 11 22:49:56 2016 +0100 +++ b/mx.graal/mx_graal_9.py Mon Jan 11 22:50:34 2016 +0100 @@ -315,15 +315,15 @@ if arg.startswith('-G:+'): if '=' in arg: mx.abort('Mixing + and = in -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:+'):] + '=true' + arg = '-Dgraal.' + arg[len('-G:+'):] + '=true' elif arg.startswith('-G:-'): if '=' in arg: mx.abort('Mixing - and = in -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:+'):] + '=false' + arg = '-Dgraal.' + arg[len('-G:+'):] + '=false' elif arg.startswith('-G:'): if '=' not in arg: mx.abort('Missing "=" in non-boolean -G: option specification: ' + arg) - arg = '-Dgraal.option.' + arg[len('-G:'):] + arg = '-Dgraal.' + arg[len('-G:'):] return arg args = map(translateGOption, args)