106 return utf8_length() > 2 && char_at(0) == 'Q' && ends_with(';'); 107 } 108 109 bool Symbol::is_Q_array_signature() const { 110 int l = utf8_length(); 111 if (l < 2 || char_at(0) != '[' || char_at(l - 1) != ';') { 112 return false; 113 } 114 for (int i = 1; i < (l - 2); i++) { 115 char c = char_at(i); 116 if (c == 'Q') { 117 return true; 118 } 119 if (c != '[') { 120 return false; 121 } 122 } 123 return false; 124 } 125 126 Symbol* Symbol::fundamental_name(TRAPS) { 127 if ((char_at(0) == 'Q' || char_at(0) == 'L') && ends_with(';')) { 128 return SymbolTable::lookup(this, 1, utf8_length() - 1, CHECK_NULL); 129 } else { 130 // reference count is incremented to be consistent with the behavior with 131 // the SymbolTable::lookup() call above 132 this->increment_refcount(); 133 return this; 134 } 135 } 136 137 bool Symbol::is_same_fundamental_type(Symbol* s) const { 138 if (this == s) return true; 139 if (utf8_length() < 3) return false; 140 int offset1, offset2, len; 141 if (ends_with(';')) { 142 if (char_at(0) != 'Q' && char_at(0) != 'L') return false; 143 offset1 = 1; 144 len = utf8_length() - 2; 145 } else { | 106 return utf8_length() > 2 && char_at(0) == 'Q' && ends_with(';'); 107 } 108 109 bool Symbol::is_Q_array_signature() const { 110 int l = utf8_length(); 111 if (l < 2 || char_at(0) != '[' || char_at(l - 1) != ';') { 112 return false; 113 } 114 for (int i = 1; i < (l - 2); i++) { 115 char c = char_at(i); 116 if (c == 'Q') { 117 return true; 118 } 119 if (c != '[') { 120 return false; 121 } 122 } 123 return false; 124 } 125 126 bool Symbol::is_Q_singledim_array_signature() const { 127 return utf8_length() > 3 && char_at(0) == '[' && char_at(1) == 'Q' && ends_with(';'); 128 } 129 130 Symbol* Symbol::fundamental_name(TRAPS) { 131 if ((char_at(0) == 'Q' || char_at(0) == 'L') && ends_with(';')) { 132 return SymbolTable::lookup(this, 1, utf8_length() - 1, CHECK_NULL); 133 } else { 134 // reference count is incremented to be consistent with the behavior with 135 // the SymbolTable::lookup() call above 136 this->increment_refcount(); 137 return this; 138 } 139 } 140 141 bool Symbol::is_same_fundamental_type(Symbol* s) const { 142 if (this == s) return true; 143 if (utf8_length() < 3) return false; 144 int offset1, offset2, len; 145 if (ends_with(';')) { 146 if (char_at(0) != 'Q' && char_at(0) != 'L') return false; 147 offset1 = 1; 148 len = utf8_length() - 2; 149 } else { |