8183039: Re-examine methodHandle methods uninlined by 8144256

Add more const references so out-of-line methodHandle destructor and copy ctor called infrequently

Reviewed-by: hseigel, redestad
This commit is contained in:
Coleen Phillimore 2017-07-27 18:06:41 -04:00
parent a4fac2babb
commit af5c6eefbf
69 changed files with 201 additions and 202 deletions

View file

@ -132,7 +132,7 @@ class TypedMethodOptionMatcher : public MethodMatcher {
}
static TypedMethodOptionMatcher* parse_method_pattern(char*& line, const char*& error_msg);
TypedMethodOptionMatcher* match(methodHandle method, const char* opt, OptionType type);
TypedMethodOptionMatcher* match(const methodHandle& method, const char* opt, OptionType type);
void init(const char* opt, OptionType type, TypedMethodOptionMatcher* next) {
_next = next;
@ -261,7 +261,7 @@ TypedMethodOptionMatcher* TypedMethodOptionMatcher::parse_method_pattern(char*&
return tom;
}
TypedMethodOptionMatcher* TypedMethodOptionMatcher::match(methodHandle method, const char* opt, OptionType type) {
TypedMethodOptionMatcher* TypedMethodOptionMatcher::match(const methodHandle& method, const char* opt, OptionType type) {
TypedMethodOptionMatcher* current = this;
while (current != NULL) {
// Fastest compare first.
@ -289,7 +289,7 @@ static void add_option_string(TypedMethodOptionMatcher* matcher,
return;
}
static bool check_predicate(OracleCommand command, methodHandle method) {
static bool check_predicate(OracleCommand command, const methodHandle& method) {
return ((lists[command] != NULL) &&
!method.is_null() &&
lists[command]->match(method));