< prev index next >

src/hotspot/share/interpreter/rewriter.hpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_INTERPRETER_REWRITER_HPP
  26 #define SHARE_VM_INTERPRETER_REWRITER_HPP
  27 
  28 #include "memory/allocation.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "utilities/growableArray.hpp"
  31 
  32 // The Rewriter adds caches to the constant pool and rewrites bytecode indices
  33 // pointing into the constant pool for better interpreter performance.
  34 
  35 class Rewriter: public StackObj {
  36  private:
  37   InstanceKlass*      _klass;
  38   constantPoolHandle  _pool;
  39   Array<Method*>*     _methods;
  40   GrowableArray<int>  _cp_map;
  41   GrowableArray<int>  _cp_cache_map;  // for Methodref, Fieldref,
  42                                       // InterfaceMethodref and InvokeDynamic
  43   GrowableArray<int>  _reference_map; // maps from cp index to resolved_refs index (or -1)
  44   GrowableArray<int>  _resolved_references_map; // for strings, methodHandle, methodType
  45   GrowableArray<int>  _invokedynamic_references_map; // for invokedynamic resolved refs
  46   GrowableArray<int>  _method_handle_invokers;
  47   int                 _resolved_reference_limit;
  48 
  49   // For mapping invokedynamic bytecodes, which are discovered during method




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_INTERPRETER_REWRITER_HPP
  26 #define SHARE_VM_INTERPRETER_REWRITER_HPP
  27 
  28 #include "memory/allocation.hpp"

  29 #include "utilities/growableArray.hpp"
  30 
  31 // The Rewriter adds caches to the constant pool and rewrites bytecode indices
  32 // pointing into the constant pool for better interpreter performance.
  33 
  34 class Rewriter: public StackObj {
  35  private:
  36   InstanceKlass*      _klass;
  37   constantPoolHandle  _pool;
  38   Array<Method*>*     _methods;
  39   GrowableArray<int>  _cp_map;
  40   GrowableArray<int>  _cp_cache_map;  // for Methodref, Fieldref,
  41                                       // InterfaceMethodref and InvokeDynamic
  42   GrowableArray<int>  _reference_map; // maps from cp index to resolved_refs index (or -1)
  43   GrowableArray<int>  _resolved_references_map; // for strings, methodHandle, methodType
  44   GrowableArray<int>  _invokedynamic_references_map; // for invokedynamic resolved refs
  45   GrowableArray<int>  _method_handle_invokers;
  46   int                 _resolved_reference_limit;
  47 
  48   // For mapping invokedynamic bytecodes, which are discovered during method


< prev index next >