< prev index next >

src/hotspot/share/interpreter/bytecode.cpp

Print this page
rev 56755 : 8233159: Method::result_type should use calculated value in constMethod
Reviewed-by: lfoltan


 130 }
 131 
 132 
 133 Symbol* Bytecode_member_ref::klass() const {
 134   return constants()->klass_ref_at_noresolve(index());
 135 }
 136 
 137 
 138 Symbol* Bytecode_member_ref::name() const {
 139   return constants()->name_ref_at(index());
 140 }
 141 
 142 
 143 Symbol* Bytecode_member_ref::signature() const {
 144   return constants()->signature_ref_at(index());
 145 }
 146 
 147 
 148 BasicType Bytecode_member_ref::result_type() const {
 149   ResultTypeFinder rts(signature());
 150   rts.iterate();
 151   return rts.type();
 152 }
 153 
 154 
 155 methodHandle Bytecode_invoke::static_target(TRAPS) {
 156   constantPoolHandle constants(THREAD, this->constants());
 157 
 158   Bytecodes::Code bc = invoke_code();
 159   return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
 160 }
 161 
 162 Handle Bytecode_invoke::appendix(TRAPS) {
 163   ConstantPoolCacheEntry* cpce = cpcache_entry();
 164   if (cpce->has_appendix())
 165     return Handle(THREAD, cpce->appendix_if_resolved(constants()));
 166   return Handle();  // usual case
 167 }
 168 
 169 int Bytecode_member_ref::index() const {
 170   // Note:  Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,




 130 }
 131 
 132 
 133 Symbol* Bytecode_member_ref::klass() const {
 134   return constants()->klass_ref_at_noresolve(index());
 135 }
 136 
 137 
 138 Symbol* Bytecode_member_ref::name() const {
 139   return constants()->name_ref_at(index());
 140 }
 141 
 142 
 143 Symbol* Bytecode_member_ref::signature() const {
 144   return constants()->signature_ref_at(index());
 145 }
 146 
 147 
 148 BasicType Bytecode_member_ref::result_type() const {
 149   ResultTypeFinder rts(signature());

 150   return rts.type();
 151 }
 152 
 153 
 154 methodHandle Bytecode_invoke::static_target(TRAPS) {
 155   constantPoolHandle constants(THREAD, this->constants());
 156 
 157   Bytecodes::Code bc = invoke_code();
 158   return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
 159 }
 160 
 161 Handle Bytecode_invoke::appendix(TRAPS) {
 162   ConstantPoolCacheEntry* cpce = cpcache_entry();
 163   if (cpce->has_appendix())
 164     return Handle(THREAD, cpce->appendix_if_resolved(constants()));
 165   return Handle();  // usual case
 166 }
 167 
 168 int Bytecode_member_ref::index() const {
 169   // Note:  Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,


< prev index next >