hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
changeset 24424 2658d7834c6e
parent 22503 45d730e9202e
child 24459 ebd373039673
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2014, 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.
    41 #include "prims/methodComparator.hpp"
    41 #include "prims/methodComparator.hpp"
    42 #include "runtime/deoptimization.hpp"
    42 #include "runtime/deoptimization.hpp"
    43 #include "runtime/relocator.hpp"
    43 #include "runtime/relocator.hpp"
    44 #include "utilities/bitMap.inline.hpp"
    44 #include "utilities/bitMap.inline.hpp"
    45 
    45 
       
    46 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
    46 
    47 
    47 Array<Method*>* VM_RedefineClasses::_old_methods = NULL;
    48 Array<Method*>* VM_RedefineClasses::_old_methods = NULL;
    48 Array<Method*>* VM_RedefineClasses::_new_methods = NULL;
    49 Array<Method*>* VM_RedefineClasses::_new_methods = NULL;
    49 Method**  VM_RedefineClasses::_matching_old_methods = NULL;
    50 Method**  VM_RedefineClasses::_matching_old_methods = NULL;
    50 Method**  VM_RedefineClasses::_matching_new_methods = NULL;
    51 Method**  VM_RedefineClasses::_matching_new_methods = NULL;
  1902 
  1903 
  1903 // Rewrite a constant pool reference at the current position in
  1904 // Rewrite a constant pool reference at the current position in
  1904 // annotations_typeArray if needed. Returns the original constant
  1905 // annotations_typeArray if needed. Returns the original constant
  1905 // pool reference if a rewrite was not needed or the new constant
  1906 // pool reference if a rewrite was not needed or the new constant
  1906 // pool reference if a rewrite was needed.
  1907 // pool reference if a rewrite was needed.
       
  1908 PRAGMA_DIAG_PUSH
       
  1909 PRAGMA_FORMAT_NONLITERAL_IGNORED
  1907 u2 VM_RedefineClasses::rewrite_cp_ref_in_annotation_data(
  1910 u2 VM_RedefineClasses::rewrite_cp_ref_in_annotation_data(
  1908      AnnotationArray* annotations_typeArray, int &byte_i_ref,
  1911      AnnotationArray* annotations_typeArray, int &byte_i_ref,
  1909      const char * trace_mesg, TRAPS) {
  1912      const char * trace_mesg, TRAPS) {
  1910 
  1913 
  1911   address cp_index_addr = (address)
  1914   address cp_index_addr = (address)
  1918     old_cp_index = new_cp_index;
  1921     old_cp_index = new_cp_index;
  1919   }
  1922   }
  1920   byte_i_ref += 2;
  1923   byte_i_ref += 2;
  1921   return old_cp_index;
  1924   return old_cp_index;
  1922 }
  1925 }
       
  1926 PRAGMA_DIAG_POP
  1923 
  1927 
  1924 
  1928 
  1925 // Rewrite constant pool references in the element_value portion of an
  1929 // Rewrite constant pool references in the element_value portion of an
  1926 // annotations_typeArray. This "structure" is from section 4.8.15.1 of
  1930 // annotations_typeArray. This "structure" is from section 4.8.15.1 of
  1927 // the 2nd-edition of the VM spec:
  1931 // the 2nd-edition of the VM spec: