8064811: Use THEAD instead of CHECK_NULL in return statements

Tue, 16 Oct 2018 10:40:23 -0400

author
phh
date
Tue, 16 Oct 2018 10:40:23 -0400
changeset 9507
7e72702243a4
parent 9499
778ff2150570
child 9508
451871d094b9

8064811: Use THEAD instead of CHECK_NULL in return statements
Summary: Backport from JDK9
Reviewed-by: dholmes, coffeys

src/os/aix/vm/perfMemory_aix.cpp file | annotate | diff | comparison | revisions
src/os/bsd/vm/perfMemory_bsd.cpp file | annotate | diff | comparison | revisions
src/os/linux/vm/perfMemory_linux.cpp file | annotate | diff | comparison | revisions
src/os/solaris/vm/perfMemory_solaris.cpp file | annotate | diff | comparison | revisions
src/share/vm/ci/ciReplay.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/classLoaderData.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/defaultMethods.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/javaClasses.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/systemDictionary.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/verificationType.hpp file | annotate | diff | comparison | revisions
src/share/vm/memory/allocation.cpp file | annotate | diff | comparison | revisions
src/share/vm/memory/oopFactory.hpp file | annotate | diff | comparison | revisions
src/share/vm/oops/constantPool.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/instanceKlass.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/klass.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/methodData.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/objArrayKlass.cpp file | annotate | diff | comparison | revisions
src/share/vm/oops/typeArrayKlass.cpp file | annotate | diff | comparison | revisions
src/share/vm/prims/methodHandles.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/fieldDescriptor.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/reflection.cpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/synchronizer.hpp file | annotate | diff | comparison | revisions
src/share/vm/utilities/array.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/os/aix/vm/perfMemory_aix.cpp	Sun Oct 14 20:44:38 2018 -0400
     1.2 +++ b/src/os/aix/vm/perfMemory_aix.cpp	Tue Oct 16 10:40:23 2018 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
     1.7   * Copyright 2012, 2013 SAP AG. All rights reserved.
     1.8   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.9   *
    1.10 @@ -706,7 +706,7 @@
    1.11  // return the name of the user that owns the JVM indicated by the given vmid.
    1.12  //
    1.13  static char* get_user_name(int vmid, TRAPS) {
    1.14 -  return get_user_name_slow(vmid, CHECK_NULL);
    1.15 +  return get_user_name_slow(vmid, THREAD);
    1.16  }
    1.17  
    1.18  // return the file name of the backing store file for the named
     2.1 --- a/src/os/bsd/vm/perfMemory_bsd.cpp	Sun Oct 14 20:44:38 2018 -0400
     2.2 +++ b/src/os/bsd/vm/perfMemory_bsd.cpp	Tue Oct 16 10:40:23 2018 -0400
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -615,7 +615,7 @@
    2.11  // return the name of the user that owns the JVM indicated by the given vmid.
    2.12  //
    2.13  static char* get_user_name(int vmid, TRAPS) {
    2.14 -  return get_user_name_slow(vmid, CHECK_NULL);
    2.15 +  return get_user_name_slow(vmid, THREAD);
    2.16  }
    2.17  
    2.18  // return the file name of the backing store file for the named
     3.1 --- a/src/os/linux/vm/perfMemory_linux.cpp	Sun Oct 14 20:44:38 2018 -0400
     3.2 +++ b/src/os/linux/vm/perfMemory_linux.cpp	Tue Oct 16 10:40:23 2018 -0400
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -627,7 +627,7 @@
    3.11  // return the name of the user that owns the JVM indicated by the given vmid.
    3.12  //
    3.13  static char* get_user_name(int vmid, TRAPS) {
    3.14 -  return get_user_name_slow(vmid, CHECK_NULL);
    3.15 +  return get_user_name_slow(vmid, THREAD);
    3.16  }
    3.17  
    3.18  // return the file name of the backing store file for the named
     4.1 --- a/src/os/solaris/vm/perfMemory_solaris.cpp	Sun Oct 14 20:44:38 2018 -0400
     4.2 +++ b/src/os/solaris/vm/perfMemory_solaris.cpp	Tue Oct 16 10:40:23 2018 -0400
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -666,7 +666,7 @@
    4.11    // since the structured procfs and old procfs interfaces can't be
    4.12    // mixed, we attempt to find the file through a directory search.
    4.13  
    4.14 -  return get_user_name_slow(vmid, CHECK_NULL);
    4.15 +  return get_user_name_slow(vmid, THREAD);
    4.16  }
    4.17  
    4.18  // return the file name of the backing store file for the named
     5.1 --- a/src/share/vm/ci/ciReplay.cpp	Sun Oct 14 20:44:38 2018 -0400
     5.2 +++ b/src/share/vm/ci/ciReplay.cpp	Tue Oct 16 10:40:23 2018 -0400
     5.3 @@ -1,4 +1,5 @@
     5.4 -/* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     5.5 +/*
     5.6 + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -329,7 +330,7 @@
    5.11    // Lookup a klass
    5.12    Klass* resolve_klass(const char* klass, TRAPS) {
    5.13      Symbol* klass_name = SymbolTable::lookup(klass, (int)strlen(klass), CHECK_NULL);
    5.14 -    return SystemDictionary::resolve_or_fail(klass_name, _loader, _protection_domain, true, CHECK_NULL);
    5.15 +    return SystemDictionary::resolve_or_fail(klass_name, _loader, _protection_domain, true, THREAD);
    5.16    }
    5.17  
    5.18    // Parse the standard tuple of <klass> <name> <signature>
     6.1 --- a/src/share/vm/classfile/classLoaderData.cpp	Sun Oct 14 20:44:38 2018 -0400
     6.2 +++ b/src/share/vm/classfile/classLoaderData.cpp	Tue Oct 16 10:40:23 2018 -0400
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -488,7 +488,7 @@
    6.11  // These anonymous class loaders are to contain classes used for JSR292
    6.12  ClassLoaderData* ClassLoaderData::anonymous_class_loader_data(oop loader, TRAPS) {
    6.13    // Add a new class loader data to the graph.
    6.14 -  return ClassLoaderDataGraph::add(loader, true, CHECK_NULL);
    6.15 +  return ClassLoaderDataGraph::add(loader, true, THREAD);
    6.16  }
    6.17  
    6.18  const char* ClassLoaderData::loader_name() {
     7.1 --- a/src/share/vm/classfile/defaultMethods.cpp	Sun Oct 14 20:44:38 2018 -0400
     7.2 +++ b/src/share/vm/classfile/defaultMethods.cpp	Tue Oct 16 10:40:23 2018 -0400
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -493,7 +493,7 @@
    7.11  };
    7.12  
    7.13  Symbol* MethodFamily::generate_no_defaults_message(TRAPS) const {
    7.14 -  return SymbolTable::new_symbol("No qualifying defaults found", CHECK_NULL);
    7.15 +  return SymbolTable::new_symbol("No qualifying defaults found", THREAD);
    7.16  }
    7.17  
    7.18  Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method, TRAPS) const {
     8.1 --- a/src/share/vm/classfile/javaClasses.cpp	Sun Oct 14 20:44:38 2018 -0400
     8.2 +++ b/src/share/vm/classfile/javaClasses.cpp	Tue Oct 16 10:40:23 2018 -0400
     8.3 @@ -1961,7 +1961,7 @@
     8.4    // This class is eagerly initialized during VM initialization, since we keep a refence
     8.5    // to one of the methods
     8.6    assert(InstanceKlass::cast(klass)->is_initialized(), "must be initialized");
     8.7 -  return InstanceKlass::cast(klass)->allocate_instance_handle(CHECK_NH);
     8.8 +  return InstanceKlass::cast(klass)->allocate_instance_handle(THREAD);
     8.9  }
    8.10  
    8.11  oop java_lang_reflect_Method::clazz(oop reflect) {
     9.1 --- a/src/share/vm/classfile/systemDictionary.cpp	Sun Oct 14 20:44:38 2018 -0400
     9.2 +++ b/src/share/vm/classfile/systemDictionary.cpp	Tue Oct 16 10:40:23 2018 -0400
     9.3 @@ -121,7 +121,7 @@
     9.4  
     9.5  ClassLoaderData* SystemDictionary::register_loader(Handle class_loader, TRAPS) {
     9.6    if (class_loader() == NULL) return ClassLoaderData::the_null_class_loader_data();
     9.7 -  return ClassLoaderDataGraph::find_or_create(class_loader, CHECK_NULL);
     9.8 +  return ClassLoaderDataGraph::find_or_create(class_loader, THREAD);
     9.9  }
    9.10  
    9.11  // ----------------------------------------------------------------------------
    10.1 --- a/src/share/vm/classfile/verificationType.hpp	Sun Oct 14 20:44:38 2018 -0400
    10.2 +++ b/src/share/vm/classfile/verificationType.hpp	Tue Oct 16 10:40:23 2018 -0400
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -289,7 +289,7 @@
   10.11            if (is_reference() && from.is_reference()) {
   10.12              return is_reference_assignable_from(from, context,
   10.13                                                  from_field_is_protected,
   10.14 -                                                CHECK_false);
   10.15 +                                                THREAD);
   10.16            } else {
   10.17              return false;
   10.18            }
    11.1 --- a/src/share/vm/memory/allocation.cpp	Sun Oct 14 20:44:38 2018 -0400
    11.2 +++ b/src/share/vm/memory/allocation.cpp	Tue Oct 16 10:40:23 2018 -0400
    11.3 @@ -1,5 +1,5 @@
    11.4  /*
    11.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    11.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    11.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    11.8   *
    11.9   * This code is free software; you can redistribute it and/or modify it
   11.10 @@ -66,8 +66,7 @@
   11.11                                   size_t word_size, bool read_only,
   11.12                                   MetaspaceObj::Type type, TRAPS) throw() {
   11.13    // Klass has it's own operator new
   11.14 -  return Metaspace::allocate(loader_data, word_size, read_only,
   11.15 -                             type, CHECK_NULL);
   11.16 +  return Metaspace::allocate(loader_data, word_size, read_only, type, THREAD);
   11.17  }
   11.18  
   11.19  bool MetaspaceObj::is_shared() const {
    12.1 --- a/src/share/vm/memory/oopFactory.hpp	Sun Oct 14 20:44:38 2018 -0400
    12.2 +++ b/src/share/vm/memory/oopFactory.hpp	Tue Oct 16 10:40:23 2018 -0400
    12.3 @@ -1,5 +1,5 @@
    12.4  /*
    12.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    12.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    12.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.8   *
    12.9   * This code is free software; you can redistribute it and/or modify it
   12.10 @@ -41,20 +41,20 @@
   12.11  class oopFactory: AllStatic {
   12.12   public:
   12.13    // Basic type leaf array allocation
   12.14 -  static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, CHECK_NULL); }
   12.15 -  static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, CHECK_NULL); }
   12.16 -  static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, CHECK_NULL); }
   12.17 -  static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, CHECK_NULL); }
   12.18 -  static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, CHECK_NULL); }
   12.19 -  static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, CHECK_NULL); }
   12.20 -  static typeArrayOop    new_intArray   (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, CHECK_NULL); }
   12.21 -  static typeArrayOop    new_longArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, CHECK_NULL); }
   12.22 +  static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, THREAD); }
   12.23 +  static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, THREAD); }
   12.24 +  static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, THREAD); }
   12.25 +  static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, THREAD); }
   12.26 +  static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, THREAD); }
   12.27 +  static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, THREAD); }
   12.28 +  static typeArrayOop    new_intArray   (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, THREAD); }
   12.29 +  static typeArrayOop    new_longArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, THREAD); }
   12.30  
   12.31    // create java.lang.Object[]
   12.32    static objArrayOop     new_objectArray(int length, TRAPS)  {
   12.33      assert(Universe::objectArrayKlassObj() != NULL, "Too early?");
   12.34      return ObjArrayKlass::
   12.35 -      cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL);
   12.36 +      cast(Universe::objectArrayKlassObj())->allocate(length, THREAD);
   12.37    }
   12.38  
   12.39    static typeArrayOop    new_charArray           (const char* utf8_str,  TRAPS);
    13.1 --- a/src/share/vm/oops/constantPool.cpp	Sun Oct 14 20:44:38 2018 -0400
    13.2 +++ b/src/share/vm/oops/constantPool.cpp	Tue Oct 16 10:40:23 2018 -0400
    13.3 @@ -530,7 +530,7 @@
    13.4  
    13.5  
    13.6  Klass* ConstantPool::klass_ref_at(int which, TRAPS) {
    13.7 -  return klass_at(klass_ref_index_at(which), CHECK_NULL);
    13.8 +  return klass_at(klass_ref_index_at(which), THREAD);
    13.9  }
   13.10  
   13.11  
    14.1 --- a/src/share/vm/oops/instanceKlass.cpp	Sun Oct 14 20:44:38 2018 -0400
    14.2 +++ b/src/share/vm/oops/instanceKlass.cpp	Tue Oct 16 10:40:23 2018 -0400
    14.3 @@ -1,5 +1,5 @@
    14.4  /*
    14.5 - * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
    14.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    14.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.8   *
    14.9   * This code is free software; you can redistribute it and/or modify it
   14.10 @@ -581,7 +581,7 @@
   14.11    // 1) Verify the bytecodes
   14.12    Verifier::Mode mode =
   14.13      throw_verifyerror ? Verifier::ThrowException : Verifier::NoException;
   14.14 -  return Verifier::verify(this_oop, mode, this_oop->should_verify_class(), CHECK_false);
   14.15 +  return Verifier::verify(this_oop, mode, this_oop->should_verify_class(), THREAD);
   14.16  }
   14.17  
   14.18  
   14.19 @@ -1195,7 +1195,7 @@
   14.20    if (or_null) {
   14.21      return oak->array_klass_or_null(n);
   14.22    }
   14.23 -  return oak->array_klass(n, CHECK_NULL);
   14.24 +  return oak->array_klass(n, THREAD);
   14.25  }
   14.26  
   14.27  Klass* InstanceKlass::array_klass_impl(bool or_null, TRAPS) {
    15.1 --- a/src/share/vm/oops/klass.cpp	Sun Oct 14 20:44:38 2018 -0400
    15.2 +++ b/src/share/vm/oops/klass.cpp	Tue Oct 16 10:40:23 2018 -0400
    15.3 @@ -165,7 +165,7 @@
    15.4  
    15.5  void* Klass::operator new(size_t size, ClassLoaderData* loader_data, size_t word_size, TRAPS) throw() {
    15.6    return Metaspace::allocate(loader_data, word_size, /*read_only*/false,
    15.7 -                             MetaspaceObj::ClassType, CHECK_NULL);
    15.8 +                             MetaspaceObj::ClassType, THREAD);
    15.9  }
   15.10  
   15.11  Klass::Klass() {
    16.1 --- a/src/share/vm/oops/methodData.cpp	Sun Oct 14 20:44:38 2018 -0400
    16.2 +++ b/src/share/vm/oops/methodData.cpp	Tue Oct 16 10:40:23 2018 -0400
    16.3 @@ -1,5 +1,5 @@
    16.4  /*
    16.5 - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    16.6 + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    16.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.8   *
    16.9   * This code is free software; you can redistribute it and/or modify it
   16.10 @@ -681,7 +681,7 @@
   16.11    int size = MethodData::compute_allocation_size_in_words(method);
   16.12  
   16.13    return new (loader_data, size, false, MetaspaceObj::MethodDataType, THREAD)
   16.14 -    MethodData(method(), size, CHECK_NULL);
   16.15 +    MethodData(method(), size, THREAD);
   16.16  }
   16.17  
   16.18  int MethodData::bytecode_cell_count(Bytecodes::Code code) {
    17.1 --- a/src/share/vm/oops/objArrayKlass.cpp	Sun Oct 14 20:44:38 2018 -0400
    17.2 +++ b/src/share/vm/oops/objArrayKlass.cpp	Tue Oct 16 10:40:23 2018 -0400
    17.3 @@ -1,5 +1,5 @@
    17.4  /*
    17.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
    17.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    17.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    17.8   *
    17.9   * This code is free software; you can redistribute it and/or modify it
   17.10 @@ -189,7 +189,7 @@
   17.11      if (length <= arrayOopDesc::max_array_length(T_OBJECT)) {
   17.12        int size = objArrayOopDesc::object_size(length);
   17.13        KlassHandle h_k(THREAD, this);
   17.14 -      return (objArrayOop)CollectedHeap::array_allocate(h_k, size, length, CHECK_NULL);
   17.15 +      return (objArrayOop)CollectedHeap::array_allocate(h_k, size, length, THREAD);
   17.16      } else {
   17.17        report_java_out_of_memory("Requested array size exceeds VM limit");
   17.18        JvmtiExport::post_array_size_exhausted();
   17.19 @@ -362,11 +362,11 @@
   17.20    if (or_null) {
   17.21      return ak->array_klass_or_null(n);
   17.22    }
   17.23 -  return ak->array_klass(n, CHECK_NULL);
   17.24 +  return ak->array_klass(n, THREAD);
   17.25  }
   17.26  
   17.27  Klass* ObjArrayKlass::array_klass_impl(bool or_null, TRAPS) {
   17.28 -  return array_klass_impl(or_null, dimension() +  1, CHECK_NULL);
   17.29 +  return array_klass_impl(or_null, dimension() +  1, THREAD);
   17.30  }
   17.31  
   17.32  bool ObjArrayKlass::can_be_primary_super_slow() const {
    18.1 --- a/src/share/vm/oops/typeArrayKlass.cpp	Sun Oct 14 20:44:38 2018 -0400
    18.2 +++ b/src/share/vm/oops/typeArrayKlass.cpp	Tue Oct 16 10:40:23 2018 -0400
    18.3 @@ -1,5 +1,5 @@
    18.4  /*
    18.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    18.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    18.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8   *
    18.9   * This code is free software; you can redistribute it and/or modify it
   18.10 @@ -191,7 +191,7 @@
   18.11    if (or_null) {
   18.12      return h_ak->array_klass_or_null(n);
   18.13    }
   18.14 -  return h_ak->array_klass(n, CHECK_NULL);
   18.15 +  return h_ak->array_klass(n, THREAD);
   18.16  }
   18.17  
   18.18  Klass* TypeArrayKlass::array_klass_impl(bool or_null, TRAPS) {
    19.1 --- a/src/share/vm/prims/methodHandles.cpp	Sun Oct 14 20:44:38 2018 -0400
    19.2 +++ b/src/share/vm/prims/methodHandles.cpp	Tue Oct 16 10:40:23 2018 -0400
    19.3 @@ -1,5 +1,5 @@
    19.4  /*
    19.5 - * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
    19.6 + * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
    19.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.8   *
    19.9   * This code is free software; you can redistribute it and/or modify it
   19.10 @@ -391,12 +391,12 @@
   19.11  // convert the external string or reflective type to an internal signature
   19.12  Symbol* MethodHandles::lookup_signature(oop type_str, bool intern_if_not_found, TRAPS) {
   19.13    if (java_lang_invoke_MethodType::is_instance(type_str)) {
   19.14 -    return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found, CHECK_NULL);
   19.15 +    return java_lang_invoke_MethodType::as_signature(type_str, intern_if_not_found, THREAD);
   19.16    } else if (java_lang_Class::is_instance(type_str)) {
   19.17 -    return java_lang_Class::as_signature(type_str, false, CHECK_NULL);
   19.18 +    return java_lang_Class::as_signature(type_str, false, THREAD);
   19.19    } else if (java_lang_String::is_instance(type_str)) {
   19.20      if (intern_if_not_found) {
   19.21 -      return java_lang_String::as_symbol(type_str, CHECK_NULL);
   19.22 +      return java_lang_String::as_symbol(type_str, THREAD);
   19.23      } else {
   19.24        return java_lang_String::as_symbol_or_null(type_str);
   19.25      }
    20.1 --- a/src/share/vm/runtime/fieldDescriptor.cpp	Sun Oct 14 20:44:38 2018 -0400
    20.2 +++ b/src/share/vm/runtime/fieldDescriptor.cpp	Tue Oct 16 10:40:23 2018 -0400
    20.3 @@ -1,5 +1,5 @@
    20.4  /*
    20.5 - * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    20.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    20.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    20.8   *
    20.9   * This code is free software; you can redistribute it and/or modify it
   20.10 @@ -94,7 +94,7 @@
   20.11  }
   20.12  
   20.13  oop fieldDescriptor::string_initial_value(TRAPS) const {
   20.14 -  return constants()->uncached_string_at(initial_value_index(), CHECK_0);
   20.15 +  return constants()->uncached_string_at(initial_value_index(), THREAD);
   20.16  }
   20.17  
   20.18  void fieldDescriptor::reinitialize(InstanceKlass* ik, int index) {
    21.1 --- a/src/share/vm/runtime/reflection.cpp	Sun Oct 14 20:44:38 2018 -0400
    21.2 +++ b/src/share/vm/runtime/reflection.cpp	Tue Oct 16 10:40:23 2018 -0400
    21.3 @@ -1,5 +1,5 @@
    21.4  /*
    21.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
    21.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
    21.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.8   *
    21.9   * This code is free software; you can redistribute it and/or modify it
   21.10 @@ -682,7 +682,7 @@
   21.11  }
   21.12  
   21.13  objArrayHandle Reflection::get_exception_types(methodHandle method, TRAPS) {
   21.14 -  return method->resolved_checked_exceptions(CHECK_(objArrayHandle()));
   21.15 +  return method->resolved_checked_exceptions(THREAD);
   21.16  }
   21.17  
   21.18  
    22.1 --- a/src/share/vm/runtime/synchronizer.hpp	Sun Oct 14 20:44:38 2018 -0400
    22.2 +++ b/src/share/vm/runtime/synchronizer.hpp	Tue Oct 16 10:40:23 2018 -0400
    22.3 @@ -1,5 +1,5 @@
    22.4  /*
    22.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
    22.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
    22.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    22.8   *
    22.9   * This code is free software; you can redistribute it and/or modify it
   22.10 @@ -161,7 +161,7 @@
   22.11    void waitUninterruptibly (TRAPS) { ObjectSynchronizer::waitUninterruptibly (_obj, 0, CHECK);}
   22.12    // complete_exit gives up lock completely, returning recursion count
   22.13    // reenter reclaims lock with original recursion count
   22.14 -  intptr_t complete_exit(TRAPS) { return  ObjectSynchronizer::complete_exit(_obj, CHECK_0); }
   22.15 +  intptr_t complete_exit(TRAPS) { return  ObjectSynchronizer::complete_exit(_obj, THREAD); }
   22.16    void reenter(intptr_t recursion, TRAPS) { ObjectSynchronizer::reenter(_obj, recursion, CHECK); }
   22.17  };
   22.18  
    23.1 --- a/src/share/vm/utilities/array.hpp	Sun Oct 14 20:44:38 2018 -0400
    23.2 +++ b/src/share/vm/utilities/array.hpp	Tue Oct 16 10:40:23 2018 -0400
    23.3 @@ -1,5 +1,5 @@
    23.4  /*
    23.5 - * Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
    23.6 + * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
    23.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    23.8   *
    23.9   * This code is free software; you can redistribute it and/or modify it
   23.10 @@ -322,7 +322,7 @@
   23.11    void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
   23.12      size_t word_size = Array::size(length);
   23.13      return (void*) Metaspace::allocate(loader_data, word_size, read_only,
   23.14 -                                       MetaspaceObj::array_type(sizeof(T)), CHECK_NULL);
   23.15 +                                       MetaspaceObj::array_type(sizeof(T)), THREAD);
   23.16    }
   23.17  
   23.18    static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }

mercurial