# HG changeset patch # User phh # Date 1622122022 0 # Node ID 4962a2ce077a466f09284c19672302a2ec5e233c # Parent 85c1e19cae3611d86e089f8f57b272c9bfa0222d 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 diff -r 85c1e19cae36 -r 4962a2ce077a src/share/vm/memory/binaryTreeDictionary.cpp --- 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 -size_t TreeChunk::_min_tree_chunk_size = sizeof(TreeChunk)/HeapWordSize; - -template TreeChunk* TreeChunk::as_TreeChunk(Chunk_t* fc) { // Do some assertion checking here. return (TreeChunk*) fc; diff -r 85c1e19cae36 -r 4962a2ce077a src/share/vm/memory/binaryTreeDictionary.hpp --- 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 +size_t TreeChunk::_min_tree_chunk_size = sizeof(TreeChunk)/HeapWordSize; +template +size_t TreeChunk::min_size() { return _min_tree_chunk_size; } template class BinaryTreeDictionary: public FreeBlockDictionary { diff -r 85c1e19cae36 -r 4962a2ce077a src/share/vm/utilities/hashtable.cpp --- 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 juint RehashableHashtable::_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*)memcpy(*top, *p, entry_size()); + *p = (BasicHashtableEntry*)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*)memcpy(*top, _buckets, len); + _buckets = (HashtableBucket*)memcpy(*top, (void*)_buckets, len); *top += len; } diff -r 85c1e19cae36 -r 4962a2ce077a src/share/vm/utilities/hashtable.hpp --- 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* 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 juint RehashableHashtable::_seed = 0; +template juint RehashableHashtable::seed() { return _seed; }; +template bool RehashableHashtable::use_alternate_hashcode() { return _seed != 0; }; // Verions of hashtable where two handles are used to compute the index.