8151439: Inline the BitMap constructor
authorstefank
Wed, 09 Mar 2016 12:44:49 +0100
changeset 37058 47faedc8085b
parent 37057 03b3e1870228
child 37059 c482915a21aa
8151439: Inline the BitMap constructor Reviewed-by: tschatzl, pliden, kbarrett
hotspot/src/share/vm/utilities/bitMap.cpp
hotspot/src/share/vm/utilities/bitMap.hpp
--- a/hotspot/src/share/vm/utilities/bitMap.cpp	Wed Mar 09 12:44:12 2016 +0100
+++ b/hotspot/src/share/vm/utilities/bitMap.cpp	Wed Mar 09 12:44:49 2016 +0100
@@ -29,12 +29,7 @@
 #include "utilities/bitMap.inline.hpp"
 #include "utilities/copy.hpp"
 
-BitMap::BitMap(bm_word_t* map, idx_t size_in_bits) :
-  _map(map), _size(size_in_bits)
-{
-  assert(sizeof(bm_word_t) == BytesPerWord, "Implementation assumption.");
-}
-
+STATIC_ASSERT(sizeof(BitMap::bm_word_t) == BytesPerWord); // "Implementation assumption."
 
 BitMap::BitMap(idx_t size_in_bits, bool in_resource_area) :
   _map(NULL), _size(0)
--- a/hotspot/src/share/vm/utilities/bitMap.hpp	Wed Mar 09 12:44:12 2016 +0100
+++ b/hotspot/src/share/vm/utilities/bitMap.hpp	Wed Mar 09 12:44:49 2016 +0100
@@ -116,7 +116,7 @@
   BitMap() : _map(NULL), _size(0) {}
 
   // Constructs a bitmap with the given map and size.
-  BitMap(bm_word_t* map, idx_t size_in_bits);
+  BitMap(bm_word_t* map, idx_t size_in_bits) :_map(map), _size(size_in_bits) {}
 
   // Constructs an empty bitmap of the given size (that is, this clears the
   // new bitmap).  Allocates the map array in resource area if