Skip to content

Commit 9ea9323

Browse files
committed
8254246: SymbolHashMapEntry wastes space
Reviewed-by: redestad
1 parent 982e42b commit 9ea9323

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hotspot/share/oops/constantPool.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -967,9 +967,9 @@ class ConstantPool : public Metadata {
967967

968968
class SymbolHashMapEntry : public CHeapObj<mtSymbol> {
969969
private:
970-
unsigned int _hash; // 32-bit hash for item
971970
SymbolHashMapEntry* _next; // Next element in the linked list for this bucket
972971
Symbol* _symbol; // 1-st part of the mapping: symbol => value
972+
unsigned int _hash; // 32-bit hash for item
973973
u2 _value; // 2-nd part of the mapping: symbol => value
974974

975975
public:
@@ -986,7 +986,7 @@ class SymbolHashMapEntry : public CHeapObj<mtSymbol> {
986986
void set_value(u2 value) { _value = value; }
987987

988988
SymbolHashMapEntry(unsigned int hash, Symbol* symbol, u2 value)
989-
: _hash(hash), _next(NULL), _symbol(symbol), _value(value) {}
989+
: _next(NULL), _symbol(symbol), _hash(hash), _value(value) {}
990990

991991
}; // End SymbolHashMapEntry class
992992

0 commit comments

Comments
 (0)