Mercurial > hg > graal-jvmci-8
changeset 22614:0851eafff5c9
Minor -G option parsing fixes
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 24 Sep 2015 20:51:57 -0700 |
parents | 9409f7cec59a |
children | e96c6a52aff2 |
files | mx.jvmci/mx_jvmci.py src/share/vm/jvmci/jvmciRuntime.cpp |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mx.jvmci/mx_jvmci.py Thu Sep 24 14:33:14 2015 +0200 +++ b/mx.jvmci/mx_jvmci.py Thu Sep 24 20:51:57 2015 -0700 @@ -1760,8 +1760,12 @@ # Support for -G: options def translateGOption(arg): if arg.startswith('-G:+'): + if '=' in arg: + mx.abort('Mixing + and = in -G: option specification: ' + arg) arg = '-Djvmci.option.' + arg[len('-G:+'):] + '=true' elif arg.startswith('-G:-'): + if '=' in arg: + mx.abort('Mixing - and = in -G: option specification: ' + arg) arg = '-Djvmci.option.' + arg[len('-G:+'):] + '=false' elif arg.startswith('-G:'): arg = '-Djvmci.option.' + arg[len('-G:'):]
--- a/src/share/vm/jvmci/jvmciRuntime.cpp Thu Sep 24 14:33:14 2015 +0200 +++ b/src/share/vm/jvmci/jvmciRuntime.cpp Thu Sep 24 20:51:57 2015 -0700 @@ -698,7 +698,8 @@ for (int i = 0; i < _options_count; i++) { SystemProperty* prop = _options[i]; oop name = java_lang_String::create_oop_from_str(prop->key() + OPTION_PREFIX_LEN, CHECK); - oop value = java_lang_String::create_oop_from_str(prop->value(), CHECK); + const char* prop_value = prop->value() != NULL ? prop->value() : ""; + oop value = java_lang_String::create_oop_from_str(prop_value, CHECK); options->obj_at_put(i * 2, name); options->obj_at_put((i * 2) + 1, value); } @@ -948,10 +949,6 @@ SystemProperty* first = NULL; for (SystemProperty* p = props; p != NULL; p = p->next()) { if (strncmp(p->key(), OPTION_PREFIX, OPTION_PREFIX_LEN) == 0) { - if (p->value() == NULL || strlen(p->value()) == 0) { - jio_fprintf(defaultStream::output_stream(), "JVMCI option %s must have non-zero length value\n", p->key()); - return JNI_ERR; - } if (first == NULL) { first = p; }