hotspot/src/share/vm/runtime/sharedRuntime.hpp
changeset 26684 d1221849ea3d
parent 26683 a02753d5a0b2
child 28947 2ea471384931
equal deleted inserted replaced
26683:a02753d5a0b2 26684:d1221849ea3d
   269 
   269 
   270 
   270 
   271   // used by native wrappers to reenable yellow if overflow happened in native code
   271   // used by native wrappers to reenable yellow if overflow happened in native code
   272   static void reguard_yellow_pages();
   272   static void reguard_yellow_pages();
   273 
   273 
   274   /**
   274   // Fill in the "X cannot be cast to a Y" message for ClassCastException
   275    * Fill in the "X cannot be cast to a Y" message for ClassCastException
   275   //
   276    *
   276   // @param thr the current thread
   277    * @param thr the current thread
   277   // @param name the name of the class of the object attempted to be cast
   278    * @param name the name of the class of the object attempted to be cast
   278   // @return the dynamically allocated exception message (must be freed
   279    * @return the dynamically allocated exception message (must be freed
   279   // by the caller using a resource mark)
   280    * by the caller using a resource mark)
   280   //
   281    *
   281   // BCP must refer to the current 'checkcast' opcode for the frame
   282    * BCP must refer to the current 'checkcast' opcode for the frame
   282   // on top of the stack.
   283    * on top of the stack.
   283   // The caller (or one of it's callers) must use a ResourceMark
   284    * The caller (or one of it's callers) must use a ResourceMark
   284   // in order to correctly free the result.
   285    * in order to correctly free the result.
   285   //
   286    */
       
   287   static char* generate_class_cast_message(JavaThread* thr, const char* name);
   286   static char* generate_class_cast_message(JavaThread* thr, const char* name);
   288 
   287 
   289   /**
   288   // Fill in the "X cannot be cast to a Y" message for ClassCastException
   290    * Fill in the "X cannot be cast to a Y" message for ClassCastException
   289   //
   291    *
   290   // @param name the name of the class of the object attempted to be cast
   292    * @param name the name of the class of the object attempted to be cast
   291   // @param klass the name of the target klass attempt
   293    * @param klass the name of the target klass attempt
   292   // @param gripe the specific kind of problem being reported
   294    * @param gripe the specific kind of problem being reported
   293   // @return the dynamically allocated exception message (must be freed
   295    * @return the dynamically allocated exception message (must be freed
   294   // by the caller using a resource mark)
   296    * by the caller using a resource mark)
   295   //
   297    *
   296   // This version does not require access the frame, so it can be called
   298    * This version does not require access the frame, so it can be called
   297   // from interpreted code
   299    * from interpreted code
   298   // The caller (or one of it's callers) must use a ResourceMark
   300    * The caller (or one of it's callers) must use a ResourceMark
   299   // in order to correctly free the result.
   301    * in order to correctly free the result.
   300   //
   302    */
       
   303   static char* generate_class_cast_message(const char* name, const char* klass,
   301   static char* generate_class_cast_message(const char* name, const char* klass,
   304                                            const char* gripe = " cannot be cast to ");
   302                                            const char* gripe = " cannot be cast to ");
   305 
   303 
   306   // Resolves a call site- may patch in the destination of the call into the
   304   // Resolves a call site- may patch in the destination of the call into the
   307   // compiled code.
   305   // compiled code.
   420   // storage. This then allows the interpreter frame to be removed from the
   418   // storage. This then allows the interpreter frame to be removed from the
   421   // stack and the OSR nmethod to be called. That method is called with a
   419   // stack and the OSR nmethod to be called. That method is called with a
   422   // pointer to the C heap storage. This pointer is the return value from
   420   // pointer to the C heap storage. This pointer is the return value from
   423   // OSR_migration_begin.
   421   // OSR_migration_begin.
   424 
   422 
   425   static intptr_t* OSR_migration_begin( JavaThread *thread);
   423   static intptr_t* OSR_migration_begin(JavaThread *thread);
   426 
   424 
   427   // OSR_migration_end is a trivial routine. It is called after the compiled
   425   // OSR_migration_end is a trivial routine. It is called after the compiled
   428   // method has extracted the jvm state from the C heap that OSR_migration_begin
   426   // method has extracted the jvm state from the C heap that OSR_migration_begin
   429   // created. It's entire job is to simply free this storage.
   427   // created. It's entire job is to simply free this storage.
   430   static void      OSR_migration_end  ( intptr_t* buf);
   428   static void OSR_migration_end(intptr_t* buf);
   431 
   429 
   432   // Convert a sig into a calling convention register layout
   430   // Convert a sig into a calling convention register layout
   433   // and find interesting things about it.
   431   // and find interesting things about it.
   434   static VMRegPair* find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int *arg_size);
   432   static VMRegPair* find_callee_arguments(Symbol* sig, bool has_receiver, bool has_appendix, int *arg_size);
   435   static VMReg     name_for_receiver();
   433   static VMReg name_for_receiver();
   436 
   434 
   437   // "Top of Stack" slots that may be unused by the calling convention but must
   435   // "Top of Stack" slots that may be unused by the calling convention but must
   438   // otherwise be preserved.
   436   // otherwise be preserved.
   439   // On Intel these are not necessary and the value can be zero.
   437   // On Intel these are not necessary and the value can be zero.
   440   // On Sparc this describes the words reserved for storing a register window
   438   // On Sparc this describes the words reserved for storing a register window
   689   static void print_handler(CodeBlob* b) { print_handler_on(tty, b); }
   687   static void print_handler(CodeBlob* b) { print_handler_on(tty, b); }
   690   static void print_handler_on(outputStream* st, CodeBlob* b);
   688   static void print_handler_on(outputStream* st, CodeBlob* b);
   691   static bool contains(CodeBlob* b);
   689   static bool contains(CodeBlob* b);
   692 #ifndef PRODUCT
   690 #ifndef PRODUCT
   693   static void print_statistics();
   691   static void print_statistics();
   694 #endif /* PRODUCT */
   692 #endif // PRODUCT
   695 
   693 
   696 };
   694 };
   697 
   695 
   698 #endif // SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP
   696 #endif // SHARE_VM_RUNTIME_SHAREDRUNTIME_HPP