--- old/src/share/vm/opto/castnode.cpp 2016-07-11 22:46:15.274486760 +0900 +++ new/src/share/vm/opto/castnode.cpp 2016-07-11 22:46:15.137487240 +0900 @@ -55,7 +55,7 @@ // Previous versions of this function had some special case logic, // which is no longer necessary. Make sure of the required effects. switch (Opcode()) { - case Op_CastII: + case Opcodes::Op_CastII: { const Type* t1 = phase->type(in(1)); if( t1 == Type::TOP ) assert(ft == Type::TOP, "special case #1"); @@ -63,7 +63,7 @@ if (rt->empty()) assert(ft == Type::TOP, "special case #2"); break; } - case Op_CastPP: + case Opcodes::Op_CastPP: if (phase->type(in(1)) == TypePtr::NULL_PTR && _type->isa_ptr() && _type->is_ptr()->_ptr == TypePtr::NotNull) assert(ft == Type::TOP, "special case #3"); @@ -89,21 +89,21 @@ return sizeof(*this); } -Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t, bool carry_dependency) { +Node* ConstraintCastNode::make_cast(Opcodes opcode, Node* c, Node *n, const Type *t, bool carry_dependency) { switch(opcode) { - case Op_CastII: { + case Opcodes::Op_CastII: { Node* cast = new CastIINode(n, t, carry_dependency); cast->set_req(0, c); return cast; } - case Op_CastPP: { + case Opcodes::Op_CastPP: { Node* cast = new CastPPNode(n, t, carry_dependency); cast->set_req(0, c); return cast; } - case Op_CheckCastPP: return new CheckCastPPNode(c, n, t, carry_dependency); + case Opcodes::Op_CheckCastPP: return new CheckCastPPNode(c, n, t, carry_dependency); default: - fatal("Bad opcode %d", opcode); + fatal("Bad opcode %u", static_cast(opcode)); } return NULL; } @@ -111,7 +111,7 @@ TypeNode* ConstraintCastNode::dominating_cast(PhaseTransform *phase) const { Node* val = in(1); Node* ctl = in(0); - int opc = Opcode(); + Opcodes opc = Opcode(); if (ctl == NULL) { return NULL; } @@ -163,7 +163,7 @@ Node* proj = in(0); if (proj->in(0)->in(1)->is_Bool()) { Node* b = proj->in(0)->in(1); - if (b->in(1)->Opcode() == Op_CmpI) { + if (b->in(1)->Opcode() == Opcodes::Op_CmpI) { Node* cmp = b->in(1); if (cmp->in(1) == in(1) && phase->type(cmp->in(2))->isa_int()) { const TypeInt* in2_t = phase->type(cmp->in(2))->is_int(); @@ -227,7 +227,7 @@ // transform: // (CastII (AddI x const)) -> (AddI (CastII x) const) // So the AddI has a chance to be optimized out - if (in(1)->Opcode() == Op_AddI) { + if (in(1)->Opcode() == Opcodes::Op_AddI) { Node* in2 = in(1)->in(2); const TypeInt* in2_t = phase->type(in2)->isa_int(); if (in2_t != NULL && in2_t->singleton()) { @@ -433,11 +433,11 @@ Node *CastX2PNode::Ideal(PhaseGVN *phase, bool can_reshape) { // convert CastX2P(AddX(x, y)) to AddP(CastX2P(x), y) if y fits in an int - int op = in(1)->Opcode(); + Opcodes op = in(1)->Opcode(); Node* x; Node* y; switch (op) { - case Op_SubX: + case Opcodes::Op_SubX: x = in(1)->in(1); // Avoid ideal transformations ping-pong between this and AddP for raw pointers. if (phase->find_intptr_t_con(x, -1) == 0) @@ -447,7 +447,7 @@ return addP_of_X2P(phase, x, y, true); } break; - case Op_AddX: + case Opcodes::Op_AddX: x = in(1)->in(1); y = in(1)->in(2); if (fits_in_int(phase->type(y))) { @@ -463,7 +463,7 @@ //------------------------------Identity--------------------------------------- Node* CastX2PNode::Identity(PhaseGVN* phase) { - if (in(1)->Opcode() == Op_CastP2X) return in(1)->in(1); + if (in(1)->Opcode() == Opcodes::Op_CastP2X) return in(1)->in(1); return this; } @@ -485,6 +485,6 @@ //------------------------------Identity--------------------------------------- Node* CastP2XNode::Identity(PhaseGVN* phase) { - if (in(1)->Opcode() == Op_CastX2P) return in(1)->in(1); + if (in(1)->Opcode() == Opcodes::Op_CastX2P) return in(1)->in(1); return this; }