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