equal
deleted
inserted
replaced
96 _type_signatures[T_LONG] = long_signature(); |
96 _type_signatures[T_LONG] = long_signature(); |
97 _type_signatures[T_SHORT] = short_signature(); |
97 _type_signatures[T_SHORT] = short_signature(); |
98 _type_signatures[T_BOOLEAN] = bool_signature(); |
98 _type_signatures[T_BOOLEAN] = bool_signature(); |
99 _type_signatures[T_VOID] = void_signature(); |
99 _type_signatures[T_VOID] = void_signature(); |
100 // no single signatures for T_OBJECT or T_ARRAY |
100 // no single signatures for T_OBJECT or T_ARRAY |
|
101 #ifdef ASSERT |
|
102 for (int i = (int)T_BOOLEAN; i < (int)T_VOID+1; i++) { |
|
103 Symbol* s = _type_signatures[i]; |
|
104 if (s == NULL) continue; |
|
105 BasicType st = signature_type(s); |
|
106 assert(st == i, ""); |
|
107 } |
|
108 #endif |
101 } |
109 } |
102 |
110 |
103 #ifdef ASSERT |
111 #ifdef ASSERT |
104 // Check for duplicates: |
112 // Check for duplicates: |
105 for (int i1 = (int)FIRST_SID; i1 < (int)SID_LIMIT; i1++) { |
113 for (int i1 = (int)FIRST_SID; i1 < (int)SID_LIMIT; i1++) { |
200 } |
208 } |
201 |
209 |
202 |
210 |
203 BasicType vmSymbols::signature_type(const Symbol* s) { |
211 BasicType vmSymbols::signature_type(const Symbol* s) { |
204 assert(s != NULL, "checking"); |
212 assert(s != NULL, "checking"); |
205 for (int i = T_BOOLEAN; i < T_VOID+1; i++) { |
213 if (s->utf8_length() == 1) { |
206 if (s == _type_signatures[i]) { |
214 BasicType result = char2type(s->byte_at(0)); |
207 return (BasicType)i; |
215 if (is_java_primitive(result) || result == T_VOID) { |
|
216 assert(s == _type_signatures[result], ""); |
|
217 return result; |
208 } |
218 } |
209 } |
219 } |
210 return T_OBJECT; |
220 return T_OBJECT; |
211 } |
221 } |
212 |
222 |