796
797 if (!validator.is_valid()) {
798 jio_snprintf(errorbuf, buf_size, "Unrecognized intrinsic detected in %s: %s", option2name(option), validator.what());
799 }
800 }
801 #if !defined(PRODUCT) && defined(COMPILER2)
802 else if (option == CompileCommandEnum::TraceAutoVectorization) {
803 TraceAutoVectorizationTagValidator validator(value, true);
804
805 if (!validator.is_valid()) {
806 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
807 }
808 } else if (option == CompileCommandEnum::PrintIdealPhase) {
809 PhaseNameValidator validator(value);
810
811 if (!validator.is_valid()) {
812 jio_snprintf(errorbuf, buf_size, "Unrecognized phase name in %s: %s", option2name(option), validator.what());
813 }
814 } else if (option == CompileCommandEnum::TestOptionList) {
815 // all values are ok
816 }
817 #endif
818 else {
819 assert(false, "Ccstrlist type option missing validator");
820 }
821
822 register_command(matcher, option, (ccstr) value);
823 return;
824 } else {
825 jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str);
826 }
827 } else if (type == OptionType::Bool) {
828 char value[256];
829 if (*line == '\0') {
830 // Short version of a CompileCommand sets a boolean Option to true
831 // -XXCompileCommand=<Option>,<method pattern>
832 register_command(matcher, option, true);
833 return;
834 }
835 if (sscanf(line, "%255[a-zA-Z]%n", value, &bytes_read) == 1) {
|
796
797 if (!validator.is_valid()) {
798 jio_snprintf(errorbuf, buf_size, "Unrecognized intrinsic detected in %s: %s", option2name(option), validator.what());
799 }
800 }
801 #if !defined(PRODUCT) && defined(COMPILER2)
802 else if (option == CompileCommandEnum::TraceAutoVectorization) {
803 TraceAutoVectorizationTagValidator validator(value, true);
804
805 if (!validator.is_valid()) {
806 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
807 }
808 } else if (option == CompileCommandEnum::PrintIdealPhase) {
809 PhaseNameValidator validator(value);
810
811 if (!validator.is_valid()) {
812 jio_snprintf(errorbuf, buf_size, "Unrecognized phase name in %s: %s", option2name(option), validator.what());
813 }
814 } else if (option == CompileCommandEnum::TestOptionList) {
815 // all values are ok
816 } else if (option == CompileCommandEnum::TooManyTrapsAtBCI) {
817 // FIXME
818 }
819 #endif
820 else {
821 assert(false, "Ccstrlist type option missing validator");
822 }
823
824 register_command(matcher, option, (ccstr) value);
825 return;
826 } else {
827 jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str);
828 }
829 } else if (type == OptionType::Bool) {
830 char value[256];
831 if (*line == '\0') {
832 // Short version of a CompileCommand sets a boolean Option to true
833 // -XXCompileCommand=<Option>,<method pattern>
834 register_command(matcher, option, true);
835 return;
836 }
837 if (sscanf(line, "%255[a-zA-Z]%n", value, &bytes_read) == 1) {
|