Mercurial > hg > openjdk > jdk8u > hotspot
changeset 9469:4962a2ce077a
8239053: [8u] clean up undefined-var-template warnings
Summary: From 8182299, clean up undefined-var-template warnings
Reviewed-by: phh, simonis
Contributed-by: benty@amazon.com
author | phh |
---|---|
date | Thu, 27 May 2021 13:27:02 +0000 |
parents | 85c1e19cae36 |
children | 32dfc0a37b47 |
files | src/share/vm/memory/binaryTreeDictionary.cpp src/share/vm/memory/binaryTreeDictionary.hpp src/share/vm/utilities/hashtable.cpp src/share/vm/utilities/hashtable.hpp |
diffstat | 4 files changed, 14 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/memory/binaryTreeDictionary.cpp Wed May 26 18:02:41 2021 +0100 +++ b/src/share/vm/memory/binaryTreeDictionary.cpp Thu May 27 13:27:02 2021 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, 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 @@ -45,9 +45,6 @@ //////////////////////////////////////////////////////////////////////////////// template <class Chunk_t, class FreeList_t> -size_t TreeChunk<Chunk_t, FreeList_t>::_min_tree_chunk_size = sizeof(TreeChunk<Chunk_t, FreeList_t>)/HeapWordSize; - -template <class Chunk_t, class FreeList_t> TreeChunk<Chunk_t, FreeList_t>* TreeChunk<Chunk_t, FreeList_t>::as_TreeChunk(Chunk_t* fc) { // Do some assertion checking here. return (TreeChunk<Chunk_t, FreeList_t>*) fc;
--- a/src/share/vm/memory/binaryTreeDictionary.hpp Wed May 26 18:02:41 2021 +0100 +++ b/src/share/vm/memory/binaryTreeDictionary.hpp Thu May 27 13:27:02 2021 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2001, 2017, 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 @@ -163,15 +163,17 @@ Chunk_t* prev() const { return Chunk_t::prev(); } size_t size() const volatile { return Chunk_t::size(); } - static size_t min_size() { - return _min_tree_chunk_size; - } + static size_t min_size(); // debugging void verify_tree_chunk_list() const; void assert_is_mangled() const; }; +template <class Chunk_t, class FreeList_t> +size_t TreeChunk<Chunk_t, FreeList_t>::_min_tree_chunk_size = sizeof(TreeChunk<Chunk_t, FreeList_t>)/HeapWordSize; +template <class Chunk_t, class FreeList_t> +size_t TreeChunk<Chunk_t, FreeList_t>::min_size() { return _min_tree_chunk_size; } template <class Chunk_t, class FreeList_t> class BinaryTreeDictionary: public FreeBlockDictionary<Chunk_t> {
--- a/src/share/vm/utilities/hashtable.cpp Wed May 26 18:02:41 2021 +0100 +++ b/src/share/vm/utilities/hashtable.cpp Thu May 27 13:27:02 2021 +0000 @@ -94,8 +94,6 @@ return false; } -template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::_seed = 0; - // Create a new table and using alternate hash code, populate the new table // with the existing elements. This can be used to change the hash code // and could in the future change the size of the table. @@ -219,7 +217,7 @@ if (*top + entry_size() > end) { report_out_of_shared_space(SharedMiscData); } - *p = (BasicHashtableEntry<F>*)memcpy(*top, *p, entry_size()); + *p = (BasicHashtableEntry<F>*)memcpy(*top, (void*)*p, entry_size()); *top += entry_size(); } } @@ -333,7 +331,7 @@ if (*top + len > end) { report_out_of_shared_space(SharedMiscData); } - _buckets = (HashtableBucket<F>*)memcpy(*top, _buckets, len); + _buckets = (HashtableBucket<F>*)memcpy(*top, (void*)_buckets, len); *top += len; }
--- a/src/share/vm/utilities/hashtable.hpp Wed May 26 18:02:41 2021 +0100 +++ b/src/share/vm/utilities/hashtable.hpp Thu May 27 13:27:02 2021 +0000 @@ -314,8 +314,8 @@ // Function to move these elements into the new table. void move_to(RehashableHashtable<T, F>* new_table); - static bool use_alternate_hashcode() { return _seed != 0; } - static juint seed() { return _seed; } + static bool use_alternate_hashcode(); + static juint seed(); static int literal_size(Symbol *symbol); static int literal_size(oop oop); @@ -333,6 +333,9 @@ static juint _seed; }; +template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::_seed = 0; +template <class T, MEMFLAGS F> juint RehashableHashtable<T, F>::seed() { return _seed; }; +template <class T, MEMFLAGS F> bool RehashableHashtable<T, F>::use_alternate_hashcode() { return _seed != 0; }; // Verions of hashtable where two handles are used to compute the index.