< prev index next >
src/share/vm/interpreter/bytecodes.cpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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.
@@ -67,14 +67,15 @@
return false; // the rewrite is not done by the interpreter
case Bytecodes::_new:
// (Could actually look at the class here, but the profit would be small.)
return false; // the rewrite is not always done
- }
+ default:
// No other special cases.
return true;
+ }
}
Bytecodes::Code Bytecodes::code_at(Method* method, int bci) {
return code_at(method, method->bcp_from(bci));
}
@@ -116,13 +117,14 @@
jlong len = (aligned_bcp - bcp) + (2 + 2*npairs)*jintSize;
// only return len if it can be represented as a positive int;
// return -1 otherwise
return (len > 0 && len == (int)len) ? len : -1;
}
- }
+ default:
// Note: Length functions must return <=0 for invalid bytecodes.
return 0;
+ }
}
// At a breakpoint instruction, this returns the breakpoint's length,
// otherwise, it's the same as special_length_at(). This is used by
// the RawByteCodeStream, which wants to see the actual bytecode
< prev index next >