291 static void reguard_yellow_pages(); |
291 static void reguard_yellow_pages(); |
292 |
292 |
293 // Fill in the "X cannot be cast to a Y" message for ClassCastException |
293 // Fill in the "X cannot be cast to a Y" message for ClassCastException |
294 // |
294 // |
295 // @param thr the current thread |
295 // @param thr the current thread |
296 // @param name the name of the class of the object attempted to be cast |
296 // @param caster_klass the class of the object we are casting |
297 // @return the dynamically allocated exception message (must be freed |
297 // @return the dynamically allocated exception message (must be freed |
298 // by the caller using a resource mark) |
298 // by the caller using a resource mark) |
299 // |
299 // |
300 // BCP must refer to the current 'checkcast' opcode for the frame |
300 // BCP must refer to the current 'checkcast' opcode for the frame |
301 // on top of the stack. |
301 // on top of the stack. |
302 // The caller (or one of it's callers) must use a ResourceMark |
302 // The caller (or one of its callers) must use a ResourceMark |
303 // in order to correctly free the result. |
303 // in order to correctly free the result. |
304 // |
304 // |
305 static char* generate_class_cast_message(JavaThread* thr, const char* name); |
305 static char* generate_class_cast_message(JavaThread* thr, Klass* caster_klass); |
306 |
306 |
307 // Fill in the "X cannot be cast to a Y" message for ClassCastException |
307 // Fill in the "X cannot be cast to a Y" message for ClassCastException |
308 // |
308 // |
309 // @param name the name of the class of the object attempted to be cast |
309 // @param caster_klass the class of the object we are casting |
310 // @param klass the name of the target klass attempt |
310 // @param target_klass the target klass attempt |
311 // @param gripe the specific kind of problem being reported |
|
312 // @return the dynamically allocated exception message (must be freed |
311 // @return the dynamically allocated exception message (must be freed |
313 // by the caller using a resource mark) |
312 // by the caller using a resource mark) |
314 // |
313 // |
315 // This version does not require access the frame, so it can be called |
314 // This version does not require access the frame, so it can be called |
316 // from interpreted code |
315 // from interpreted code |
317 // The caller (or one of it's callers) must use a ResourceMark |
316 // The caller (or one of it's callers) must use a ResourceMark |
318 // in order to correctly free the result. |
317 // in order to correctly free the result. |
319 // |
318 // |
320 static char* generate_class_cast_message(const char* name, const char* klass, |
319 static char* generate_class_cast_message(Klass* caster_klass, Klass* target_klass); |
321 const char* gripe = " cannot be cast to "); |
|
322 |
320 |
323 // Resolves a call site- may patch in the destination of the call into the |
321 // Resolves a call site- may patch in the destination of the call into the |
324 // compiled code. |
322 // compiled code. |
325 static methodHandle resolve_helper(JavaThread *thread, |
323 static methodHandle resolve_helper(JavaThread *thread, |
326 bool is_virtual, |
324 bool is_virtual, |