changeset 8676:bae7d3cdf6af

8205677: [8u] casts and type change for 8u to enable later Windows compilers Reviewed-by: dholmes
author kevinw
date Wed, 11 Jul 2018 02:36:23 -0700
parents aeacee5afc4d
children 80d32985a3eb
files src/share/vm/classfile/altHashing.cpp src/share/vm/classfile/classFileParser.cpp src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp src/share/vm/interpreter/oopMapCache.cpp src/share/vm/interpreter/oopMapCache.hpp src/share/vm/runtime/memprofiler.cpp
diffstat 7 files changed, 16 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/altHashing.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/classfile/altHashing.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2018, 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
@@ -224,7 +224,7 @@
 static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82};
 static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83};
 static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382};
-static const jint ONE_INT[] = { 0x83828180};
+static const jint ONE_INT[] = { (jint) 0x83828180};
 static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85};
 static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584};
 static const jbyte EIGHT_BYTE[] = {
@@ -235,7 +235,7 @@
   (jchar) 0x8180, (jchar) 0x8382,
   (jchar) 0x8584, (jchar) 0x8786};
 
-static const jint TWO_INT[] = { 0x83828180, 0x87868584};
+static const jint TWO_INT[] = { (jint) 0x83828180, (jint) 0x87868584};
 
 static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3;
 
--- a/src/share/vm/classfile/classFileParser.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/classfile/classFileParser.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -275,7 +275,7 @@
             char* str = java_lang_String::as_utf8_string(patch());
             // (could use java_lang_String::as_symbol instead, but might as well batch them)
             utf8_buffer = (u1*) str;
-            utf8_length = (int) strlen(str);
+            utf8_length = (u2) strlen(str);
           }
 
           unsigned int hash;
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2018, 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
@@ -6829,7 +6829,7 @@
   size_t start_ofs = heapWordToOffset(mr.start());
   // Make sure that end() is appropriately aligned
   assert(mr.end() == (HeapWord*)round_to((intptr_t)mr.end(),
-                        (1 << (_shifter+LogHeapWordSize))),
+                        ((intptr_t) 1 << (_shifter+LogHeapWordSize))),
          "Misaligned mr.end()");
   size_t end_ofs   = heapWordToOffset(mr.end());
   assert(end_ofs > start_ofs, "Should mark at least one bit");
--- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2018, 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
@@ -1035,7 +1035,7 @@
    if (monitor() != NULL) {
      MonitorSupply::release(monitor());
   }
-  _monitor = (Monitor*) 0xDEAD000F;
+  _monitor = (Monitor*) (uintptr_t) 0xDEAD000F;
 }
 
 void WaitForBarrierGCTask::do_it(GCTaskManager* manager, uint which) {
--- a/src/share/vm/interpreter/oopMapCache.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/interpreter/oopMapCache.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -426,9 +426,9 @@
 
 #ifndef PRODUCT
 
-static long _total_memory_usage = 0;
+static size_t _total_memory_usage = 0;
 
-long OopMapCache::memory_usage() {
+size_t OopMapCache::memory_usage() {
   return _total_memory_usage;
 }
 
--- a/src/share/vm/interpreter/oopMapCache.hpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/interpreter/oopMapCache.hpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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
@@ -176,7 +176,7 @@
   static void compute_one_oop_map(methodHandle method, int bci, InterpreterOopMap* entry);
 
   // Returns total no. of bytes allocated as part of OopMapCache's
-  static long memory_usage()                     PRODUCT_RETURN0;
+  static size_t memory_usage()                     PRODUCT_RETURN0;
 };
 
 #endif // SHARE_VM_INTERPRETER_OOPMAPCACHE_HPP
--- a/src/share/vm/runtime/memprofiler.cpp	Mon Jul 09 15:45:22 2018 +0000
+++ b/src/share/vm/runtime/memprofiler.cpp	Wed Jul 11 02:36:23 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2018, 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
@@ -126,7 +126,7 @@
 
   fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K);
 
-  fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n",
+  fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "\n",
           handles_memory_usage / K,
           resource_memory_usage / K,
           OopMapCache::memory_usage() / K);