< prev index next >

src/hotspot/share/compiler/methodMatcher.cpp

Print this page

286     // In very rare case, the method name happens to be same as option type/name, so look ahead to make sure
287     // it doesn't show up again.
288     if ((OptionType::Unknown != CompilerOracle::parse_option_type(method_name) ||
289         CompileCommand::Unknown != CompilerOracle::parse_option_name(method_name)) &&
290         *(line + bytes_read) != '\0' &&
291         strstr(line + bytes_read, method_name) == NULL) {
292       error_msg = "Did not specify any method name";
293       method_name[0] = '\0';
294       return;
295     }
296 
297     if ((strchr(class_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
298         (strchr(class_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
299       error_msg = "Chars '<' and '>' not allowed in class name";
300       return;
301     }
302 
303     if ((strchr(method_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
304         (strchr(method_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
305       if (!vmSymbols::object_initializer_name()->equals(method_name) &&
306           !vmSymbols::class_initializer_name()->equals(method_name)) {
307         error_msg = "Chars '<' and '>' only allowed in <init> and <clinit>";

308         return;
309       }
310     }
311 
312     if (c_match == MethodMatcher::Unknown || m_match == MethodMatcher::Unknown) {
313       assert(error_msg != NULL, "Must have been set by check_mode()");
314       return;
315     }
316 
317     EXCEPTION_MARK;
318     Symbol* signature = NULL;
319     line += bytes_read;
320     bytes_read = 0;
321 
322     skip_leading_spaces(line, &total_bytes_read);
323 
324     // there might be a signature following the method.
325     // signatures always begin with ( so match that by hand
326     if (line[0] == '(') {
327       line++;

286     // In very rare case, the method name happens to be same as option type/name, so look ahead to make sure
287     // it doesn't show up again.
288     if ((OptionType::Unknown != CompilerOracle::parse_option_type(method_name) ||
289         CompileCommand::Unknown != CompilerOracle::parse_option_name(method_name)) &&
290         *(line + bytes_read) != '\0' &&
291         strstr(line + bytes_read, method_name) == NULL) {
292       error_msg = "Did not specify any method name";
293       method_name[0] = '\0';
294       return;
295     }
296 
297     if ((strchr(class_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
298         (strchr(class_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
299       error_msg = "Chars '<' and '>' not allowed in class name";
300       return;
301     }
302 
303     if ((strchr(method_name, JVM_SIGNATURE_SPECIAL) != NULL) ||
304         (strchr(method_name, JVM_SIGNATURE_ENDSPECIAL) != NULL)) {
305       if (!vmSymbols::object_initializer_name()->equals(method_name) &&
306           !vmSymbols::class_initializer_name()->equals(method_name) &&
307           !vmSymbols::inline_factory_name()->equals(method_name)) {
308         error_msg = "Chars '<' and '>' only allowed in <init>, <clinit> and <vnew>";
309         return;
310       }
311     }
312 
313     if (c_match == MethodMatcher::Unknown || m_match == MethodMatcher::Unknown) {
314       assert(error_msg != NULL, "Must have been set by check_mode()");
315       return;
316     }
317 
318     EXCEPTION_MARK;
319     Symbol* signature = NULL;
320     line += bytes_read;
321     bytes_read = 0;
322 
323     skip_leading_spaces(line, &total_bytes_read);
324 
325     // there might be a signature following the method.
326     // signatures always begin with ( so match that by hand
327     if (line[0] == '(') {
328       line++;
< prev index next >