src/share/vm/oops/constantPool.cpp

changeset 9344
ad057f2e3211
parent 9327
f96fcd9e1e1b
child 9448
73d689add964
child 9507
7e72702243a4
child 9530
9fce84e6f51a
     1.1 --- a/src/share/vm/oops/constantPool.cpp	Wed Jun 27 03:04:33 2018 -0700
     1.2 +++ b/src/share/vm/oops/constantPool.cpp	Wed Jul 04 03:02:43 2018 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -109,6 +109,16 @@
    1.11    return (objArrayOop)JNIHandles::resolve(_resolved_references);
    1.12  }
    1.13  
    1.14 +// Called from outside constant pool resolution where a resolved_reference array
    1.15 +// may not be present.
    1.16 +objArrayOop ConstantPool::resolved_references_or_null() const {
    1.17 +  if (_cache == NULL) {
    1.18 +    return NULL;
    1.19 +  } else {
    1.20 +    return (objArrayOop)JNIHandles::resolve(_resolved_references);
    1.21 +  }
    1.22 +}
    1.23 +
    1.24  // Create resolved_references array and mapping array for original cp indexes
    1.25  // The ldc bytecode was rewritten to have the resolved reference array index so need a way
    1.26  // to map it back for resolving and some unlikely miscellaneous uses.

mercurial