mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8140659: C1: invokedynamic call patching violates JVMS-6.5.invokedynamic
Reviewed-by: roland
This commit is contained in:
parent
a82be01120
commit
7adcd9a503
8 changed files with 23 additions and 16 deletions
|
@ -1748,10 +1748,6 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
|
|||
const Bytecodes::Code bc_raw = stream()->cur_bc_raw();
|
||||
assert(declared_signature != NULL, "cannot be null");
|
||||
|
||||
if (!C1PatchInvokeDynamic && Bytecodes::has_optional_appendix(bc_raw) && !will_link) {
|
||||
BAILOUT("unlinked call site (C1PatchInvokeDynamic is off)");
|
||||
}
|
||||
|
||||
// we have to make sure the argument size (incl. the receiver)
|
||||
// is correct for compilation (the call would fail later during
|
||||
// linkage anyway) - was bug (gri 7/28/99)
|
||||
|
@ -1803,8 +1799,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
|
|||
// Push appendix argument (MethodType, CallSite, etc.), if one.
|
||||
bool patch_for_appendix = false;
|
||||
int patching_appendix_arg = 0;
|
||||
if (C1PatchInvokeDynamic &&
|
||||
(Bytecodes::has_optional_appendix(bc_raw) && (!will_link || PatchALot))) {
|
||||
if (Bytecodes::has_optional_appendix(bc_raw) && (!will_link || PatchALot)) {
|
||||
Value arg = append(new Constant(new ObjectConstant(compilation()->env()->unloaded_ciinstance()), copy_state_before()));
|
||||
apush(arg);
|
||||
patch_for_appendix = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue