8205677: [8u] casts and type change for 8u to enable later Windows compilers

Wed, 11 Jul 2018 02:36:23 -0700

author
kevinw
date
Wed, 11 Jul 2018 02:36:23 -0700
changeset 9351
bae7d3cdf6af
parent 9350
aeacee5afc4d
child 9352
80d32985a3eb

8205677: [8u] casts and type change for 8u to enable later Windows compilers
Reviewed-by: dholmes

src/share/vm/classfile/altHashing.cpp file | annotate | diff | comparison | revisions
src/share/vm/classfile/classFileParser.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp file | annotate | diff | comparison | revisions
src/share/vm/interpreter/oopMapCache.cpp file | annotate | diff | comparison | revisions
src/share/vm/interpreter/oopMapCache.hpp file | annotate | diff | comparison | revisions
src/share/vm/runtime/memprofiler.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/classfile/altHashing.cpp	Mon Jul 09 15:45:22 2018 +0000
     1.2 +++ b/src/share/vm/classfile/altHashing.cpp	Wed Jul 11 02:36:23 2018 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -224,7 +224,7 @@
    1.11  static const jbyte THREE_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82};
    1.12  static const jbyte FOUR_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83};
    1.13  static const jchar TWO_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382};
    1.14 -static const jint ONE_INT[] = { 0x83828180};
    1.15 +static const jint ONE_INT[] = { (jint) 0x83828180};
    1.16  static const jbyte SIX_BYTE[] = { (jbyte) 0x80, (jbyte) 0x81, (jbyte) 0x82, (jbyte) 0x83, (jbyte) 0x84, (jbyte) 0x85};
    1.17  static const jchar THREE_CHAR[] = { (jchar) 0x8180, (jchar) 0x8382, (jchar) 0x8584};
    1.18  static const jbyte EIGHT_BYTE[] = {
    1.19 @@ -235,7 +235,7 @@
    1.20    (jchar) 0x8180, (jchar) 0x8382,
    1.21    (jchar) 0x8584, (jchar) 0x8786};
    1.22  
    1.23 -static const jint TWO_INT[] = { 0x83828180, 0x87868584};
    1.24 +static const jint TWO_INT[] = { (jint) 0x83828180, (jint) 0x87868584};
    1.25  
    1.26  static const juint MURMUR3_32_X86_CHECK_VALUE = 0xB0F57EE3;
    1.27  
     2.1 --- a/src/share/vm/classfile/classFileParser.cpp	Mon Jul 09 15:45:22 2018 +0000
     2.2 +++ b/src/share/vm/classfile/classFileParser.cpp	Wed Jul 11 02:36:23 2018 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -275,7 +275,7 @@
    2.11              char* str = java_lang_String::as_utf8_string(patch());
    2.12              // (could use java_lang_String::as_symbol instead, but might as well batch them)
    2.13              utf8_buffer = (u1*) str;
    2.14 -            utf8_length = (int) strlen(str);
    2.15 +            utf8_length = (u2) strlen(str);
    2.16            }
    2.17  
    2.18            unsigned int hash;
     3.1 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Mon Jul 09 15:45:22 2018 +0000
     3.2 +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	Wed Jul 11 02:36:23 2018 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -6829,7 +6829,7 @@
    3.11    size_t start_ofs = heapWordToOffset(mr.start());
    3.12    // Make sure that end() is appropriately aligned
    3.13    assert(mr.end() == (HeapWord*)round_to((intptr_t)mr.end(),
    3.14 -                        (1 << (_shifter+LogHeapWordSize))),
    3.15 +                        ((intptr_t) 1 << (_shifter+LogHeapWordSize))),
    3.16           "Misaligned mr.end()");
    3.17    size_t end_ofs   = heapWordToOffset(mr.end());
    3.18    assert(end_ofs > start_ofs, "Should mark at least one bit");
     4.1 --- a/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Mon Jul 09 15:45:22 2018 +0000
     4.2 +++ b/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp	Wed Jul 11 02:36:23 2018 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -1035,7 +1035,7 @@
    4.11     if (monitor() != NULL) {
    4.12       MonitorSupply::release(monitor());
    4.13    }
    4.14 -  _monitor = (Monitor*) 0xDEAD000F;
    4.15 +  _monitor = (Monitor*) (uintptr_t) 0xDEAD000F;
    4.16  }
    4.17  
    4.18  void WaitForBarrierGCTask::do_it(GCTaskManager* manager, uint which) {
     5.1 --- a/src/share/vm/interpreter/oopMapCache.cpp	Mon Jul 09 15:45:22 2018 +0000
     5.2 +++ b/src/share/vm/interpreter/oopMapCache.cpp	Wed Jul 11 02:36:23 2018 -0700
     5.3 @@ -1,5 +1,5 @@
     5.4  /*
     5.5 - * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
     5.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     5.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     5.8   *
     5.9   * This code is free software; you can redistribute it and/or modify it
    5.10 @@ -426,9 +426,9 @@
    5.11  
    5.12  #ifndef PRODUCT
    5.13  
    5.14 -static long _total_memory_usage = 0;
    5.15 +static size_t _total_memory_usage = 0;
    5.16  
    5.17 -long OopMapCache::memory_usage() {
    5.18 +size_t OopMapCache::memory_usage() {
    5.19    return _total_memory_usage;
    5.20  }
    5.21  
     6.1 --- a/src/share/vm/interpreter/oopMapCache.hpp	Mon Jul 09 15:45:22 2018 +0000
     6.2 +++ b/src/share/vm/interpreter/oopMapCache.hpp	Wed Jul 11 02:36:23 2018 -0700
     6.3 @@ -1,5 +1,5 @@
     6.4  /*
     6.5 - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     6.6 + * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     6.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     6.8   *
     6.9   * This code is free software; you can redistribute it and/or modify it
    6.10 @@ -176,7 +176,7 @@
    6.11    static void compute_one_oop_map(methodHandle method, int bci, InterpreterOopMap* entry);
    6.12  
    6.13    // Returns total no. of bytes allocated as part of OopMapCache's
    6.14 -  static long memory_usage()                     PRODUCT_RETURN0;
    6.15 +  static size_t memory_usage()                     PRODUCT_RETURN0;
    6.16  };
    6.17  
    6.18  #endif // SHARE_VM_INTERPRETER_OOPMAPCACHE_HPP
     7.1 --- a/src/share/vm/runtime/memprofiler.cpp	Mon Jul 09 15:45:22 2018 +0000
     7.2 +++ b/src/share/vm/runtime/memprofiler.cpp	Wed Jul 11 02:36:23 2018 -0700
     7.3 @@ -1,5 +1,5 @@
     7.4  /*
     7.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     7.6 + * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     7.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     7.8   *
     7.9   * This code is free software; you can redistribute it and/or modify it
    7.10 @@ -126,7 +126,7 @@
    7.11  
    7.12    fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K);
    7.13  
    7.14 -  fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n",
    7.15 +  fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) "\n",
    7.16            handles_memory_usage / K,
    7.17            resource_memory_usage / K,
    7.18            OopMapCache::memory_usage() / K);

mercurial