< prev index next >

src/share/vm/oops/klassVtable.cpp

Print this page
rev 10544 : call to __Value methods can't pass fields as arguments


  72   for (int i = 0; i < len; i++) {
  73     assert(methods->at(i)->is_method(), "must be a Method*");
  74     methodHandle mh(THREAD, methods->at(i));
  75 
  76     if (needs_new_vtable_entry(mh, super, classloader, classname, class_flags, THREAD)) {
  77       vtable_length += vtableEntry::size(); // we need a new entry
  78     }
  79   }
  80 
  81   GrowableArray<Method*> new_mirandas(20);
  82   // compute the number of mirandas methods that must be added to the end
  83   get_mirandas(&new_mirandas, all_mirandas, super, methods, NULL, local_interfaces);
  84   *num_new_mirandas = new_mirandas.length();
  85 
  86   // Interfaces do not need interface methods in their vtables
  87   // This includes miranda methods and during later processing, default methods
  88   if (!class_flags.is_interface()) {
  89     vtable_length += *num_new_mirandas * vtableEntry::size();
  90   }
  91 
  92   if (Universe::is_bootstrapping() && vtable_length == 0) {
  93     // array classes don't have their superclass set correctly during
  94     // bootstrapping
  95     vtable_length = Universe::base_vtable_size();
  96   }
  97 
  98   if (super == NULL && vtable_length != Universe::base_vtable_size()
  99       && !class_flags.is_value_type()) {
 100     if (Universe::is_bootstrapping()) {
 101       // Someone is attempting to override java.lang.Object incorrectly on the
 102       // bootclasspath.  The JVM cannot recover from this error including throwing
 103       // an exception
 104       vm_exit_during_initialization("Incompatible definition of java.lang.Object");
 105     } else {
 106       // Someone is attempting to redefine java.lang.Object incorrectly.  The
 107       // only way this should happen is from
 108       // SystemDictionary::resolve_from_stream(), which will detect this later
 109       // and throw a security exception.  So don't assert here to let
 110       // the exception occur.
 111       vtable_length = Universe::base_vtable_size();
 112     }




  72   for (int i = 0; i < len; i++) {
  73     assert(methods->at(i)->is_method(), "must be a Method*");
  74     methodHandle mh(THREAD, methods->at(i));
  75 
  76     if (needs_new_vtable_entry(mh, super, classloader, classname, class_flags, THREAD)) {
  77       vtable_length += vtableEntry::size(); // we need a new entry
  78     }
  79   }
  80 
  81   GrowableArray<Method*> new_mirandas(20);
  82   // compute the number of mirandas methods that must be added to the end
  83   get_mirandas(&new_mirandas, all_mirandas, super, methods, NULL, local_interfaces);
  84   *num_new_mirandas = new_mirandas.length();
  85 
  86   // Interfaces do not need interface methods in their vtables
  87   // This includes miranda methods and during later processing, default methods
  88   if (!class_flags.is_interface()) {
  89     vtable_length += *num_new_mirandas * vtableEntry::size();
  90   }
  91 
  92   if (Universe::is_bootstrapping() && vtable_length == 0 && classname != vmSymbols::java_lang____Value()) {
  93     // array classes don't have their superclass set correctly during
  94     // bootstrapping
  95     vtable_length = Universe::base_vtable_size();
  96   }
  97 
  98   if (super == NULL && vtable_length != Universe::base_vtable_size()
  99       && !class_flags.is_value_type()) {
 100     if (Universe::is_bootstrapping()) {
 101       // Someone is attempting to override java.lang.Object incorrectly on the
 102       // bootclasspath.  The JVM cannot recover from this error including throwing
 103       // an exception
 104       vm_exit_during_initialization("Incompatible definition of java.lang.Object");
 105     } else {
 106       // Someone is attempting to redefine java.lang.Object incorrectly.  The
 107       // only way this should happen is from
 108       // SystemDictionary::resolve_from_stream(), which will detect this later
 109       // and throw a security exception.  So don't assert here to let
 110       // the exception occur.
 111       vtable_length = Universe::base_vtable_size();
 112     }


< prev index next >