equal
deleted
inserted
replaced
130 _option = NULL; |
130 _option = NULL; |
131 memset(&_u, 0, sizeof(_u)); |
131 memset(&_u, 0, sizeof(_u)); |
132 } |
132 } |
133 |
133 |
134 static TypedMethodOptionMatcher* parse_method_pattern(char*& line, const char*& error_msg); |
134 static TypedMethodOptionMatcher* parse_method_pattern(char*& line, const char*& error_msg); |
135 TypedMethodOptionMatcher* match(methodHandle method, const char* opt, OptionType type); |
135 TypedMethodOptionMatcher* match(const methodHandle& method, const char* opt, OptionType type); |
136 |
136 |
137 void init(const char* opt, OptionType type, TypedMethodOptionMatcher* next) { |
137 void init(const char* opt, OptionType type, TypedMethodOptionMatcher* next) { |
138 _next = next; |
138 _next = next; |
139 _type = type; |
139 _type = type; |
140 _option = os::strdup_check_oom(opt); |
140 _option = os::strdup_check_oom(opt); |
259 return NULL; |
259 return NULL; |
260 } |
260 } |
261 return tom; |
261 return tom; |
262 } |
262 } |
263 |
263 |
264 TypedMethodOptionMatcher* TypedMethodOptionMatcher::match(methodHandle method, const char* opt, OptionType type) { |
264 TypedMethodOptionMatcher* TypedMethodOptionMatcher::match(const methodHandle& method, const char* opt, OptionType type) { |
265 TypedMethodOptionMatcher* current = this; |
265 TypedMethodOptionMatcher* current = this; |
266 while (current != NULL) { |
266 while (current != NULL) { |
267 // Fastest compare first. |
267 // Fastest compare first. |
268 if (current->type() == type) { |
268 if (current->type() == type) { |
269 if (strcmp(current->_option, opt) == 0) { |
269 if (strcmp(current->_option, opt) == 0) { |
287 option_list = matcher; |
287 option_list = matcher; |
288 any_set = true; |
288 any_set = true; |
289 return; |
289 return; |
290 } |
290 } |
291 |
291 |
292 static bool check_predicate(OracleCommand command, methodHandle method) { |
292 static bool check_predicate(OracleCommand command, const methodHandle& method) { |
293 return ((lists[command] != NULL) && |
293 return ((lists[command] != NULL) && |
294 !method.is_null() && |
294 !method.is_null() && |
295 lists[command]->match(method)); |
295 lists[command]->match(method)); |
296 } |
296 } |
297 |
297 |