/
githubmirror
/
panama-vector
Обзор
Документация
Войти
/
githubmirror
/
panama-vector
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/hotspot/share/oops/cpCache.inline.hpp
82 строки
3 KB
David Simms
8389219: Implement JEP 401: Value Objects (Preview)
31 июл 2026, 03:45
31 июл 2026, 03:45
cc278db
Код
Авторство
О чём код?
/* * Copyright (c) 2018, 2026, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. * */ #ifndef SHARE_OOPS_CPCACHE_INLINE_HPP #define SHARE_OOPS_CPCACHE_INLINE_HPP #include "oops/cpCache.hpp" #include "oops/oopCast.inline.hpp" #include "oops/oopHandle.inline.hpp" #include "oops/resolvedFieldEntry.hpp" #include "oops/resolvedIndyEntry.hpp" #include "oops/resolvedMethodEntry.hpp" #include "runtime/atomicAccess.hpp" // Constructor inline ConstantPoolCache::ConstantPoolCache(const intStack& invokedynamic_references_map, Array<ResolvedIndyEntry>* invokedynamic_info, Array<ResolvedFieldEntry>* field_entries, Array<ResolvedMethodEntry>* method_entries) : _constant_pool(nullptr), _gc_epoch(0), _resolved_indy_entries(invokedynamic_info), _resolved_field_entries(field_entries), _resolved_method_entries(method_entries) { CDS_JAVA_HEAP_ONLY(_archived_references_index = -1;) } inline refArrayOop ConstantPoolCache::resolved_references() { oop obj = _resolved_references.resolve(); assert(obj == nullptr || obj->is_refArray(), "should be refArray"); return obj == nullptr ? nullptr : oop_cast<refArrayOop>(obj); } inline ResolvedFieldEntry* ConstantPoolCache::resolved_field_entry_at(int field_index) const { return _resolved_field_entries->adr_at(field_index); } inline int ConstantPoolCache::resolved_field_entries_length() const { return _resolved_field_entries->length(); } inline ResolvedMethodEntry* ConstantPoolCache::resolved_method_entry_at(int method_index) const { return _resolved_method_entries->adr_at(method_index); } inline int ConstantPoolCache::resolved_method_entries_length() const { return _resolved_method_entries->length(); } inline ResolvedIndyEntry* ConstantPoolCache::resolved_indy_entry_at(int index) const { return _resolved_indy_entries->adr_at(index); } inline int ConstantPoolCache::resolved_indy_entries_length() const { if (_resolved_indy_entries == nullptr) { return 0; } return _resolved_indy_entries->length(); } #endif // SHARE_OOPS_CPCACHE_INLINE_HPP