< prev index next > src/hotspot/share/oops/cpCache.cpp
Print this page
/*
- * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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.
// case, the method gets reresolved with caller for each interface call
// because the actual selected method may not be public.
//
// We set bytecode_2() to _invokevirtual.
// See also interpreterRuntime.cpp. (8/25/2000)
+ invoke_code = Bytecodes::_invokevirtual;
} else {
assert(invoke_code == Bytecodes::_invokevirtual ||
(invoke_code == Bytecodes::_invokeinterface &&
((method->is_private() ||
(method->is_final() && method->method_holder() == vmClasses::Object_klass())))),
// We set bytecode_2() to _invokevirtual.
method_entry->set_bytecode1(invoke_code);
}
}
// set up for invokevirtual, even if linking for invokeinterface also:
- method_entry->set_bytecode2(Bytecodes::_invokevirtual);
+ method_entry->set_bytecode2(invoke_code);
} else {
ShouldNotReachHere();
}
}
// Lock fields to write
Bytecodes::Code invoke_code = Bytecodes::_invokehandle;
JavaThread* current = JavaThread::current();
- objArrayHandle resolved_references(current, constant_pool()->resolved_references());
+ refArrayHandle resolved_references(current, constant_pool()->resolved_references());
// Use the resolved_references() lock for this cpCache entry.
// resolved_references are created for all classes with Invokedynamic, MethodHandle
// or MethodType constant pool cache entries.
assert(resolved_references() != nullptr,
"a resolved_references array should have been created for this class");
// resolved_references are created for all classes with Invokedynamic, MethodHandle
// or MethodType constant pool cache entries.
JavaThread* current = JavaThread::current();
constantPoolHandle cp(current, constant_pool());
- objArrayHandle resolved_references(current, cp->resolved_references());
+ refArrayHandle resolved_references(current, cp->resolved_references());
assert(resolved_references() != nullptr,
"a resolved_references array should have been created for this class");
ObjectLocker ol(resolved_references, current);
assert(index >= 0, "Indy index must be positive at this point");
< prev index next >