1
1
/*
2
- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2003, 2021 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -47,13 +47,7 @@ template <MEMFLAGS F> class BasicHashtableEntry : public CHeapObj<F> {
47
47
private:
48
48
unsigned int _hash; // 32-bit hash for item
49
49
50
- // Link to next element in the linked list for this bucket. EXCEPT
51
- // bit 0 set indicates that this entry is shared and must not be
52
- // unlinked from the table. Bit 0 is set during the dumping of the
53
- // archive. Since shared entries are immutable, _next fields in the
54
- // shared entries will not change. New entries will always be
55
- // unshared and since pointers are align, bit 0 will always remain 0
56
- // with no extra effort.
50
+ // Link to next element in the linked list for this bucket.
57
51
BasicHashtableEntry<F>* _next;
58
52
59
53
// Windows IA64 compiler requires subclasses to be able to access these
@@ -71,12 +65,8 @@ template <MEMFLAGS F> class BasicHashtableEntry : public CHeapObj<F> {
71
65
void set_hash (unsigned int hash) { _hash = hash; }
72
66
unsigned int * hash_addr () { return &_hash; }
73
67
74
- static BasicHashtableEntry<F>* make_ptr (BasicHashtableEntry<F>* p) {
75
- return (BasicHashtableEntry*)((intptr_t )p & -2 );
76
- }
77
-
78
68
BasicHashtableEntry<F>* next () const {
79
- return make_ptr ( _next) ;
69
+ return _next;
80
70
}
81
71
82
72
void set_next (BasicHashtableEntry<F>* next) {
@@ -86,14 +76,6 @@ template <MEMFLAGS F> class BasicHashtableEntry : public CHeapObj<F> {
86
76
BasicHashtableEntry<F>** next_addr () {
87
77
return &_next;
88
78
}
89
-
90
- bool is_shared () const {
91
- return ((intptr_t )_next & 1 ) != 0 ;
92
- }
93
-
94
- void set_shared () {
95
- _next = (BasicHashtableEntry<F>*)((intptr_t )_next | 1 );
96
- }
97
79
};
98
80
99
81
0 commit comments