< prev index next >

## src/share/vm/c1/c1_Instruction.cpp

```@@ -1,7 +1,7 @@
/*
* 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
```

```@@ -237,23 +237,23 @@
case Bytecodes::_imul: // fall through
case Bytecodes::_lmul: // fall through
case Bytecodes::_fmul: // fall through
case Bytecodes::_dmul: return true;
+    default              : return false;
}
-  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;
}
-  return false;
}

// Implementation of LogicOp

```

```@@ -264,11 +264,11 @@
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();
+    default              : ShouldNotReachHere(); break;
}
#endif
// all LogicOps are commutative
return true;
}
```

```@@ -445,12 +445,13 @@
return (t1 != NULL && t2 != NULL &&
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,10 +470,11 @@
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,10 +484,11 @@
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,10 +496,11 @@
assert(xvalue != NULL && yvalue != NULL, "not constants");
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;
}
```

```@@ -505,14 +509,17 @@
assert(xvalue != NULL && yvalue != NULL, "not constants");
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 >