178 }
179
180 inline void check_property(bool property, const char* msg, TRAPS) {
181 if (_need_verify) {
182 guarantee_property(property, msg, CHECK);
183 } else {
184 assert_property(property, msg, CHECK);
185 }
186 }
187
188 inline void guarantee_property(bool b, const char* msg, int index, TRAPS) {
189 if (!b) { classfile_parse_error(msg, index, CHECK); }
190 }
191 inline void guarantee_property(bool b, const char* msg, const char *name, TRAPS) {
192 if (!b) { classfile_parse_error(msg, name, CHECK); }
193 }
194 inline void guarantee_property(bool b, const char* msg, int index, const char *name, TRAPS) {
195 if (!b) { classfile_parse_error(msg, index, name, CHECK); }
196 }
197
198 bool is_supported_version(u2 major, u2 minor);
199 bool has_illegal_visibility(jint flags);
200
201 void verify_constantvalue(int constantvalue_index, int signature_index, constantPoolHandle cp, TRAPS);
202 void verify_legal_utf8(const unsigned char* buffer, int length, TRAPS);
203 void verify_legal_class_name(symbolHandle name, TRAPS);
204 void verify_legal_field_name(symbolHandle name, TRAPS);
205 void verify_legal_method_name(symbolHandle name, TRAPS);
206 void verify_legal_field_signature(symbolHandle fieldname, symbolHandle signature, TRAPS);
207 int verify_legal_method_signature(symbolHandle methodname, symbolHandle signature, TRAPS);
208 void verify_legal_class_modifiers(jint flags, TRAPS);
209 void verify_legal_field_modifiers(jint flags, bool is_interface, TRAPS);
210 void verify_legal_method_modifiers(jint flags, bool is_interface, symbolHandle name, TRAPS);
211 bool verify_unqualified_name(char* name, unsigned int length, int type);
212 char* skip_over_field_name(char* name, bool slash_ok, unsigned int length);
213 char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS);
214
215 bool is_anonymous() {
216 assert(AnonymousClasses || _host_klass.is_null(), "");
217 return _host_klass.not_null();
|
178 }
179
180 inline void check_property(bool property, const char* msg, TRAPS) {
181 if (_need_verify) {
182 guarantee_property(property, msg, CHECK);
183 } else {
184 assert_property(property, msg, CHECK);
185 }
186 }
187
188 inline void guarantee_property(bool b, const char* msg, int index, TRAPS) {
189 if (!b) { classfile_parse_error(msg, index, CHECK); }
190 }
191 inline void guarantee_property(bool b, const char* msg, const char *name, TRAPS) {
192 if (!b) { classfile_parse_error(msg, name, CHECK); }
193 }
194 inline void guarantee_property(bool b, const char* msg, int index, const char *name, TRAPS) {
195 if (!b) { classfile_parse_error(msg, index, name, CHECK); }
196 }
197
198 void throwIllegalSignature(
199 const char* type, symbolHandle name, symbolHandle sig, TRAPS);
200
201 bool is_supported_version(u2 major, u2 minor);
202 bool has_illegal_visibility(jint flags);
203
204 void verify_constantvalue(int constantvalue_index, int signature_index, constantPoolHandle cp, TRAPS);
205 void verify_legal_utf8(const unsigned char* buffer, int length, TRAPS);
206 void verify_legal_class_name(symbolHandle name, TRAPS);
207 void verify_legal_field_name(symbolHandle name, TRAPS);
208 void verify_legal_method_name(symbolHandle name, TRAPS);
209 void verify_legal_field_signature(symbolHandle fieldname, symbolHandle signature, TRAPS);
210 int verify_legal_method_signature(symbolHandle methodname, symbolHandle signature, TRAPS);
211 void verify_legal_class_modifiers(jint flags, TRAPS);
212 void verify_legal_field_modifiers(jint flags, bool is_interface, TRAPS);
213 void verify_legal_method_modifiers(jint flags, bool is_interface, symbolHandle name, TRAPS);
214 bool verify_unqualified_name(char* name, unsigned int length, int type);
215 char* skip_over_field_name(char* name, bool slash_ok, unsigned int length);
216 char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS);
217
218 bool is_anonymous() {
219 assert(AnonymousClasses || _host_klass.is_null(), "");
220 return _host_klass.not_null();
|