8232237: ZGC: Move ZArray inline funtions to zArray.inline.hpp

Reviewed-by: tschatzl
diff --git a/src/hotspot/share/gc/z/zArray.hpp b/src/hotspot/share/gc/z/zArray.hpp
index 1bab29e..378e450 100644
--- a/src/hotspot/share/gc/z/zArray.hpp
+++ b/src/hotspot/share/gc/z/zArray.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, 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
@@ -74,15 +74,13 @@
 template <typename T>
 class ZArrayIterator : public ZArrayIteratorImpl<T, ZARRAY_SERIAL> {
 public:
-  ZArrayIterator(ZArray<T>* array) :
-      ZArrayIteratorImpl<T, ZARRAY_SERIAL>(array) {}
+  ZArrayIterator(ZArray<T>* array);
 };
 
 template <typename T>
 class ZArrayParallelIterator : public ZArrayIteratorImpl<T, ZARRAY_PARALLEL> {
 public:
-  ZArrayParallelIterator(ZArray<T>* array) :
-      ZArrayIteratorImpl<T, ZARRAY_PARALLEL>(array) {}
+  ZArrayParallelIterator(ZArray<T>* array);
 };
 
 #endif // SHARE_GC_Z_ZARRAY_HPP
diff --git a/src/hotspot/share/gc/z/zArray.inline.hpp b/src/hotspot/share/gc/z/zArray.inline.hpp
index 3e92fc5..4a6a17a 100644
--- a/src/hotspot/share/gc/z/zArray.inline.hpp
+++ b/src/hotspot/share/gc/z/zArray.inline.hpp
@@ -117,4 +117,12 @@
   return false;
 }
 
+template <typename T>
+inline ZArrayIterator<T>::ZArrayIterator(ZArray<T>* array) :
+    ZArrayIteratorImpl<T, ZARRAY_SERIAL>(array) {}
+
+template <typename T>
+inline ZArrayParallelIterator<T>::ZArrayParallelIterator(ZArray<T>* array) :
+    ZArrayIteratorImpl<T, ZARRAY_PARALLEL>(array) {}
+
 #endif // SHARE_GC_Z_ZARRAY_INLINE_HPP