mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8338406: BytecodeHelpers using wrong bootstrap method descriptor for condy
Reviewed-by: asotona
This commit is contained in:
parent
965508270e
commit
ace496515f
2 changed files with 41 additions and 23 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, 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
|
||||
|
@ -275,15 +275,7 @@ public class BytecodeHelpers {
|
|||
List<LoadableConstantEntry> staticArgs = new ArrayList<>(bootstrapArgs.length);
|
||||
for (ConstantDesc bootstrapArg : bootstrapArgs)
|
||||
staticArgs.add(constantPool.loadableConstantEntry(bootstrapArg));
|
||||
|
||||
var bootstrapDesc = desc.bootstrapMethod();
|
||||
ClassEntry bsOwner = constantPool.classEntry(bootstrapDesc.owner());
|
||||
NameAndTypeEntry bsNameAndType = constantPool.nameAndTypeEntry(bootstrapDesc.methodName(),
|
||||
bootstrapDesc.invocationType());
|
||||
int bsRefKind = bootstrapDesc.refKind();
|
||||
|
||||
MemberRefEntry memberRefEntry = toBootstrapMemberRef(constantPool, bsRefKind, bsOwner, bsNameAndType, bootstrapDesc.isOwnerInterface());
|
||||
MethodHandleEntry methodHandleEntry = constantPool.methodHandleEntry(bsRefKind, memberRefEntry);
|
||||
MethodHandleEntry methodHandleEntry = handleDescToHandleInfo(constantPool, desc.bootstrapMethod());
|
||||
BootstrapMethodEntry bme = constantPool.bsmEntry(methodHandleEntry, staticArgs);
|
||||
return constantPool.constantDynamicEntry(bme,
|
||||
constantPool.nameAndTypeEntry(desc.constantName(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue