< prev index next >

src/share/vm/prims/methodComparator.hpp

Print this page
rev 10160 : 8149096: Remove unused code in methodComparator
Reviewed-by: coleenp, sspitsyn, dholmes

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2016, 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.

@@ -38,11 +38,10 @@
  private:
   static BytecodeStream *_s_old, *_s_new;
   static ConstantPool* _old_cp;
   static ConstantPool* _new_cp;
   static BciMap *_bci_map;
-  static bool _switchable_test;
   static GrowableArray<int> *_fwd_jmps;
 
   static bool args_same(Bytecodes::Code c_old, Bytecodes::Code c_new);
   static bool pool_constants_same(int cpi_old, int cpi_new);
   static int check_stack_and_locals_size(Method* old_method, Method* new_method);

@@ -53,11 +52,10 @@
   // on the source code level. Practically, we check whether the only difference between
   // method versions is some constantpool indices embedded into the bytecodes, and whether
   // these indices eventually point to the same constants for both method versions.
   static bool methods_EMCP(Method* old_method, Method* new_method);
 
-  static bool methods_switchable(Method* old_method, Method* new_method, BciMap &bci_map);
 };
 
 
 // ByteCode Index Map. For two versions of the same method, where the new version may contain
 // fragments not found in the old version, provides a mapping from an index of a bytecode in

@@ -82,37 +80,10 @@
     free(_old_bci);
     free(_new_st_bci);
     free(_new_end_bci);
   }
 
-  // Store the position of an added fragment, e.g.
-  //
-  //                              |<- old_bci
-  // -----------------------------------------
-  // Old method   |invokevirtual 5|aload 1|...
-  // -----------------------------------------
-  //
-  //                                 |<- new_st_bci          |<- new_end_bci
-  // --------------------------------------------------------------------
-  // New method       |invokevirual 5|aload 2|invokevirtual 6|aload 1|...
-  // --------------------------------------------------------------------
-  //                                 ^^^^^^^^^^^^^^^^^^^^^^^^
-  //                                    Added fragment
-
-  void store_fragment_location(int old_bci, int new_st_bci, int new_end_bci) {
-    if (_cur_pos == _cur_size) {
-      _cur_size += 10;
-      _old_bci = (int*) realloc(_old_bci, sizeof(int) * _cur_size);
-      _new_st_bci = (int*) realloc(_new_st_bci, sizeof(int) * _cur_size);
-      _new_end_bci = (int*) realloc(_new_end_bci, sizeof(int) * _cur_size);
-    }
-    _old_bci[_cur_pos] = old_bci;
-    _new_st_bci[_cur_pos] = new_st_bci;
-    _new_end_bci[_cur_pos] = new_end_bci;
-    _cur_pos++;
-  }
-
   int new_bci_for_old(int old_bci) {
     if (_cur_pos == 0 || old_bci < _old_bci[0]) return old_bci;
     _pos = 1;
     while (_pos < _cur_pos && old_bci >= _old_bci[_pos])
       _pos++;
< prev index next >