< prev index next >

src/hotspot/share/oops/cpCache.hpp

Print this page

  1 /*
  2  * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

 96                     Array<ResolvedFieldEntry>* field_entries,
 97                     Array<ResolvedMethodEntry>* mehtod_entries);
 98 
 99   // Initialization
100   void initialize(const intArray& invokedynamic_references_map);
101  public:
102   static ConstantPoolCache* allocate(ClassLoaderData* loader_data,
103                                      const intStack& invokedynamic_references_map,
104                                      const GrowableArray<ResolvedIndyEntry> indy_entries,
105                                      const GrowableArray<ResolvedFieldEntry> field_entries,
106                                      const GrowableArray<ResolvedMethodEntry> method_entries,
107                                      TRAPS);
108 
109   void metaspace_pointers_do(MetaspaceClosure* it);
110   MetaspaceObj::Type type() const         { return ConstantPoolCacheType; }
111 
112   oop  archived_references() NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
113   void clear_archived_references() NOT_CDS_JAVA_HEAP_RETURN;
114   CDS_JAVA_HEAP_ONLY(int archived_references_index() { return _archived_references_index; })
115 
116   inline objArrayOop resolved_references();
117   void set_resolved_references(OopHandle s) { _resolved_references = s; }
118   Array<u2>* reference_map() const        { return _reference_map; }
119   void set_reference_map(Array<u2>* o)    { _reference_map = o; }
120 
121  private:
122   void set_direct_or_vtable_call(
123     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
124     int method_index,                            // Index into the resolved method entry array
125     const methodHandle& method,                  // the method/prototype if any (null, otherwise)
126     int             vtable_index,                // the vtable index if any, else negative
127     bool            sender_is_interface
128   );
129 
130  public:
131   void set_direct_call(                          // sets entry to exact concrete method entry
132     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
133     int method_index,                            // Index into the resolved method entry array
134     const methodHandle& method,                  // the method to call
135     bool            sender_is_interface
136   );

  1 /*
  2  * Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  5  * This code is free software; you can redistribute it and/or modify it
  6  * under the terms of the GNU General Public License version 2 only, as
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *

 96                     Array<ResolvedFieldEntry>* field_entries,
 97                     Array<ResolvedMethodEntry>* mehtod_entries);
 98 
 99   // Initialization
100   void initialize(const intArray& invokedynamic_references_map);
101  public:
102   static ConstantPoolCache* allocate(ClassLoaderData* loader_data,
103                                      const intStack& invokedynamic_references_map,
104                                      const GrowableArray<ResolvedIndyEntry> indy_entries,
105                                      const GrowableArray<ResolvedFieldEntry> field_entries,
106                                      const GrowableArray<ResolvedMethodEntry> method_entries,
107                                      TRAPS);
108 
109   void metaspace_pointers_do(MetaspaceClosure* it);
110   MetaspaceObj::Type type() const         { return ConstantPoolCacheType; }
111 
112   oop  archived_references() NOT_CDS_JAVA_HEAP_RETURN_(nullptr);
113   void clear_archived_references() NOT_CDS_JAVA_HEAP_RETURN;
114   CDS_JAVA_HEAP_ONLY(int archived_references_index() { return _archived_references_index; })
115 
116   inline refArrayOop resolved_references();
117   void set_resolved_references(OopHandle s) { _resolved_references = s; }
118   Array<u2>* reference_map() const        { return _reference_map; }
119   void set_reference_map(Array<u2>* o)    { _reference_map = o; }
120 
121  private:
122   void set_direct_or_vtable_call(
123     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
124     int method_index,                            // Index into the resolved method entry array
125     const methodHandle& method,                  // the method/prototype if any (null, otherwise)
126     int             vtable_index,                // the vtable index if any, else negative
127     bool            sender_is_interface
128   );
129 
130  public:
131   void set_direct_call(                          // sets entry to exact concrete method entry
132     Bytecodes::Code invoke_code,                 // the bytecode used for invoking the method
133     int method_index,                            // Index into the resolved method entry array
134     const methodHandle& method,                  // the method to call
135     bool            sender_is_interface
136   );
< prev index next >