Skip to content
Permalink
Browse files
8253636: C2: Adjust NodeClasses::_max_classes
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 5dd9353b83e4d1f5f86842a671be275398a1b4c2
Showing 2 changed files with 3 additions and 3 deletions.
@@ -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");
}

@@ -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,
@@ -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

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.