7036021: G1: build failure on win64 and linux with hs21 in jdk6 build environment
authorjohnc
Fri, 15 Apr 2011 10:10:50 -0700
changeset 9185 7b717a00a48e
parent 9184 a38a0434a5ff
child 9186 7e9f22667cfc
7036021: G1: build failure on win64 and linux with hs21 in jdk6 build environment Summary: Missing parentheses around a casted expression and some missing casts were causing build failures with the jdk6 build tools. Reviewed-by: kvn, brutisso
hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp
hotspot/src/share/vm/opto/library_call.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp	Thu Apr 14 13:49:29 2011 -0700
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp	Fri Apr 15 10:10:50 2011 -0700
@@ -172,7 +172,7 @@
 
   // hash a given key (index of card_ptr) with the specified size
   static unsigned int hash(size_t key, size_t size) {
-    return (unsigned int) key % size;
+    return (unsigned int) (key % size);
   }
 
   // hash a given key (index of card_ptr)
@@ -180,11 +180,11 @@
     return hash(key, _n_card_counts);
   }
 
-  unsigned ptr_2_card_num(jbyte* card_ptr) {
-    return (unsigned) (card_ptr - _ct_bot);
+  unsigned int ptr_2_card_num(jbyte* card_ptr) {
+    return (unsigned int) (card_ptr - _ct_bot);
   }
 
-  jbyte* card_num_2_ptr(unsigned card_num) {
+  jbyte* card_num_2_ptr(unsigned int card_num) {
     return (jbyte*) (_ct_bot + card_num);
   }
 
--- a/hotspot/src/share/vm/opto/library_call.cpp	Thu Apr 14 13:49:29 2011 -0700
+++ b/hotspot/src/share/vm/opto/library_call.cpp	Fri Apr 15 10:10:50 2011 -0700
@@ -2193,7 +2193,7 @@
         // Use the pre-barrier to record the value in the referent field
         pre_barrier(false /* do_load */,
                     __ ctrl(),
-                    NULL /* obj */, NULL /* adr */, -1 /* alias_idx */, NULL /* val */, NULL /* val_type */,
+                    NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */,
                     pre_val /* pre_val */,
                     T_OBJECT);
 
@@ -5419,7 +5419,7 @@
   // Use the pre-barrier to record the value in the referent field
   pre_barrier(false /* do_load */,
               control(),
-              NULL /* obj */, NULL /* adr */, -1 /* alias_idx */, NULL /* val */, NULL /* val_type */,
+              NULL /* obj */, NULL /* adr */, max_juint /* alias_idx */, NULL /* val */, NULL /* val_type */,
               result /* pre_val */,
               T_OBJECT);