src/hotspot/share/interpreter/bytecode.cpp
changeset 59056 15936b142f86
parent 58861 2c3cc4b01880
equal deleted inserted replaced
59055:57ad70bcf06c 59056:15936b142f86
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   149   ResultTypeFinder rts(signature());
   149   ResultTypeFinder rts(signature());
   150   return rts.type();
   150   return rts.type();
   151 }
   151 }
   152 
   152 
   153 
   153 
   154 methodHandle Bytecode_invoke::static_target(TRAPS) {
   154 Method* Bytecode_invoke::static_target(TRAPS) {
   155   constantPoolHandle constants(THREAD, this->constants());
   155   constantPoolHandle constants(THREAD, this->constants());
   156 
   156 
   157   Bytecodes::Code bc = invoke_code();
   157   Bytecodes::Code bc = invoke_code();
   158   return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
   158   return LinkResolver::resolve_method_statically(bc, constants, index(), THREAD);
   159 }
   159 }
   160 
   160 
   161 Handle Bytecode_invoke::appendix(TRAPS) {
   161 Handle Bytecode_invoke::appendix(TRAPS) {
   162   ConstantPoolCacheEntry* cpce = cpcache_entry();
   162   ConstantPoolCacheEntry* cpce = cpcache_entry();
   163   if (cpce->has_appendix())
   163   if (cpce->has_appendix()) {
   164     return Handle(THREAD, cpce->appendix_if_resolved(constants()));
   164     constantPoolHandle cp(THREAD, constants());
       
   165     return Handle(THREAD, cpce->appendix_if_resolved(cp));
       
   166   }
   165   return Handle();  // usual case
   167   return Handle();  // usual case
   166 }
   168 }
   167 
   169 
   168 int Bytecode_member_ref::index() const {
   170 int Bytecode_member_ref::index() const {
   169   // Note:  Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,
   171   // Note:  Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4,