Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/binaryTreeDictionary.cpp @ 6119:a297b0e14605
7172226: HotSpot fails to build with GCC 4.7 because of stricter c++ argument dependent lookup
Summary: Add "using" keyword to import base class functions from FreeList<T> to fix template name lookup in gcc 4.7
Reviewed-by: brutisso, iveresov
author | mgerdin |
---|---|
date | Mon, 04 Jun 2012 09:21:53 +0200 |
parents | f69a5d43dc19 |
children | 685df3c6f84b |
comparison
equal
deleted
inserted
replaced
6115:6e2633440960 | 6119:a297b0e14605 |
---|---|
228 Chunk* fc = tail(); | 228 Chunk* fc = tail(); |
229 fc->link_after(chunk); | 229 fc->link_after(chunk); |
230 link_tail(chunk); | 230 link_tail(chunk); |
231 | 231 |
232 assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list"); | 232 assert(!tail() || size() == tail()->size(), "Wrong sized chunk in list"); |
233 FreeList<Chunk>::increment_count(); | 233 increment_count(); |
234 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) | 234 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) |
235 assert(head() == NULL || head()->prev() == NULL, "list invariant"); | 235 assert(head() == NULL || head()->prev() == NULL, "list invariant"); |
236 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); | 236 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); |
237 } | 237 } |
238 | 238 |
256 assert(tail() == NULL, "List is inconsistent"); | 256 assert(tail() == NULL, "List is inconsistent"); |
257 link_tail(chunk); | 257 link_tail(chunk); |
258 } | 258 } |
259 head()->link_after(chunk); | 259 head()->link_after(chunk); |
260 assert(!head() || size() == head()->size(), "Wrong sized chunk in list"); | 260 assert(!head() || size() == head()->size(), "Wrong sized chunk in list"); |
261 FreeList<Chunk>::increment_count(); | 261 increment_count(); |
262 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) | 262 debug_only(increment_returned_bytes_by(chunk->size()*sizeof(HeapWord));) |
263 assert(head() == NULL || head()->prev() == NULL, "list invariant"); | 263 assert(head() == NULL || head()->prev() == NULL, "list invariant"); |
264 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); | 264 assert(tail() == NULL || tail()->next() == NULL, "list invariant"); |
265 } | 265 } |
266 | 266 |
907 virtual void do_tree(TreeList<Chunk>* tl) = 0; | 907 virtual void do_tree(TreeList<Chunk>* tl) = 0; |
908 }; | 908 }; |
909 | 909 |
910 template <class Chunk> | 910 template <class Chunk> |
911 class AscendTreeCensusClosure : public TreeCensusClosure<Chunk> { | 911 class AscendTreeCensusClosure : public TreeCensusClosure<Chunk> { |
912 using TreeCensusClosure<Chunk>::do_list; | |
912 public: | 913 public: |
913 void do_tree(TreeList<Chunk>* tl) { | 914 void do_tree(TreeList<Chunk>* tl) { |
914 if (tl != NULL) { | 915 if (tl != NULL) { |
915 do_tree(tl->left()); | 916 do_tree(tl->left()); |
916 do_list(tl); | 917 do_list(tl); |
919 } | 920 } |
920 }; | 921 }; |
921 | 922 |
922 template <class Chunk> | 923 template <class Chunk> |
923 class DescendTreeCensusClosure : public TreeCensusClosure<Chunk> { | 924 class DescendTreeCensusClosure : public TreeCensusClosure<Chunk> { |
925 using TreeCensusClosure<Chunk>::do_list; | |
924 public: | 926 public: |
925 void do_tree(TreeList<Chunk>* tl) { | 927 void do_tree(TreeList<Chunk>* tl) { |
926 if (tl != NULL) { | 928 if (tl != NULL) { |
927 do_tree(tl->right()); | 929 do_tree(tl->right()); |
928 do_list(tl); | 930 do_list(tl); |
985 }; | 987 }; |
986 #endif | 988 #endif |
987 | 989 |
988 template <class Chunk> | 990 template <class Chunk> |
989 class DescendTreeSearchClosure : public TreeSearchClosure<Chunk> { | 991 class DescendTreeSearchClosure : public TreeSearchClosure<Chunk> { |
992 using TreeSearchClosure<Chunk>::do_list; | |
990 public: | 993 public: |
991 bool do_tree(TreeList<Chunk>* tl) { | 994 bool do_tree(TreeList<Chunk>* tl) { |
992 if (tl != NULL) { | 995 if (tl != NULL) { |
993 if (do_tree(tl->right())) return true; | 996 if (do_tree(tl->right())) return true; |
994 if (do_list(tl)) return true; | 997 if (do_list(tl)) return true; |