Skip to content

Commit

Permalink
8253636: C2: Adjust NodeClasses::_max_classes
Browse files Browse the repository at this point in the history
Update NodeClasses::_max_classes to the max class id within the
enumeration. Update comment and assertion to reflect that NodeClasses uses now
32 bits after the addition of Opaque1 in JDK-8229495.

Reviewed-by: neliasso, kvn
  • Loading branch information
robcasloz authored and TobiHartmann committed Oct 1, 2020
1 parent 05a764f commit 5dd9353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hotspot/share/opto/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ bool Node::verify_jvms(const JVMState* using_jvms) const {

//------------------------------init_NodeProperty------------------------------
void Node::init_NodeProperty() {
assert(_max_classes <= max_jushort, "too many NodeProperty classes");
assert(_max_classes <= max_juint, "too many NodeProperty classes");
assert(max_flags() <= max_jushort, "too many NodeProperty flags");
}

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/opto/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ class Node {
ClassMask_##cl = ((Bit_##cl << 1) - 1) ,

// This enum is used only for C2 ideal and mach nodes with is_<node>() methods
// so that it's values fits into 16 bits.
// so that its values fit into 32 bits.
enum NodeClasses {
Bit_Node = 0x00000000,
Class_Node = 0x00000000,
Expand Down Expand Up @@ -719,7 +719,7 @@ class Node {
DEFINE_CLASS_ID(Halt, Node, 15)
DEFINE_CLASS_ID(Opaque1, Node, 16)

_max_classes = ClassMask_Halt
_max_classes = ClassMask_Opaque1
};
#undef DEFINE_CLASS_ID

Expand Down

1 comment on commit 5dd9353

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 5dd9353 Oct 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.