changeset 10572:7ac081122b8f

8151439: Inline the BitMap constructor Reviewed-by: tschatzl, pliden, kbarrett
author stefank
date Wed, 09 Mar 2016 12:44:49 +0100
parents 8d5487c9746d
children 04c67174a75f
files src/share/vm/utilities/bitMap.cpp src/share/vm/utilities/bitMap.hpp
diffstat 2 files changed, 2 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/utilities/bitMap.cpp	Wed Mar 09 12:44:12 2016 +0100
+++ b/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/src/share/vm/utilities/bitMap.hpp	Wed Mar 09 12:44:12 2016 +0100
+++ b/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