8155108: CompilerControl: tests incorrectly set states for excluded methods

Remove redundant code that was not properly updated

Reviewed-by: kvn
This commit is contained in:
Nils Eliasson 2016-05-19 10:40:19 +02:00
parent 64001ce527
commit 1af289e8c3
3 changed files with 5 additions and 45 deletions

View file

@ -204,7 +204,7 @@ DirectiveSet::DirectiveSet(CompilerDirectives* d) :_inlinematchers(NULL), _direc
compilerdirectives_common_flags(init_defaults_definition)
compilerdirectives_c2_flags(init_defaults_definition)
compilerdirectives_c1_flags(init_defaults_definition)
memset(_modified, 0, sizeof _modified);
memset(_modified, 0, sizeof(_modified));
// Canonicalize DisableIntrinsic to contain only ',' as a separator.
this->DisableIntrinsicOption = canonicalize_disableintrinsic(DisableIntrinsic);

View file

@ -127,7 +127,7 @@ public:
number_of_flags
} flags;
bool _modified[number_of_flags];
bool _modified[number_of_flags]; // Records what options where set by a directive
#define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
compilerdirectives_common_flags(flag_store_definition)
@ -135,7 +135,7 @@ public:
compilerdirectives_c1_flags(flag_store_definition)
// Casting to get the same function signature for all setters. Used from parser.
#define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = 1; }
#define set_function_definition(name, type, dvalue, cc_flag) void set_##name(void* value) { type val = *(type*)value; name##Option = val; _modified[name##Index] = true; }
compilerdirectives_common_flags(set_function_definition)
compilerdirectives_c2_flags(set_function_definition)
compilerdirectives_c1_flags(set_function_definition)
@ -149,7 +149,7 @@ public:
void print(outputStream* st) {
print_inline(st);
st->print(" ");
#define print_function_definition(name, type, dvalue, cc_flag) print_##type(st, #name, this->name##Option, true);//(bool)_modified[name##Index]);
#define print_function_definition(name, type, dvalue, cc_flag) print_##type(st, #name, this->name##Option, true);
compilerdirectives_common_flags(print_function_definition)
compilerdirectives_c2_flags(print_function_definition)
compilerdirectives_c1_flags(print_function_definition)

View file

@ -151,8 +151,6 @@ const DirectivesParser::key DirectivesParser::keys[] = {
{ "c2", type_c2, 0, mask(type_directives), NULL, UnknownFlagType },
{ "match", type_match, 1, mask(type_directives), NULL, UnknownFlagType },
{ "inline", type_inline, 1, mask(type_directives) | mask(type_c1) | mask(type_c2), NULL, UnknownFlagType },
{ "enable", type_enable, 1, mask(type_directives) | mask(type_c1) | mask(type_c2), NULL, UnknownFlagType },
{ "preset", type_preset, 0, mask(type_c1) | mask(type_c2), NULL, UnknownFlagType },
// Global flags
#define common_flag_key(name, type, dvalue, compiler) \
@ -436,31 +434,6 @@ bool DirectivesParser::set_option(JSON_TYPE t, JSON_VAL* v) {
}
break;
case type_enable:
switch (enclosing_key->type) {
case type_c1:
case type_c2:
{
if (t != JSON_TRUE && t != JSON_FALSE) {
error(VALUE_ERROR, "Key of type %s enclosed in a %s key needs a true or false value", option_key->name, enclosing_key->name);
return false;
}
int val = (t == JSON_TRUE);
current_directiveset->set_Enable(&val);
break;
}
case type_directives:
error(VALUE_ERROR, "Enable keyword not available for generic directive");
return false;
default:
error(INTERNAL_ERROR, "Unexpected enclosing type for key %s: %s", option_key->name, enclosing_key->name);
ShouldNotReachHere();
return false;
}
break;
default:
break;
}
@ -730,19 +703,6 @@ void DirectivesParser::test() {
DirectivesParser::test(
"[{c1:{c1:{c1:{c1:{c1:{c1:{c1:{}}}}}}}}]", false);
DirectivesParser::test(
"[" "\n"
" {" "\n"
" c1: true," "\n"
" c2: true," "\n"
" match: true," "\n"
" inline: true," "\n"
" enable: true," "\n"
" c1: {" "\n"
" preset: true," "\n"
" }" "\n"
" }" "\n"
"]" "\n", false);
}
void DirectivesParser_test() {