Mercurial > hg > graal-jvmci-8
comparison src/share/vm/jvmci/jvmciRuntime.cpp @ 22530:cbab86a6c7f6
make processing of <jre>/lib/jvmci/*.properties file like other Java *.properties files in that the last definition of any propery "wins"
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 07 Sep 2015 22:23:35 +0200 |
parents | 23db6926b163 |
children | ea6d1727fdc6 |
comparison
equal
deleted
inserted
replaced
22529:8d95daa4324b | 22530:cbab86a6c7f6 |
---|---|
839 * The line must match the regular expression "[^=]+=.*". That is one or more | 839 * The line must match the regular expression "[^=]+=.*". That is one or more |
840 * characters other than '=' followed by '=' followed by zero or more characters. | 840 * characters other than '=' followed by '=' followed by zero or more characters. |
841 * Everything before the '=' is the property name and everything after '=' is the value. | 841 * Everything before the '=' is the property name and everything after '=' is the value. |
842 * Lines that start with '#' are treated as comments and ignored. | 842 * Lines that start with '#' are treated as comments and ignored. |
843 * No special processing of whitespace or any escape characters is performed. | 843 * No special processing of whitespace or any escape characters is performed. |
844 * Also, no check is made whether an existing property is overridden. | 844 * The last definition of a property "wins" (i.e., it overrides all earlier |
845 * definitions of the property). | |
845 */ | 846 */ |
846 class JVMCIPropertiesFileClosure : public ParseClosure { | 847 class JVMCIPropertiesFileClosure : public ParseClosure { |
847 SystemProperty** _plist; | 848 SystemProperty** _plist; |
848 public: | 849 public: |
849 JVMCIPropertiesFileClosure(SystemProperty** plist) : _plist(plist) {} | 850 JVMCIPropertiesFileClosure(SystemProperty** plist) : _plist(plist) {} |
863 return; | 864 return; |
864 } | 865 } |
865 *sep = '\0'; | 866 *sep = '\0'; |
866 const char* name = line; | 867 const char* name = line; |
867 char* value = sep + 1; | 868 char* value = sep + 1; |
868 Arguments::PropertyList_add(_plist, name, value); | 869 Arguments::PropertyList_unique_add(_plist, name, value); |
869 } | 870 } |
870 }; | 871 }; |
871 | 872 |
872 void JVMCIRuntime::parse_properties(SystemProperty** plist) { | 873 void JVMCIRuntime::parse_properties(SystemProperty** plist) { |
873 char jvmciDir[JVM_MAXPATHLEN]; | 874 char jvmciDir[JVM_MAXPATHLEN]; |