mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +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
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
|
||||
* Copyright 1997-2010 Sun Microsystems, Inc. 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
|
||||
|
@ -48,6 +48,25 @@ Bytecodes::Code RawBytecodeStream::raw_next_special(Bytecodes::Code code) {
|
|||
}
|
||||
}
|
||||
}
|
||||
_code = code;
|
||||
_raw_code = code;
|
||||
return code;
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
void BaseBytecodeStream::assert_raw_index_size(int size) const {
|
||||
if (raw_code() == Bytecodes::_invokedynamic && is_raw()) {
|
||||
// in raw mode, pretend indy is "bJJ__"
|
||||
assert(size == 2, "raw invokedynamic instruction has 2-byte index only");
|
||||
} else {
|
||||
bytecode()->assert_index_size(size, raw_code(), is_wide());
|
||||
}
|
||||
}
|
||||
|
||||
void BaseBytecodeStream::assert_raw_stream(bool want_raw) const {
|
||||
if (want_raw) {
|
||||
assert( is_raw(), "this function only works on raw streams");
|
||||
} else {
|
||||
assert(!is_raw(), "this function only works on non-raw streams");
|
||||
}
|
||||
}
|
||||
#endif //ASSERT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue