src/hotspot/share/interpreter/bytecode.cpp
changeset 48826 c4d9d1b08e2e
parent 47216 71c04702a3d5
child 49189 41e570d862b4
--- a/src/hotspot/share/interpreter/bytecode.cpp	Wed Jan 31 10:55:49 2018 -0800
+++ b/src/hotspot/share/interpreter/bytecode.cpp	Fri Sep 08 10:46:46 2017 -0700
@@ -207,8 +207,7 @@
 
 BasicType Bytecode_loadconstant::result_type() const {
   int index = pool_index();
-  constantTag tag = _method->constants()->tag_at(index);
-  return tag.basic_type();
+  return _method->constants()->basic_type_for_constant_at(index);
 }
 
 oop Bytecode_loadconstant::resolve_constant(TRAPS) const {
@@ -217,6 +216,8 @@
   ConstantPool* constants = _method->constants();
   if (has_cache_index()) {
     return constants->resolve_cached_constant_at(index, THREAD);
+  } else if (_method->constants()->tag_at(index).is_dynamic_constant()) {
+    return constants->resolve_possibly_cached_constant_at(index, THREAD);
   } else {
     return constants->resolve_constant_at(index, THREAD);
   }