< prev index next >
src/hotspot/share/interpreter/bytecode.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, 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.
@@ -149,21 +149,23 @@
ResultTypeFinder rts(signature());
return rts.type();
}
-methodHandle Bytecode_invoke::static_target(TRAPS) {
+Method* Bytecode_invoke::static_target(TRAPS) {
constantPoolHandle constants(THREAD, this->constants());
Bytecodes::Code bc = invoke_code();
return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
}
Handle Bytecode_invoke::appendix(TRAPS) {
ConstantPoolCacheEntry* cpce = cpcache_entry();
- if (cpce->has_appendix())
- return Handle(THREAD, cpce->appendix_if_resolved(constants()));
+ if (cpce->has_appendix()) {
+ constantPoolHandle cp(THREAD, constants());
+ return Handle(THREAD, cpce->appendix_if_resolved(cp));
+ }
return Handle(); // usual case
}
int Bytecode_member_ref::index() const {
// Note: Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,
< prev index next >