< prev index next >

src/hotspot/share/ci/ciInstanceKlass.hpp

Print this page

  1 /*
  2  * Copyright (c) 1999, 2023, 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  *

279   // What kind of ciObject is this?
280   bool is_instance_klass() const { return true; }
281 
282   virtual ciKlass* exact_klass() {
283     if (is_loaded() && is_final() && !is_interface()) {
284       return this;
285     }
286     return nullptr;
287   }
288 
289   bool can_be_instantiated() {
290     assert(is_loaded(), "must be loaded");
291     return !is_interface() && !is_abstract();
292   }
293 
294   bool has_trusted_loader() const {
295     return _has_trusted_loader;
296   }
297   GrowableArray<ciInstanceKlass*>* transitive_interfaces() const;
298 




299   // Replay support
300 
301   // Dump the current state of this klass for compilation replay.
302   virtual void dump_replay_data(outputStream* out);
303 
304   static void dump_replay_instanceKlass(outputStream* out, InstanceKlass* ik);
305 
306 
307   // Return stable class name suitable for replay file.
308   const char *replay_name() const;
309 
310 #ifdef ASSERT
311   bool debug_final_field_at(int offset);
312   bool debug_stable_field_at(int offset);
313 #endif
314 };
315 
316 #endif // SHARE_CI_CIINSTANCEKLASS_HPP

  1 /*
  2  * Copyrigt (c) 1999, 2023, 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  *

279   // What kind of ciObject is this?
280   bool is_instance_klass() const { return true; }
281 
282   virtual ciKlass* exact_klass() {
283     if (is_loaded() && is_final() && !is_interface()) {
284       return this;
285     }
286     return nullptr;
287   }
288 
289   bool can_be_instantiated() {
290     assert(is_loaded(), "must be loaded");
291     return !is_interface() && !is_abstract();
292   }
293 
294   bool has_trusted_loader() const {
295     return _has_trusted_loader;
296   }
297   GrowableArray<ciInstanceKlass*>* transitive_interfaces() const;
298 
299   int hash_offset_in_bytes() const {
300     return get_instanceKlass()->hash_offset_in_bytes(nullptr);
301   }
302 
303   // Replay support
304 
305   // Dump the current state of this klass for compilation replay.
306   virtual void dump_replay_data(outputStream* out);
307 
308   static void dump_replay_instanceKlass(outputStream* out, InstanceKlass* ik);
309 
310 
311   // Return stable class name suitable for replay file.
312   const char *replay_name() const;
313 
314 #ifdef ASSERT
315   bool debug_final_field_at(int offset);
316   bool debug_stable_field_at(int offset);
317 #endif
318 };
319 
320 #endif // SHARE_CI_CIINSTANCEKLASS_HPP
< prev index next >