--- old/src/hotspot/share/runtime/signature.cpp 2018-10-01 15:59:00.845763290 -0400 +++ new/src/hotspot/share/runtime/signature.cpp 2018-10-01 15:59:00.378170691 -0400 @@ -50,7 +50,7 @@ } void SignatureIterator::expect(char c) { - if (_signature->byte_at(_index) != c) fatal("expecting %c", c); + if (_signature->char_at(_index) != c) fatal("expecting %c", c); _index++; } @@ -61,7 +61,7 @@ // work (stack underflow for some tests) - this seems to be a VC++ 6.0 // compiler bug (was problem - gri 4/27/2000). int size = -1; - switch(_signature->byte_at(_index)) { + switch(_signature->char_at(_index)) { case 'B': do_byte (); if (_parameter_index < 0 ) _return_type = T_BYTE; _index++; size = T_BYTE_size ; break; case 'C': do_char (); if (_parameter_index < 0 ) _return_type = T_CHAR; @@ -83,7 +83,7 @@ case 'L': { int begin = ++_index; Symbol* sig = _signature; - while (sig->byte_at(_index++) != ';') ; + while (sig->char_at(_index++) != ';') ; do_object(begin, _index); } if (_parameter_index < 0 ) _return_type = T_OBJECT; @@ -92,11 +92,11 @@ case '[': { int begin = ++_index; Symbol* sig = _signature; - while (sig->byte_at(_index) == '[') { + while (sig->char_at(_index) == '[') { _index++; } - if (sig->byte_at(_index) == 'L') { - while (sig->byte_at(_index++) != ';') ; + if (sig->char_at(_index) == 'L') { + while (sig->char_at(_index++) != ';') ; } else { _index++; } @@ -137,7 +137,7 @@ _index = 0; _parameter_index = 0; expect('('); - while (_signature->byte_at(_index) != ')') _parameter_index += parse_type(); + while (_signature->char_at(_index) != ')') _parameter_index += parse_type(); expect(')'); _parameter_index = 0; } @@ -217,8 +217,8 @@ // Need to skip over each type in the signature's argument list until a // closing ')' is found., then get the return type. We cannot just scan // for the first ')' because ')' is a legal character in a type name. - while (sig->byte_at(_index) != ')') { - switch(sig->byte_at(_index)) { + while (sig->char_at(_index) != ')') { + switch(sig->char_at(_index)) { case 'B': case 'C': case 'D': @@ -234,17 +234,17 @@ break; case 'L': { - while (sig->byte_at(_index++) != ';') ; + while (sig->char_at(_index++) != ';') ; } break; case '[': { int begin = ++_index; - while (sig->byte_at(_index) == '[') { + while (sig->char_at(_index) == '[') { _index++; } - if (sig->byte_at(_index) == 'L') { - while (sig->byte_at(_index++) != ';') ; + if (sig->char_at(_index) == 'L') { + while (sig->char_at(_index++) != ';') ; } else { _index++; } @@ -269,7 +269,7 @@ _parameter_index = 0; _index = 0; expect('('); - while (_signature->byte_at(_index) != ')') _parameter_index += parse_type(); + while (_signature->char_at(_index) != ')') _parameter_index += parse_type(); expect(')'); // Parse return type _parameter_index = -1; @@ -304,20 +304,20 @@ case 'L': { _type = T_OBJECT; Symbol* sig = _signature; - while (sig->byte_at(_end++) != ';'); + while (sig->char_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++); - while (sig->byte_at(_end) == '[') { + char c = sig->char_at(_end); + while ('0' <= c && c <= '9') c = sig->char_at(_end++); + while (sig->char_at(_end) == '[') { _end++; - c = sig->byte_at(_end); - while ('0' <= c && c <= '9') c = sig->byte_at(_end++); + c = sig->char_at(_end); + while ('0' <= c && c <= '9') c = sig->char_at(_end++); } - switch(sig->byte_at(_end)) { + switch(sig->char_at(_end)) { case 'B': case 'C': case 'D': @@ -327,7 +327,7 @@ case 'S': case 'Z':_end++; break; default: { - while (sig->byte_at(_end++) != ';'); + while (sig->char_at(_end++) != ';'); break; } } @@ -353,8 +353,8 @@ int begin = _begin; int end = _end; - if ( _signature->byte_at(_begin) == 'L' - && _signature->byte_at(_end-1) == ';') { + if ( _signature->char_at(_begin) == 'L' + && _signature->char_at(_end-1) == ';') { begin++; end--; } @@ -394,15 +394,15 @@ int begin = _begin; int end = _end; - if ( _signature->byte_at(_begin) == 'L' - && _signature->byte_at(_end-1) == ';') { + if ( _signature->char_at(_begin) == 'L' + && _signature->char_at(_end-1) == ';') { begin++; end--; } char* buffer = NEW_RESOURCE_ARRAY(char, end - begin); for (int index = begin; index < end; index++) { - buffer[index - begin] = _signature->byte_at(index); + buffer[index - begin] = _signature->char_at(index); } Symbol* result = SymbolTable::probe(buffer, end - begin); return result;