Skip to content

Commit 9411907

Browse files
authored
Merge pull request #3528 from dotty-staging/port-scala-#5253
Port part of scala/scala#5293
2 parents 2acc7b3 + 64fdc22 commit 9411907

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/test/dotty/tools/backend/jvm/AsmConverters.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ object ASMConverters {
9696
case class FrameEntry (`type`: Int, local: List[Any], stack: List[Any]) extends Instruction { def opcode: Int = -1 }
9797
case class LineNumber (line: Int, start: Label) extends Instruction { def opcode: Int = -1 }
9898

99-
case class MethodHandle(tag: Int, owner: String, name: String, desc: String)
99+
case class MethodHandle(tag: Int, owner: String, name: String, desc: String, itf: Boolean)
100100

101101
case class ExceptionHandler(start: Label, end: Label, handler: Label, desc: Option[String])
102102
case class LocalVariable(name: String, desc: String, signature: Option[String], start: Label, end: Label, index: Int)
@@ -149,7 +149,7 @@ object ASMConverters {
149149
case _ => a // can be: Class, method Type, primitive constant
150150
})(collection.breakOut)
151151

152-
private def convertMethodHandle(h: asm.Handle): MethodHandle = MethodHandle(h.getTag, h.getOwner, h.getName, h.getDesc)
152+
private def convertMethodHandle(h: asm.Handle): MethodHandle = MethodHandle(h.getTag, h.getOwner, h.getName, h.getDesc, h.isInterface)
153153

154154
private def convertHandlers(method: t.MethodNode): List[ExceptionHandler] = {
155155
method.tryCatchBlocks.asScala.map(h => ExceptionHandler(applyLabel(h.start), applyLabel(h.end), applyLabel(h.handler), Option(h.`type`)))(collection.breakOut)
@@ -229,7 +229,7 @@ object ASMConverters {
229229
case x => x.asInstanceOf[Object]
230230
}
231231

232-
def unconvertMethodHandle(h: MethodHandle): asm.Handle = new asm.Handle(h.tag, h.owner, h.name, h.desc)
232+
def unconvertMethodHandle(h: MethodHandle): asm.Handle = new asm.Handle(h.tag, h.owner, h.name, h.desc, h.itf)
233233
def unconvertBsmArgs(a: List[Object]): Array[Object] = a.map({
234234
case h: MethodHandle => unconvertMethodHandle(h)
235235
case o => o

0 commit comments

Comments
 (0)