Merge
authorcoleenp
Wed, 10 May 2017 14:03:33 +0000
changeset 46450 7a361ede7817
parent 46449 7b2416f0f524 (current diff)
parent 46448 b5350a83520b (diff)
child 46451 a4a8613c08e9
Merge
hotspot/src/share/vm/utilities/array.hpp
--- a/hotspot/src/cpu/aarch64/vm/c1_FpuStackSim_aarch64.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/cpu/aarch64/vm/c1_FpuStackSim_aarch64.cpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2014, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -23,12 +23,6 @@
  *
  */
 
-#include "precompiled.hpp"
-#include "c1/c1_FpuStackSim.hpp"
-#include "c1/c1_FrameMap.hpp"
-#include "utilities/array.hpp"
-#include "utilities/ostream.hpp"
-
 //--------------------------------------------------------
 //               FpuStackSim
 //--------------------------------------------------------
--- a/hotspot/src/cpu/arm/vm/c1_FpuStackSim_arm.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/cpu/arm/vm/c1_FpuStackSim_arm.cpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, 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
@@ -22,10 +22,4 @@
  *
  */
 
-#include "precompiled.hpp"
-#include "c1/c1_FpuStackSim.hpp"
-#include "c1/c1_FrameMap.hpp"
-#include "utilities/array.hpp"
-#include "utilities/ostream.hpp"
-
 // Nothing needed here
--- a/hotspot/src/cpu/sparc/vm/c1_FpuStackSim_sparc.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/cpu/sparc/vm/c1_FpuStackSim_sparc.cpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, 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
@@ -22,10 +22,4 @@
  *
  */
 
-#include "precompiled.hpp"
-#include "c1/c1_FpuStackSim.hpp"
-#include "c1/c1_FrameMap.hpp"
-#include "utilities/array.hpp"
-#include "utilities/ostream.hpp"
-
 // No FPU stack on SPARC
--- a/hotspot/src/cpu/x86/vm/c1_FpuStackSim_x86.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/cpu/x86/vm/c1_FpuStackSim_x86.cpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, 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
@@ -25,7 +25,7 @@
 #include "precompiled.hpp"
 #include "c1/c1_FpuStackSim.hpp"
 #include "c1/c1_FrameMap.hpp"
-#include "utilities/array.hpp"
+#include "utilities/growableArray.hpp"
 #include "utilities/ostream.hpp"
 
 //--------------------------------------------------------
--- a/hotspot/src/share/vm/aot/aotCompiledMethod.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/aot/aotCompiledMethod.cpp	Wed May 10 14:03:33 2017 +0000
@@ -39,7 +39,6 @@
 #include "runtime/java.hpp"
 #include "runtime/os.hpp"
 #include "runtime/sharedRuntime.hpp"
-#include "utilities/array.hpp"
 #include "utilities/xmlstream.hpp"
 
 #include <stdio.h>
--- a/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/c1/c1_CodeStubs.hpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2017, 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
@@ -31,7 +31,7 @@
 #include "c1/c1_LIR.hpp"
 #include "c1/c1_Runtime1.hpp"
 #include "code/nativeInst.hpp"
-#include "utilities/array.hpp"
+#include "utilities/growableArray.hpp"
 #include "utilities/macros.hpp"
 
 class CodeEmitInfo;
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed May 10 14:03:33 2017 +0000
@@ -64,9 +64,9 @@
 #include "services/classLoadingService.hpp"
 #include "services/threadService.hpp"
 #include "trace/traceMacros.hpp"
-#include "utilities/array.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/globalDefinitions.hpp"
+#include "utilities/growableArray.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/ostream.hpp"
 #include "utilities/resourceHash.hpp"
--- a/hotspot/src/share/vm/memory/metadataFactory.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/memory/metadataFactory.hpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, 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
@@ -26,7 +26,7 @@
 #define SHARE_VM_MEMORY_METADATAFACTORY_HPP
 
 #include "classfile/classLoaderData.hpp"
-#include "utilities/array.hpp"
+#include "oops/array.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- a/hotspot/src/share/vm/memory/universe.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/memory/universe.hpp	Wed May 10 14:03:33 2017 +0000
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_MEMORY_UNIVERSE_HPP
 #define SHARE_VM_MEMORY_UNIVERSE_HPP
 
+#include "oops/array.hpp"
 #include "runtime/handles.hpp"
-#include "utilities/array.hpp"
 #include "utilities/growableArray.hpp"
 
 // Universe is a name space holding known system classes and objects in the VM.
--- a/hotspot/src/share/vm/oops/annotations.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/oops/annotations.hpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2017, 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
@@ -25,9 +25,9 @@
 #ifndef SHARE_VM_OOPS_ANNOTATIONS_HPP
 #define SHARE_VM_OOPS_ANNOTATIONS_HPP
 
+#include "oops/array.hpp"
 #include "oops/metadata.hpp"
 #include "runtime/handles.hpp"
-#include "utilities/array.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/globalDefinitions.hpp"
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/src/share/vm/oops/array.hpp	Wed May 10 14:03:33 2017 +0000
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2000, 2017, 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.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_OOPS_ARRAY_HPP
+#define SHARE_VM_OOPS_ARRAY_HPP
+
+#include "memory/allocation.hpp"
+#include "memory/allocation.inline.hpp"
+#include "memory/metaspace.hpp"
+#include "runtime/orderAccess.hpp"
+
+// Array for metadata allocation
+
+template <typename T>
+class Array: public MetaspaceObj {
+  friend class MetadataFactory;
+  friend class VMStructs;
+  friend class JVMCIVMStructs;
+  friend class MethodHandleCompiler;           // special case
+  friend class WhiteBox;
+protected:
+  int _length;                                 // the number of array elements
+  T   _data[1];                                // the array memory
+
+  void initialize(int length) {
+    _length = length;
+  }
+
+ private:
+  // Turn off copy constructor and assignment operator.
+  Array(const Array<T>&);
+  void operator=(const Array<T>&);
+
+  void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
+    size_t word_size = Array::size(length);
+    return (void*) Metaspace::allocate(loader_data, word_size, read_only,
+                                       MetaspaceObj::array_type(sizeof(T)), THREAD);
+  }
+
+  static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
+
+  // WhiteBox API helper.
+  // Can't distinguish between array of length 0 and length 1,
+  // will always return 0 in those cases.
+  static int bytes_to_length(size_t bytes)       {
+    assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now");
+
+    if (sizeof(Array<T>) >= bytes) {
+      return 0;
+    }
+
+    size_t left = bytes - sizeof(Array<T>);
+    assert(is_size_aligned(left, sizeof(T)), "Must be");
+
+    size_t elements = left / sizeof(T);
+    assert(elements <= (size_t)INT_MAX, "number of elements " SIZE_FORMAT "doesn't fit into an int.", elements);
+
+    int length = (int)elements;
+
+    assert((size_t)size(length) * BytesPerWord == bytes,
+           "Expected: " SIZE_FORMAT " got: " SIZE_FORMAT,
+           bytes, (size_t)size(length) * BytesPerWord);
+
+    return length;
+  }
+
+  explicit Array(int length) : _length(length) {
+    assert(length >= 0, "illegal length");
+  }
+
+  Array(int length, T init) : _length(length) {
+    assert(length >= 0, "illegal length");
+    for (int i = 0; i < length; i++) {
+      _data[i] = init;
+    }
+  }
+
+ public:
+
+  // standard operations
+  int  length() const                 { return _length; }
+  T* data()                           { return _data; }
+  bool is_empty() const               { return length() == 0; }
+
+  int index_of(const T& x) const {
+    int i = length();
+    while (i-- > 0 && _data[i] != x) ;
+
+    return i;
+  }
+
+  // sort the array.
+  bool contains(const T& x) const      { return index_of(x) >= 0; }
+
+  T    at(int i) const                 { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return _data[i]; }
+  void at_put(const int i, const T& x) { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); _data[i] = x; }
+  T*   adr_at(const int i)             { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return &_data[i]; }
+  int  find(const T& x)                { return index_of(x); }
+
+  T at_acquire(const int which)              { return OrderAccess::load_acquire(adr_at(which)); }
+  void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); }
+
+  static int size(int length) {
+    return align_size_up(byte_sizeof(length), BytesPerWord) / BytesPerWord;
+  }
+
+  int size() {
+    return size(_length);
+  }
+
+  static int length_offset_in_bytes() { return (int) (offset_of(Array<T>, _length)); }
+  // Note, this offset don't have to be wordSize aligned.
+  static int base_offset_in_bytes() { return (int) (offset_of(Array<T>, _data)); };
+
+  // FIXME: How to handle this?
+  void print_value_on(outputStream* st) const {
+    st->print("Array<T>(" INTPTR_FORMAT ")", p2i(this));
+  }
+
+#ifndef PRODUCT
+  void print(outputStream* st) {
+     for (int i = 0; i< _length; i++) {
+       st->print_cr("%d: " INTPTR_FORMAT, i, (intptr_t)at(i));
+     }
+  }
+  void print() { print(tty); }
+#endif // PRODUCT
+};
+
+
+#endif // SHARE_VM_OOPS_ARRAY_HPP
--- a/hotspot/src/share/vm/oops/cpCache.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/oops/cpCache.hpp	Wed May 10 14:03:33 2017 +0000
@@ -27,8 +27,8 @@
 
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
+#include "oops/array.hpp"
 #include "runtime/orderAccess.hpp"
-#include "utilities/array.hpp"
 
 class PSPromotionManager;
 
--- a/hotspot/src/share/vm/precompiled/precompiled.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/precompiled/precompiled.hpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2017, 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
@@ -139,6 +139,7 @@
 # include "memory/universe.hpp"
 # include "memory/universe.inline.hpp"
 # include "memory/virtualspace.hpp"
+# include "oops/array.hpp"
 # include "oops/arrayKlass.hpp"
 # include "oops/arrayOop.hpp"
 # include "oops/constMethod.hpp"
@@ -223,7 +224,6 @@
 # include "services/nmtCommon.hpp"
 # include "services/virtualMemoryTracker.hpp"
 # include "utilities/accessFlags.hpp"
-# include "utilities/array.hpp"
 # include "utilities/bitMap.hpp"
 # include "utilities/bitMap.inline.hpp"
 # include "utilities/bytes.hpp"
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Wed May 10 14:03:33 2017 +0000
@@ -39,6 +39,7 @@
 #include "memory/resourceArea.hpp"
 #include "memory/universe.hpp"
 #include "memory/oopFactory.hpp"
+#include "oops/array.hpp"
 #include "oops/constantPool.hpp"
 #include "oops/objArrayKlass.hpp"
 #include "oops/objArrayOop.inline.hpp"
@@ -54,7 +55,6 @@
 #include "runtime/sweeper.hpp"
 #include "runtime/thread.hpp"
 #include "runtime/vm_version.hpp"
-#include "utilities/array.hpp"
 #include "utilities/debug.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed May 10 14:03:33 2017 +0000
@@ -66,6 +66,7 @@
 #include "memory/referenceType.hpp"
 #include "memory/universe.hpp"
 #include "memory/virtualspace.hpp"
+#include "oops/array.hpp"
 #include "oops/arrayKlass.hpp"
 #include "oops/arrayOop.hpp"
 #include "oops/compiledICHolder.hpp"
@@ -101,7 +102,6 @@
 #include "runtime/thread.inline.hpp"
 #include "runtime/vframeArray.hpp"
 #include "runtime/vmStructs.hpp"
-#include "utilities/array.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/hashtable.hpp"
 #include "utilities/macros.hpp"
--- a/hotspot/src/share/vm/utilities/array.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
- * 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.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#ifndef SHARE_VM_UTILITIES_ARRAY_HPP
-#define SHARE_VM_UTILITIES_ARRAY_HPP
-
-#include "memory/allocation.hpp"
-#include "memory/allocation.inline.hpp"
-#include "memory/metaspace.hpp"
-#include "runtime/orderAccess.hpp"
-
-// Arrays for basic types
-typedef GrowableArray<int> intArray;
-typedef GrowableArray<int> intStack;
-typedef GrowableArray<bool> boolArray;
-typedef GrowableArray<bool> boolStack;
-
-// Array for metadata allocation
-
-template <typename T>
-class Array: public MetaspaceObj {
-  friend class MetadataFactory;
-  friend class VMStructs;
-  friend class JVMCIVMStructs;
-  friend class MethodHandleCompiler;           // special case
-  friend class WhiteBox;
-protected:
-  int _length;                                 // the number of array elements
-  T   _data[1];                                // the array memory
-
-  void initialize(int length) {
-    _length = length;
-  }
-
- private:
-  // Turn off copy constructor and assignment operator.
-  Array(const Array<T>&);
-  void operator=(const Array<T>&);
-
-  void* operator new(size_t size, ClassLoaderData* loader_data, int length, bool read_only, TRAPS) throw() {
-    size_t word_size = Array::size(length);
-    return (void*) Metaspace::allocate(loader_data, word_size, read_only,
-                                       MetaspaceObj::array_type(sizeof(T)), THREAD);
-  }
-
-  static size_t byte_sizeof(int length) { return sizeof(Array<T>) + MAX2(length - 1, 0) * sizeof(T); }
-
-  // WhiteBox API helper.
-  // Can't distinguish between array of length 0 and length 1,
-  // will always return 0 in those cases.
-  static int bytes_to_length(size_t bytes)       {
-    assert(is_size_aligned(bytes, BytesPerWord), "Must be, for now");
-
-    if (sizeof(Array<T>) >= bytes) {
-      return 0;
-    }
-
-    size_t left = bytes - sizeof(Array<T>);
-    assert(is_size_aligned(left, sizeof(T)), "Must be");
-
-    size_t elements = left / sizeof(T);
-    assert(elements <= (size_t)INT_MAX, "number of elements " SIZE_FORMAT "doesn't fit into an int.", elements);
-
-    int length = (int)elements;
-
-    assert((size_t)size(length) * BytesPerWord == bytes,
-           "Expected: " SIZE_FORMAT " got: " SIZE_FORMAT,
-           bytes, (size_t)size(length) * BytesPerWord);
-
-    return length;
-  }
-
-  explicit Array(int length) : _length(length) {
-    assert(length >= 0, "illegal length");
-  }
-
-  Array(int length, T init) : _length(length) {
-    assert(length >= 0, "illegal length");
-    for (int i = 0; i < length; i++) {
-      _data[i] = init;
-    }
-  }
-
- public:
-
-  // standard operations
-  int  length() const                 { return _length; }
-  T* data()                           { return _data; }
-  bool is_empty() const               { return length() == 0; }
-
-  int index_of(const T& x) const {
-    int i = length();
-    while (i-- > 0 && _data[i] != x) ;
-
-    return i;
-  }
-
-  // sort the array.
-  bool contains(const T& x) const      { return index_of(x) >= 0; }
-
-  T    at(int i) const                 { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return _data[i]; }
-  void at_put(const int i, const T& x) { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); _data[i] = x; }
-  T*   adr_at(const int i)             { assert(i >= 0 && i< _length, "oob: 0 <= %d < %d", i, _length); return &_data[i]; }
-  int  find(const T& x)                { return index_of(x); }
-
-  T at_acquire(const int which)              { return OrderAccess::load_acquire(adr_at(which)); }
-  void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); }
-
-  static int size(int length) {
-    return align_size_up(byte_sizeof(length), BytesPerWord) / BytesPerWord;
-  }
-
-  int size() {
-    return size(_length);
-  }
-
-  static int length_offset_in_bytes() { return (int) (offset_of(Array<T>, _length)); }
-  // Note, this offset don't have to be wordSize aligned.
-  static int base_offset_in_bytes() { return (int) (offset_of(Array<T>, _data)); };
-
-  // FIXME: How to handle this?
-  void print_value_on(outputStream* st) const {
-    st->print("Array<T>(" INTPTR_FORMAT ")", p2i(this));
-  }
-
-#ifndef PRODUCT
-  void print(outputStream* st) {
-     for (int i = 0; i< _length; i++) {
-       st->print_cr("%d: " INTPTR_FORMAT, i, (intptr_t)at(i));
-     }
-  }
-  void print() { print(tty); }
-#endif // PRODUCT
-};
-
-
-#endif // SHARE_VM_UTILITIES_ARRAY_HPP
--- a/hotspot/src/share/vm/utilities/growableArray.hpp	Thu Oct 13 11:27:20 2016 +0200
+++ b/hotspot/src/share/vm/utilities/growableArray.hpp	Wed May 10 14:03:33 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, 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
@@ -567,4 +567,9 @@
   }
 };
 
+// Arrays for basic types
+typedef GrowableArray<int> intArray;
+typedef GrowableArray<int> intStack;
+typedef GrowableArray<bool> boolArray;
+
 #endif // SHARE_VM_UTILITIES_GROWABLEARRAY_HPP