src/hotspot/share/prims/methodComparator.cpp
changeset 53745 a535ba736cab
parent 49982 9042ffe5b7fe
child 59056 15936b142f86
equal deleted inserted replaced
53744:5b78f051912b 53745:a535ba736cab
     1 /*
     1 /*
     2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2000, 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.
   121     cpci_old = _old_cp->invokedynamic_cp_cache_index(cpci_old);
   121     cpci_old = _old_cp->invokedynamic_cp_cache_index(cpci_old);
   122     cpci_new = _new_cp->invokedynamic_cp_cache_index(cpci_new);
   122     cpci_new = _new_cp->invokedynamic_cp_cache_index(cpci_new);
   123 
   123 
   124     int cpi_old = _old_cp->cache()->entry_at(cpci_old)->constant_pool_index();
   124     int cpi_old = _old_cp->cache()->entry_at(cpci_old)->constant_pool_index();
   125     int cpi_new = _new_cp->cache()->entry_at(cpci_new)->constant_pool_index();
   125     int cpi_new = _new_cp->cache()->entry_at(cpci_new)->constant_pool_index();
   126     int bsm_old = _old_cp->invoke_dynamic_bootstrap_method_ref_index_at(cpi_old);
   126     int bsm_old = _old_cp->bootstrap_method_ref_index_at(cpi_old);
   127     int bsm_new = _new_cp->invoke_dynamic_bootstrap_method_ref_index_at(cpi_new);
   127     int bsm_new = _new_cp->bootstrap_method_ref_index_at(cpi_new);
   128     if (!pool_constants_same(bsm_old, bsm_new))
   128     if (!pool_constants_same(bsm_old, bsm_new))
   129       return false;
   129       return false;
   130     int cnt_old = _old_cp->invoke_dynamic_argument_count_at(cpi_old);
   130     int cnt_old = _old_cp->bootstrap_argument_count_at(cpi_old);
   131     int cnt_new = _new_cp->invoke_dynamic_argument_count_at(cpi_new);
   131     int cnt_new = _new_cp->bootstrap_argument_count_at(cpi_new);
   132     if (cnt_old != cnt_new)
   132     if (cnt_old != cnt_new)
   133       return false;
   133       return false;
   134     for (int arg_i = 0; arg_i < cnt_old; arg_i++) {
   134     for (int arg_i = 0; arg_i < cnt_old; arg_i++) {
   135       int idx_old = _old_cp->invoke_dynamic_argument_index_at(cpi_old, arg_i);
   135       int idx_old = _old_cp->bootstrap_argument_index_at(cpi_old, arg_i);
   136       int idx_new = _new_cp->invoke_dynamic_argument_index_at(cpi_new, arg_i);
   136       int idx_new = _new_cp->bootstrap_argument_index_at(cpi_new, arg_i);
   137       if (!pool_constants_same(idx_old, idx_new))
   137       if (!pool_constants_same(idx_old, idx_new))
   138         return false;
   138         return false;
   139     }
   139     }
   140     break;
   140     break;
   141   }
   141   }