< prev index next >
src/hotspot/share/runtime/signature.cpp
Print this page
*** 38,48 ****
// Signature syntax:
//
// Signature = "(" {Parameter} ")" ReturnType.
// Parameter = FieldType.
// ReturnType = FieldType | "V".
! // FieldType = "B" | "C" | "D" | "F" | "I" | "J" | "S" | "Z" | "L" ClassName ";" | "Q" ValueTypeName ";" | "[" FieldType.
// ClassName = string.
SignatureIterator::SignatureIterator(Symbol* signature) {
_signature = signature;
--- 38,48 ----
// Signature syntax:
//
// Signature = "(" {Parameter} ")" ReturnType.
// Parameter = FieldType.
// ReturnType = FieldType | "V".
! // FieldType = "B" | "C" | "D" | "F" | "I" | "J" | "S" | "Z" | "L" ClassName ";" | "[" FieldType.
// ClassName = string.
SignatureIterator::SignatureIterator(Symbol* signature) {
_signature = signature;
*** 95,122 ****
do_object(begin, _index);
}
if (_parameter_index < 0 ) _return_type = T_OBJECT;
size = T_OBJECT_size;
break;
- case 'Q':
- { int begin = ++_index;
- Symbol* sig = _signature;
- while (sig->byte_at(_index++) != ';') ;
- do_valuetype(begin, _index);
- }
- if (_parameter_index < 0 ) _return_type = T_VALUETYPE;
- size = T_VALUETYPE_size;
- break;
case '[':
{ int begin = ++_index;
skip_optional_size();
Symbol* sig = _signature;
while (sig->byte_at(_index) == '[') {
_index++;
skip_optional_size();
}
! if (sig->byte_at(_index) == 'L' || sig->byte_at(_index) == 'Q') {
while (sig->byte_at(_index++) != ';') ;
} else {
_index++;
}
do_array(begin, _index);
--- 95,113 ----
do_object(begin, _index);
}
if (_parameter_index < 0 ) _return_type = T_OBJECT;
size = T_OBJECT_size;
break;
case '[':
{ int begin = ++_index;
skip_optional_size();
Symbol* sig = _signature;
while (sig->byte_at(_index) == '[') {
_index++;
skip_optional_size();
}
! if (sig->byte_at(_index) == 'L') {
while (sig->byte_at(_index++) != ';') ;
} else {
_index++;
}
do_array(begin, _index);
*** 199,212 ****
break;
case obj_parm:
do_object(0, 0);
_parameter_index += T_OBJECT_size;
break;
- case valuetype_parm:
- do_valuetype(0,0);
- _parameter_index += T_VALUETYPE_size;
- break;
case long_parm:
do_long();
_parameter_index += T_LONG_size;
break;
case float_parm:
--- 190,199 ----
*** 253,263 ****
case 'V':
{
_index++;
}
break;
- case 'Q':
case 'L':
{
while (sig->byte_at(_index++) != ';') ;
}
break;
--- 240,249 ----
*** 267,277 ****
skip_optional_size();
while (sig->byte_at(_index) == '[') {
_index++;
skip_optional_size();
}
! if (sig->byte_at(_index) == 'L' || sig->byte_at(_index) == 'Q') {
while (sig->byte_at(_index++) != ';') ;
} else {
_index++;
}
}
--- 253,263 ----
skip_optional_size();
while (sig->byte_at(_index) == '[') {
_index++;
skip_optional_size();
}
! if (sig->byte_at(_index) == 'L') {
while (sig->byte_at(_index++) != ';') ;
} else {
_index++;
}
}
*** 331,346 ****
_type = T_OBJECT;
Symbol* sig = _signature;
while (sig->byte_at(_end++) != ';');
break;
}
- case 'Q': {
- _type = T_VALUETYPE;
- Symbol* sig = _signature;
- while (sig->byte_at(_end++) != ';');
- break;
- }
case '[': {
_type = T_ARRAY;
Symbol* sig = _signature;
char c = sig->byte_at(_end);
while ('0' <= c && c <= '9') c = sig->byte_at(_end++);
--- 317,326 ----
*** 388,398 ****
if (_type == T_OBJECT || _type == T_VALUETYPE) {
begin++;
end--;
if (begin == end) {
! return (_type == T_OBJECT) ? vmSymbols::java_lang_Object() : vmSymbols::java_lang____Value();
}
}
// Save names for cleaning up reference count at the end of
// SignatureStream scope.
--- 368,378 ----
if (_type == T_OBJECT || _type == T_VALUETYPE) {
begin++;
end--;
if (begin == end) {
! return vmSymbols::java_lang_Object();
}
}
// Save names for cleaning up reference count at the end of
// SignatureStream scope.
*** 431,441 ****
if (_type == T_OBJECT || _type == T_VALUETYPE) {
begin++;
end--;
if (begin == end) {
! return (_type == T_OBJECT) ? vmSymbols::java_lang_Object() : vmSymbols::java_lang____Value();
}
}
char* buffer = NEW_RESOURCE_ARRAY(char, end - begin);
for (int index = begin; index < end; index++) {
--- 411,421 ----
if (_type == T_OBJECT || _type == T_VALUETYPE) {
begin++;
end--;
if (begin == end) {
! return vmSymbols::java_lang_Object();
}
}
char* buffer = NEW_RESOURCE_ARRAY(char, end - begin);
for (int index = begin; index < end; index++) {
*** 510,520 ****
}
switch (type[index]) {
case 'B': case 'C': case 'D': case 'F': case 'I':
case 'J': case 'S': case 'Z': case 'V':
return index + 1;
- case 'Q':
case 'L':
for (index = index + 1; index < limit; ++index) {
char c = type[index];
if (c == ';') {
return index + 1;
--- 490,499 ----
< prev index next >