1 /* |
1 /* |
2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
155 static VerificationType category2_2nd_check() |
155 static VerificationType category2_2nd_check() |
156 { return VerificationType(Category2_2ndQuery); } |
156 { return VerificationType(Category2_2ndQuery); } |
157 |
157 |
158 // For reference types, store the actual Symbol |
158 // For reference types, store the actual Symbol |
159 static VerificationType reference_type(Symbol* sh) { |
159 static VerificationType reference_type(Symbol* sh) { |
160 assert(((uintptr_t)sh & 0x3) == 0, "Oops must be aligned"); |
160 assert(((uintptr_t)sh & 0x3) == 0, "Symbols must be aligned"); |
161 // If the above assert fails in the future because oop* isn't aligned, |
161 // If the above assert fails in the future because oop* isn't aligned, |
162 // then this type encoding system will have to change to have a tag value |
162 // then this type encoding system will have to change to have a tag value |
163 // to descriminate between oops and primitives. |
163 // to descriminate between oops and primitives. |
164 return VerificationType((uintptr_t)sh); |
164 return VerificationType((uintptr_t)sh); |
165 } |
165 } |
301 int index = 0; |
301 int index = 0; |
302 while (name()->byte_at(index++) == '['); |
302 while (name()->byte_at(index++) == '['); |
303 return index; |
303 return index; |
304 } |
304 } |
305 |
305 |
306 void print_on(outputStream* st) const PRODUCT_RETURN; |
306 void print_on(outputStream* st) const; |
307 |
307 |
308 private: |
308 private: |
309 |
309 |
310 bool is_reference_assignable_from( |
310 bool is_reference_assignable_from( |
311 const VerificationType&, ClassVerifier*, TRAPS) const; |
311 const VerificationType&, ClassVerifier*, TRAPS) const; |