< prev index next >

src/hotspot/share/runtime/signature.cpp

Print this page

        

@@ -48,22 +48,22 @@
   _signature       = signature;
   _parameter_index = 0;
 }
 
 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++;
 }
 
 int SignatureIterator::parse_type() {
   // Note: This function could be simplified by using "return T_XXX_size;"
   //       instead of the assignment and the break statements. However, it
   //       seems that the product build for win32_i486 with MS VC++ 6.0 doesn't
   //       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;
               _index++; size = T_CHAR_size   ; break;
     case 'D': do_double(); if (_parameter_index < 0 ) _return_type = T_DOUBLE;

@@ -81,24 +81,24 @@
     case 'V': do_void  (); if (_parameter_index < 0 ) _return_type = T_VOID;
               _index++; size = T_VOID_size;  ; break;
     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;
       size = T_OBJECT_size;
       break;
     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++;
         }
         do_array(begin, _index);
        if (_parameter_index < 0 ) _return_type = T_ARRAY;

@@ -135,11 +135,11 @@
 void SignatureIterator::iterate_parameters() {
   // Parse parameters
   _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;
 }
 
 // Optimized version of iterate_parameters when fingerprint is known

@@ -215,12 +215,12 @@
   expect('(');
   Symbol* sig = _signature;
   // 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':
       case 'F':
       case 'I':

@@ -232,21 +232,21 @@
           _index++;
         }
         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++;
           }
         }
         break;

@@ -267,11 +267,11 @@
 void SignatureIterator::iterate() {
   // Parse parameters
   _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;
   parse_type();
   check_signature_end();

@@ -302,34 +302,34 @@
 void SignatureStream::next_non_primitive(int t) {
   switch (t) {
     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':
         case 'F':
         case 'I':
         case 'J':
         case 'S':
         case 'Z':_end++; break;
         default: {
-          while (sig->byte_at(_end++) != ';');
+          while (sig->char_at(_end++) != ';');
           break;
         }
       }
       break;
     }

@@ -351,12 +351,12 @@
 Symbol* SignatureStream::as_symbol(TRAPS) {
   // Create a symbol from for string _begin _end
   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--;
   }
 
   // Save names for cleaning up reference count at the end of

@@ -392,19 +392,19 @@
   ResourceMark rm;
 
   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;
 }
 
< prev index next >