< prev index next >

src/hotspot/share/memory/universe.cpp

Print this page
*** 107,10 ***
--- 107,12 ---
  static LatestMethodCache _finalizer_register_cache;         // Finalizer.register()
  static LatestMethodCache _loader_addClass_cache;            // ClassLoader.addClass()
  static LatestMethodCache _throw_illegal_access_error_cache; // Unsafe.throwIllegalAccessError()
  static LatestMethodCache _throw_no_such_method_error_cache; // Unsafe.throwNoSuchMethodError()
  static LatestMethodCache _do_stack_walk_cache;              // AbstractStackWalker.doStackWalk()
+ static LatestMethodCache _is_substitutable_cache;           // ValueObjectMethods.isSubstitutable()
+ static LatestMethodCache _value_object_hash_code_cache;     // ValueObjectMethods.valueObjectHashCode()
  
  // Known objects
  TypeArrayKlass* Universe::_typeArrayKlasses[T_LONG+1] = { nullptr /*, nullptr...*/ };
  ObjArrayKlass* Universe::_objectArrayKlass            = nullptr;
  Klass* Universe::_fillerArrayKlass                    = nullptr;

*** 444,10 ***
--- 446,11 ---
        // Verify shared interfaces array.
        assert(_the_array_interfaces_array->at(0) ==
               vmClasses::Cloneable_klass(), "u3");
        assert(_the_array_interfaces_array->at(1) ==
               vmClasses::Serializable_klass(), "u3");
+ 
      } else
  #endif
      {
        // Set up shared interfaces array.  (Do this before supers are set up.)
        _the_array_interfaces_array->at_put(0, vmClasses::Cloneable_klass());

*** 877,11 ***
    }
  
    Universe::initialize_tlab();
  
    Metaspace::global_initialize();
- 
    // Initialize performance counters for metaspaces
    MetaspaceCounters::initialize_performance_counters();
  
    // Checks 'AfterMemoryInit' constraints.
    if (!JVMFlagLimit::check_all_constraints(JVMFlagConstraintPhase::AfterMemoryInit)) {
--- 880,10 ---

*** 1030,10 ***
--- 1032,12 ---
  Method* Universe::finalizer_register_method()     { return _finalizer_register_cache.get_method(); }
  Method* Universe::loader_addClass_method()        { return _loader_addClass_cache.get_method(); }
  Method* Universe::throw_illegal_access_error()    { return _throw_illegal_access_error_cache.get_method(); }
  Method* Universe::throw_no_such_method_error()    { return _throw_no_such_method_error_cache.get_method(); }
  Method* Universe::do_stack_walk_method()          { return _do_stack_walk_cache.get_method(); }
+ Method* Universe::is_substitutable_method()       { return _is_substitutable_cache.get_method(); }
+ Method* Universe::value_object_hash_code_method() { return _value_object_hash_code_cache.get_method(); }
  
  void Universe::initialize_known_methods(JavaThread* current) {
    // Set up static method for registering finalizers
    _finalizer_register_cache.init(current,
                            vmClasses::Finalizer_klass(),

*** 1059,10 ***
--- 1063,21 ---
    // Set up method for stack walking
    _do_stack_walk_cache.init(current,
                            vmClasses::AbstractStackWalker_klass(),
                            "doStackWalk",
                            vmSymbols::doStackWalk_signature(), false);
+ 
+   // Set up substitutability testing
+   ResourceMark rm(current);
+   _is_substitutable_cache.init(current,
+                           vmClasses::ValueObjectMethods_klass(),
+                           vmSymbols::isSubstitutable_name()->as_C_string(),
+                           vmSymbols::object_object_boolean_signature(), true);
+   _value_object_hash_code_cache.init(current,
+                           vmClasses::ValueObjectMethods_klass(),
+                           vmSymbols::valueObjectHashCode_name()->as_C_string(),
+                           vmSymbols::object_int_signature(), true);
  }
  
  void universe2_init() {
    EXCEPTION_MARK;
    Universe::genesis(CATCH);
< prev index next >