< prev index next >
hotspot/src/share/vm/runtime/fieldType.cpp
Print this page
*** 72,81 ****
--- 72,105 ----
}
return false;
}
+ static const char dvt_postfix[] = "$Value";
+ static const int dvt_postfix_len = 6;
+
+ bool FieldType::is_dvt_postfix(Symbol* signature) {
+ int sig_length = signature->utf8_length();
+ int pos = sig_length - dvt_postfix_len;
+ if (pos <= 0) {
+ return false;
+ }
+ for (int i = 0; i < dvt_postfix_len; i++) {
+ if (signature->byte_at(pos) != dvt_postfix[i]) {
+ return false;
+ }
+ pos++;
+ }
+ return true;
+ }
+
+ char* FieldType::dvt_unmangle_vcc(Symbol* signature) {
+ assert(is_dvt_postfix(signature), "Unmangle that which is not managled");
+ char* str = signature->as_C_string();
+ str[signature->utf8_length() -dvt_postfix_len] = '\0';
+ return str;
+ }
BasicType FieldType::get_array_info(Symbol* signature, FieldArrayInfo& fd, TRAPS) {
assert(basic_type(signature) == T_ARRAY, "must be array");
int index = 1;
int dim = 1;
< prev index next >