Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/vmStructs.cpp @ 10135:5a9fa2ba85f0
8012907: anti-delta fix for 8010992
Summary: anti-delta fix for 8010992 until 8012902 can be fixed
Reviewed-by: acorn, minqi, rdurbin
author | dcubed |
---|---|
date | Sun, 21 Apr 2013 20:41:04 -0700 |
parents | 6f817ce50129 |
children | cc12becb22e7 |
comparison
equal
deleted
inserted
replaced
10130:6f817ce50129 | 10135:5a9fa2ba85f0 |
---|---|
3114 } | 3114 } |
3115 } | 3115 } |
3116 // Search for the base type by peeling off const and * | 3116 // Search for the base type by peeling off const and * |
3117 size_t len = strlen(typeName); | 3117 size_t len = strlen(typeName); |
3118 if (typeName[len-1] == '*') { | 3118 if (typeName[len-1] == '*') { |
3119 char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal); | 3119 char * s = new char[len]; |
3120 strncpy(s, typeName, len - 1); | 3120 strncpy(s, typeName, len - 1); |
3121 s[len-1] = '\0'; | 3121 s[len-1] = '\0'; |
3122 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); | 3122 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); |
3123 if (recursiveFindType(origtypes, s, true) == 1) { | 3123 if (recursiveFindType(origtypes, s, true) == 1) { |
3124 FREE_C_HEAP_ARRAY(char, s, mtInternal); | 3124 delete [] s; |
3125 return 1; | 3125 return 1; |
3126 } | 3126 } |
3127 FREE_C_HEAP_ARRAY(char, s, mtInternal); | 3127 delete [] s; |
3128 } | 3128 } |
3129 const char* start = NULL; | 3129 const char* start = NULL; |
3130 if (strstr(typeName, "GrowableArray<") == typeName) { | 3130 if (strstr(typeName, "GrowableArray<") == typeName) { |
3131 start = typeName + strlen("GrowableArray<"); | 3131 start = typeName + strlen("GrowableArray<"); |
3132 } else if (strstr(typeName, "Array<") == typeName) { | 3132 } else if (strstr(typeName, "Array<") == typeName) { |
3133 start = typeName + strlen("Array<"); | 3133 start = typeName + strlen("Array<"); |
3134 } | 3134 } |
3135 if (start != NULL) { | 3135 if (start != NULL) { |
3136 const char * end = strrchr(typeName, '>'); | 3136 const char * end = strrchr(typeName, '>'); |
3137 int len = end - start + 1; | 3137 int len = end - start + 1; |
3138 char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal); | 3138 char * s = new char[len]; |
3139 strncpy(s, start, len - 1); | 3139 strncpy(s, start, len - 1); |
3140 s[len-1] = '\0'; | 3140 s[len-1] = '\0'; |
3141 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); | 3141 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); |
3142 if (recursiveFindType(origtypes, s, true) == 1) { | 3142 if (recursiveFindType(origtypes, s, true) == 1) { |
3143 FREE_C_HEAP_ARRAY(char, s, mtInternal); | 3143 delete [] s; |
3144 return 1; | 3144 return 1; |
3145 } | 3145 } |
3146 FREE_C_HEAP_ARRAY(char, s, mtInternal); | 3146 delete [] s; |
3147 } | 3147 } |
3148 if (strstr(typeName, "const ") == typeName) { | 3148 if (strstr(typeName, "const ") == typeName) { |
3149 const char * s = typeName + strlen("const "); | 3149 const char * s = typeName + strlen("const "); |
3150 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); | 3150 // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); |
3151 if (recursiveFindType(origtypes, s, true) == 1) { | 3151 if (recursiveFindType(origtypes, s, true) == 1) { |