< prev index next >
src/share/vm/c1/c1_Instruction.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 237,259 ****
case Bytecodes::_dadd: // fall through
case Bytecodes::_imul: // fall through
case Bytecodes::_lmul: // fall through
case Bytecodes::_fmul: // fall through
case Bytecodes::_dmul: return true;
}
- return false;
}
bool ArithmeticOp::can_trap() const {
switch (op()) {
case Bytecodes::_idiv: // fall through
case Bytecodes::_ldiv: // fall through
case Bytecodes::_irem: // fall through
case Bytecodes::_lrem: return true;
}
- return false;
}
// Implementation of LogicOp
--- 237,259 ----
case Bytecodes::_dadd: // fall through
case Bytecodes::_imul: // fall through
case Bytecodes::_lmul: // fall through
case Bytecodes::_fmul: // fall through
case Bytecodes::_dmul: return true;
+ default : return false;
}
}
bool ArithmeticOp::can_trap() const {
switch (op()) {
case Bytecodes::_idiv: // fall through
case Bytecodes::_ldiv: // fall through
case Bytecodes::_irem: // fall through
case Bytecodes::_lrem: return true;
+ default : return false;
}
}
// Implementation of LogicOp
*** 264,274 ****
case Bytecodes::_land: // fall through
case Bytecodes::_ior : // fall through
case Bytecodes::_lor : // fall through
case Bytecodes::_ixor: // fall through
case Bytecodes::_lxor: break;
! default : ShouldNotReachHere();
}
#endif
// all LogicOps are commutative
return true;
}
--- 264,274 ----
case Bytecodes::_land: // fall through
case Bytecodes::_ior : // fall through
case Bytecodes::_lor : // fall through
case Bytecodes::_ixor: // fall through
case Bytecodes::_lxor: break;
! default : ShouldNotReachHere(); break;
}
#endif
// all LogicOps are commutative
return true;
}
*** 445,456 ****
MetadataType* t2 = v->type()->as_MetadataType();
return (t1 != NULL && t2 != NULL &&
t1->is_loaded() && t2->is_loaded() &&
t1->constant_value() == t2->constant_value());
}
! }
return false;
}
Constant::CompareResult Constant::compare(Instruction::Condition cond, Value right) const {
Constant* rc = right->as_Constant();
// other is not a constant
--- 445,457 ----
MetadataType* t2 = v->type()->as_MetadataType();
return (t1 != NULL && t2 != NULL &&
t1->is_loaded() && t2->is_loaded() &&
t1->constant_value() == t2->constant_value());
}
! default:
return false;
+ }
}
Constant::CompareResult Constant::compare(Instruction::Condition cond, Value right) const {
Constant* rc = right->as_Constant();
// other is not a constant
*** 469,478 ****
--- 470,480 ----
case If::neq: return x != y ? cond_true : cond_false;
case If::lss: return x < y ? cond_true : cond_false;
case If::leq: return x <= y ? cond_true : cond_false;
case If::gtr: return x > y ? cond_true : cond_false;
case If::geq: return x >= y ? cond_true : cond_false;
+ default : break;
}
break;
}
case longTag: {
jlong x = lt->as_LongConstant()->value();
*** 482,491 ****
--- 484,494 ----
case If::neq: return x != y ? cond_true : cond_false;
case If::lss: return x < y ? cond_true : cond_false;
case If::leq: return x <= y ? cond_true : cond_false;
case If::gtr: return x > y ? cond_true : cond_false;
case If::geq: return x >= y ? cond_true : cond_false;
+ default : break;
}
break;
}
case objectTag: {
ciObject* xvalue = lt->as_ObjectType()->constant_value();
*** 493,502 ****
--- 496,506 ----
assert(xvalue != NULL && yvalue != NULL, "not constants");
if (xvalue->is_loaded() && yvalue->is_loaded()) {
switch (cond) {
case If::eql: return xvalue == yvalue ? cond_true : cond_false;
case If::neq: return xvalue != yvalue ? cond_true : cond_false;
+ default : break;
}
}
break;
}
case metaDataTag: {
*** 505,518 ****
--- 509,525 ----
assert(xvalue != NULL && yvalue != NULL, "not constants");
if (xvalue->is_loaded() && yvalue->is_loaded()) {
switch (cond) {
case If::eql: return xvalue == yvalue ? cond_true : cond_false;
case If::neq: return xvalue != yvalue ? cond_true : cond_false;
+ default : break;
}
}
break;
}
+ default:
+ break;
}
return not_comparable;
}
< prev index next >