mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
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:
parent
64001ce527
commit
1af289e8c3
3 changed files with 5 additions and 45 deletions
|
@ -204,7 +204,7 @@ DirectiveSet::DirectiveSet(CompilerDirectives* d) :_inlinematchers(NULL), _direc
|
||||||
compilerdirectives_common_flags(init_defaults_definition)
|
compilerdirectives_common_flags(init_defaults_definition)
|
||||||
compilerdirectives_c2_flags(init_defaults_definition)
|
compilerdirectives_c2_flags(init_defaults_definition)
|
||||||
compilerdirectives_c1_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.
|
// Canonicalize DisableIntrinsic to contain only ',' as a separator.
|
||||||
this->DisableIntrinsicOption = canonicalize_disableintrinsic(DisableIntrinsic);
|
this->DisableIntrinsicOption = canonicalize_disableintrinsic(DisableIntrinsic);
|
||||||
|
|
|
@ -127,7 +127,7 @@ public:
|
||||||
number_of_flags
|
number_of_flags
|
||||||
} 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;
|
#define flag_store_definition(name, type, dvalue, cc_flag) type name##Option;
|
||||||
compilerdirectives_common_flags(flag_store_definition)
|
compilerdirectives_common_flags(flag_store_definition)
|
||||||
|
@ -135,7 +135,7 @@ public:
|
||||||
compilerdirectives_c1_flags(flag_store_definition)
|
compilerdirectives_c1_flags(flag_store_definition)
|
||||||
|
|
||||||
// Casting to get the same function signature for all setters. Used from parser.
|
// 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_common_flags(set_function_definition)
|
||||||
compilerdirectives_c2_flags(set_function_definition)
|
compilerdirectives_c2_flags(set_function_definition)
|
||||||
compilerdirectives_c1_flags(set_function_definition)
|
compilerdirectives_c1_flags(set_function_definition)
|
||||||
|
@ -149,7 +149,7 @@ public:
|
||||||
void print(outputStream* st) {
|
void print(outputStream* st) {
|
||||||
print_inline(st);
|
print_inline(st);
|
||||||
st->print(" ");
|
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_common_flags(print_function_definition)
|
||||||
compilerdirectives_c2_flags(print_function_definition)
|
compilerdirectives_c2_flags(print_function_definition)
|
||||||
compilerdirectives_c1_flags(print_function_definition)
|
compilerdirectives_c1_flags(print_function_definition)
|
||||||
|
|
|
@ -151,8 +151,6 @@ const DirectivesParser::key DirectivesParser::keys[] = {
|
||||||
{ "c2", type_c2, 0, mask(type_directives), NULL, UnknownFlagType },
|
{ "c2", type_c2, 0, mask(type_directives), NULL, UnknownFlagType },
|
||||||
{ "match", type_match, 1, 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 },
|
{ "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
|
// Global flags
|
||||||
#define common_flag_key(name, type, dvalue, compiler) \
|
#define common_flag_key(name, type, dvalue, compiler) \
|
||||||
|
@ -353,7 +351,7 @@ bool DirectivesParser::set_option(JSON_TYPE t, JSON_VAL* v) {
|
||||||
if (!set_option_flag(t, v, option_key, current_directive->_c1_store)) {
|
if (!set_option_flag(t, v, option_key, current_directive->_c1_store)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!set_option_flag(t, v, option_key, current_directive->_c2_store)) {
|
if (!set_option_flag(t, v, option_key, current_directive->_c2_store)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -436,31 +434,6 @@ bool DirectivesParser::set_option(JSON_TYPE t, JSON_VAL* v) {
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -730,19 +703,6 @@ void DirectivesParser::test() {
|
||||||
DirectivesParser::test(
|
DirectivesParser::test(
|
||||||
"[{c1:{c1:{c1:{c1:{c1:{c1:{c1:{}}}}}}}}]", false);
|
"[{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() {
|
void DirectivesParser_test() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue