mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6939207: refactor constant pool index processing
Factored cleanup of instruction decode which prepares for enhanced ldc semantics. Reviewed-by: twisti
This commit is contained in:
parent
2e24ba80e9
commit
581521ba96
40 changed files with 875 additions and 592 deletions
|
@ -732,7 +732,7 @@ void MethodHandleCompiler::emit_bc(Bytecodes::Code op, int index) {
|
|||
case Bytecodes::_dreturn:
|
||||
case Bytecodes::_areturn:
|
||||
case Bytecodes::_return:
|
||||
assert(strcmp(Bytecodes::format(op), "b") == 0, "wrong bytecode format");
|
||||
assert(Bytecodes::format_bits(op, false) == Bytecodes::_fmt_b, "wrong bytecode format");
|
||||
_bytecode.push(op);
|
||||
break;
|
||||
|
||||
|
@ -748,7 +748,7 @@ void MethodHandleCompiler::emit_bc(Bytecodes::Code op, int index) {
|
|||
case Bytecodes::_fstore:
|
||||
case Bytecodes::_dstore:
|
||||
case Bytecodes::_astore:
|
||||
assert(strcmp(Bytecodes::format(op), "bi") == 0, "wrong bytecode format");
|
||||
assert(Bytecodes::format_bits(op, false) == Bytecodes::_fmt_bi, "wrong bytecode format");
|
||||
assert((char) index == index, "index does not fit in 8-bit");
|
||||
_bytecode.push(op);
|
||||
_bytecode.push(index);
|
||||
|
@ -757,18 +757,18 @@ void MethodHandleCompiler::emit_bc(Bytecodes::Code op, int index) {
|
|||
// bii
|
||||
case Bytecodes::_ldc2_w:
|
||||
case Bytecodes::_checkcast:
|
||||
assert(strcmp(Bytecodes::format(op), "bii") == 0, "wrong bytecode format");
|
||||
assert(Bytecodes::format_bits(op, false) == Bytecodes::_fmt_bkk, "wrong bytecode format");
|
||||
assert((short) index == index, "index does not fit in 16-bit");
|
||||
_bytecode.push(op);
|
||||
_bytecode.push(index >> 8);
|
||||
_bytecode.push(index);
|
||||
break;
|
||||
|
||||
// bjj
|
||||
// bJJ
|
||||
case Bytecodes::_invokestatic:
|
||||
case Bytecodes::_invokespecial:
|
||||
case Bytecodes::_invokevirtual:
|
||||
assert(strcmp(Bytecodes::format(op), "bjj") == 0, "wrong bytecode format");
|
||||
assert(Bytecodes::format_bits(op, false) == Bytecodes::_fmt_bJJ, "wrong bytecode format");
|
||||
assert((short) index == index, "index does not fit in 16-bit");
|
||||
_bytecode.push(op);
|
||||
_bytecode.push(index >> 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue