Skip to content

Commit

Permalink
Update parameter names in test data after ASM update
Browse files Browse the repository at this point in the history
This is mostly a revert of the following commits:

1) 63ca8eb
2) eb32273

These commits were made to update intellij dependency (KTI-1416).
However, it seems that during that update, the asm dependency was not
updated. This led to a situation where the Kotlin compiler used intellij
with a fix for IDEA-331588:
JetBrains/intellij-community@638600f
But with an older ASM version that did not yet have
`ClassReader.VISIT_LOCAL_VARIABLES` and the corresponding code to handle
it.

Normally this would result in a NoSuchFieldError at runtime. However the
referenced field here is public static final, so it was inlined at the
call site, and everything worked as before, except the fact that
`ClsFileImpl` now passed `SKIP_CODE` (along with a value of
`VISIT_LOCAL_VARIABLES` = 256, which had no effect), which resulted in
parameter names of Java methods not being loaded.

Now that ASM is updated to a new version, `VISIT_LOCAL_VARIABLES`
started working as expected, and parameter names are loaded again.

Note that in most tests parameter names have been updated, but in some
diagnostic tests AA versions of tests have been muted, because behavior
differs between the compiler and AA modes (AA always uses compiled PSI).

 #KT-74276 Fixed
  • Loading branch information
udalov committed Jan 7, 2025
1 parent caa140d commit aed6442
Show file tree
Hide file tree
Showing 51 changed files with 570 additions and 567 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ KtNameReferenceExpression(239,243): 'Math'

KtNameReferenceExpression(244,247): 'sin'
KtSimpleNameReference:
(in java.lang.Math) open fun sin(p0: kotlin.Double): kotlin.Double
(in java.lang.Math) open fun sin(a: kotlin.Double): kotlin.Double
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ KtNameReferenceExpression(35,46): 'invokeLater'
call = KaSimpleFunctionCall:
argumentMapping = {
{ } -> (KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null)
}
isImplicitInvoke = false
Expand All @@ -19,13 +19,13 @@ KtNameReferenceExpression(35,46): 'invokeLater'
signature = KaFunctionSignature:
receiverType = null
returnType = kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(p0: java.lang.Runnable!): kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(doRun: java.lang.Runnable!): kotlin.Unit
valueParameters = [
KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null
]
callableId = javax/swing/SwingUtilities.invokeLater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ KtNameReferenceExpression(35,46): 'invokeLater'
candidate = KaSimpleFunctionCall:
argumentMapping = {
{ } -> (KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null)
}
isImplicitInvoke = false
Expand All @@ -19,13 +19,13 @@ KtNameReferenceExpression(35,46): 'invokeLater'
signature = KaFunctionSignature:
receiverType = null
returnType = kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(p0: java.lang.Runnable!): kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(doRun: java.lang.Runnable!): kotlin.Unit
valueParameters = [
KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null
]
callableId = javax/swing/SwingUtilities.invokeLater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ KtNameReferenceExpression(35,46): 'invokeLater'
call = KaSimpleFunctionCall:
argumentMapping = {
{ } -> (KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null)
}
isImplicitInvoke = false
Expand All @@ -16,13 +16,13 @@ KtNameReferenceExpression(35,46): 'invokeLater'
signature = KaFunctionSignature:
receiverType = null
returnType = kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(p0: java.lang.Runnable!): kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(doRun: java.lang.Runnable!): kotlin.Unit
valueParameters = [
KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null
]
callableId = javax/swing/SwingUtilities.invokeLater
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ KtNameReferenceExpression(35,46): 'invokeLater'
candidate = KaSimpleFunctionCall:
argumentMapping = {
{ } -> (KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null)
}
isImplicitInvoke = false
Expand All @@ -16,13 +16,13 @@ KtNameReferenceExpression(35,46): 'invokeLater'
signature = KaFunctionSignature:
receiverType = null
returnType = kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(p0: java.lang.Runnable!): kotlin.Unit
symbol = javax/swing/SwingUtilities.invokeLater(doRun: java.lang.Runnable!): kotlin.Unit
valueParameters = [
KaVariableSignature:
name = p0
name = doRun
receiverType = null
returnType = java.lang.Runnable!
symbol = p0: java.lang.Runnable!
symbol = doRun: java.lang.Runnable!
callableId = null
]
callableId = javax/swing/SwingUtilities.invokeLater
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
KtNameReferenceExpression(35,46): 'invokeLater'
KtSimpleNameReference:
(in javax.swing.SwingUtilities) open fun invokeLater(p0: java.lang.Runnable!)
(in javax.swing.SwingUtilities) open fun invokeLater(doRun: java.lang.Runnable!)

SyntheticPropertyAccessorReference:
Nothing (Unresolved reference)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
KtNameReferenceExpression(35,46): 'invokeLater'
KtSimpleNameReference:
(in javax.swing.SwingUtilities) open fun invokeLater(p0: java.lang.Runnable!)
(in javax.swing.SwingUtilities) open fun invokeLater(doRun: java.lang.Runnable!)
Original file line number Diff line number Diff line change
Expand Up @@ -11,100 +11,100 @@ open val length: kotlin.Int

open fun isEmpty(): kotlin.Boolean

open fun codePointAt(p0: kotlin.Int): kotlin.Int
open fun codePointAt(index: kotlin.Int): kotlin.Int

open fun codePointBefore(p0: kotlin.Int): kotlin.Int
open fun codePointBefore(index: kotlin.Int): kotlin.Int

open fun codePointCount(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
open fun codePointCount(beginIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.Int

open fun offsetByCodePoints(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
open fun offsetByCodePoints(index: kotlin.Int, codePointOffset: kotlin.Int): kotlin.Int

open fun getChars(p0: kotlin.CharArray!, p1: kotlin.Int)
open fun getChars(dst: kotlin.CharArray!, dstBegin: kotlin.Int)

open fun getChars(p0: kotlin.Int, p1: kotlin.Int, p2: kotlin.CharArray!, p3: kotlin.Int)
open fun getChars(srcBegin: kotlin.Int, srcEnd: kotlin.Int, dst: kotlin.CharArray!, dstBegin: kotlin.Int)

@kotlin.Deprecated(message = "Deprecated in Java")
open fun getBytes(p0: kotlin.Int, p1: kotlin.Int, p2: kotlin.ByteArray!, p3: kotlin.Int)
open fun getBytes(srcBegin: kotlin.Int, srcEnd: kotlin.Int, dst: kotlin.ByteArray!, dstBegin: kotlin.Int)

open fun getBytes(p0: kotlin.String!): kotlin.ByteArray!
open fun getBytes(charsetName: kotlin.String!): kotlin.ByteArray!

open fun getBytes(p0: java.nio.charset.Charset!): kotlin.ByteArray!
open fun getBytes(charset: java.nio.charset.Charset!): kotlin.ByteArray!

open fun getBytes(): kotlin.ByteArray!

open operator fun equals(p0: kotlin.Any?): kotlin.Boolean
open operator fun equals(anObject: kotlin.Any?): kotlin.Boolean

open fun contentEquals(p0: java.lang.StringBuffer!): kotlin.Boolean
open fun contentEquals(sb: java.lang.StringBuffer!): kotlin.Boolean

open fun contentEquals(p0: kotlin.CharSequence!): kotlin.Boolean
open fun contentEquals(cs: kotlin.CharSequence!): kotlin.Boolean

open fun equalsIgnoreCase(p0: kotlin.String!): kotlin.Boolean
open fun equalsIgnoreCase(anotherString: kotlin.String!): kotlin.Boolean

open operator fun compareTo(p0: kotlin.String!): kotlin.Int
open operator fun compareTo(anotherString: kotlin.String!): kotlin.Int

open fun compareToIgnoreCase(p0: kotlin.String!): kotlin.Int
open fun compareToIgnoreCase(str: kotlin.String!): kotlin.Int

open fun regionMatches(p0: kotlin.Int, p1: kotlin.String!, p2: kotlin.Int, p3: kotlin.Int): kotlin.Boolean
open fun regionMatches(toffset: kotlin.Int, other: kotlin.String!, ooffset: kotlin.Int, len: kotlin.Int): kotlin.Boolean

open fun regionMatches(p0: kotlin.Boolean, p1: kotlin.Int, p2: kotlin.String!, p3: kotlin.Int, p4: kotlin.Int): kotlin.Boolean
open fun regionMatches(ignoreCase: kotlin.Boolean, toffset: kotlin.Int, other: kotlin.String!, ooffset: kotlin.Int, len: kotlin.Int): kotlin.Boolean

open fun startsWith(p0: kotlin.String!, p1: kotlin.Int): kotlin.Boolean
open fun startsWith(prefix: kotlin.String!, toffset: kotlin.Int): kotlin.Boolean

open fun startsWith(p0: kotlin.String!): kotlin.Boolean
open fun startsWith(prefix: kotlin.String!): kotlin.Boolean

open fun endsWith(p0: kotlin.String!): kotlin.Boolean
open fun endsWith(suffix: kotlin.String!): kotlin.Boolean

open fun hashCode(): kotlin.Int

open fun indexOf(p0: kotlin.Int): kotlin.Int
open fun indexOf(ch: kotlin.Int): kotlin.Int

open fun indexOf(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
open fun indexOf(ch: kotlin.Int, fromIndex: kotlin.Int): kotlin.Int

open fun indexOf(p0: kotlin.String!): kotlin.Int
open fun indexOf(str: kotlin.String!): kotlin.Int

open fun indexOf(p0: kotlin.String!, p1: kotlin.Int): kotlin.Int
open fun indexOf(str: kotlin.String!, fromIndex: kotlin.Int): kotlin.Int

private open fun indexOfSupplementary(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
private open fun indexOfSupplementary(ch: kotlin.Int, fromIndex: kotlin.Int): kotlin.Int

open fun lastIndexOf(p0: kotlin.Int): kotlin.Int
open fun lastIndexOf(ch: kotlin.Int): kotlin.Int

open fun lastIndexOf(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
open fun lastIndexOf(ch: kotlin.Int, fromIndex: kotlin.Int): kotlin.Int

open fun lastIndexOf(p0: kotlin.String!): kotlin.Int
open fun lastIndexOf(str: kotlin.String!): kotlin.Int

open fun lastIndexOf(p0: kotlin.String!, p1: kotlin.Int): kotlin.Int
open fun lastIndexOf(str: kotlin.String!, fromIndex: kotlin.Int): kotlin.Int

private open fun lastIndexOfSupplementary(p0: kotlin.Int, p1: kotlin.Int): kotlin.Int
private open fun lastIndexOfSupplementary(ch: kotlin.Int, fromIndex: kotlin.Int): kotlin.Int

open fun substring(p0: kotlin.Int): kotlin.String!
open fun substring(beginIndex: kotlin.Int): kotlin.String!

open fun substring(p0: kotlin.Int, p1: kotlin.Int): kotlin.String!
open fun substring(beginIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.String!

open fun subSequence(p0: kotlin.Int, p1: kotlin.Int): kotlin.CharSequence
open fun subSequence(beginIndex: kotlin.Int, endIndex: kotlin.Int): kotlin.CharSequence

open fun concat(p0: kotlin.String!): kotlin.String!
open fun concat(str: kotlin.String!): kotlin.String!

open fun replace(p0: kotlin.Char, p1: kotlin.Char): kotlin.String!
open fun replace(oldChar: kotlin.Char, newChar: kotlin.Char): kotlin.String!

open fun replace(p0: kotlin.CharSequence!, p1: kotlin.CharSequence!): kotlin.String!
open fun replace(target: kotlin.CharSequence!, replacement: kotlin.CharSequence!): kotlin.String!

open fun matches(p0: kotlin.String!): kotlin.Boolean
open fun matches(regex: kotlin.String!): kotlin.Boolean

open operator fun contains(p0: kotlin.CharSequence!): kotlin.Boolean
open operator fun contains(s: kotlin.CharSequence!): kotlin.Boolean

open fun replaceFirst(p0: kotlin.String!, p1: kotlin.String!): kotlin.String!
open fun replaceFirst(regex: kotlin.String!, replacement: kotlin.String!): kotlin.String!

open fun replaceAll(p0: kotlin.String!, p1: kotlin.String!): kotlin.String!
open fun replaceAll(regex: kotlin.String!, replacement: kotlin.String!): kotlin.String!

open fun split(p0: kotlin.String!, p1: kotlin.Int): kotlin.Array<kotlin.String!>!
open fun split(regex: kotlin.String!, limit: kotlin.Int): kotlin.Array<kotlin.String!>!

open fun split(p0: kotlin.String!): kotlin.Array<kotlin.String!>!
open fun split(regex: kotlin.String!): kotlin.Array<kotlin.String!>!

open fun toLowerCase(p0: java.util.Locale!): kotlin.String!
open fun toLowerCase(locale: java.util.Locale!): kotlin.String!

open fun toLowerCase(): kotlin.String!

open fun toUpperCase(p0: java.util.Locale!): kotlin.String!
open fun toUpperCase(locale: java.util.Locale!): kotlin.String!

open fun toUpperCase(): kotlin.String!

Expand All @@ -116,43 +116,43 @@ open fun toCharArray(): kotlin.CharArray!

open fun intern(): kotlin.String!

open operator fun get(p0: kotlin.Int): kotlin.Char
open operator fun get(index: kotlin.Int): kotlin.Char

private open class CaseInsensitiveComparator : java.util.Comparator<kotlin.String!>, java.io.Serializable

constructor()

constructor(p0: kotlin.String!)
constructor(original: kotlin.String!)

constructor(p0: kotlin.CharArray!)
constructor(value: kotlin.CharArray!)

constructor(p0: kotlin.CharArray!, p1: kotlin.Int, p2: kotlin.Int)
constructor(value: kotlin.CharArray!, offset: kotlin.Int, count: kotlin.Int)

constructor(p0: kotlin.IntArray!, p1: kotlin.Int, p2: kotlin.Int)
constructor(codePoints: kotlin.IntArray!, offset: kotlin.Int, count: kotlin.Int)

@kotlin.Deprecated(message = "Deprecated in Java")
constructor(p0: kotlin.ByteArray!, p1: kotlin.Int, p2: kotlin.Int, p3: kotlin.Int)
constructor(ascii: kotlin.ByteArray!, hibyte: kotlin.Int, offset: kotlin.Int, count: kotlin.Int)

@kotlin.Deprecated(message = "Deprecated in Java")
constructor(p0: kotlin.ByteArray!, p1: kotlin.Int)
constructor(ascii: kotlin.ByteArray!, hibyte: kotlin.Int)

constructor(p0: kotlin.ByteArray!, p1: kotlin.Int, p2: kotlin.Int, p3: kotlin.String!)
constructor(bytes: kotlin.ByteArray!, offset: kotlin.Int, length: kotlin.Int, charsetName: kotlin.String!)

constructor(p0: kotlin.ByteArray!, p1: kotlin.Int, p2: kotlin.Int, p3: java.nio.charset.Charset!)
constructor(bytes: kotlin.ByteArray!, offset: kotlin.Int, length: kotlin.Int, charset: java.nio.charset.Charset!)

constructor(p0: kotlin.ByteArray!, p1: kotlin.String!)
constructor(bytes: kotlin.ByteArray!, charsetName: kotlin.String!)

constructor(p0: kotlin.ByteArray!, p1: java.nio.charset.Charset!)
constructor(bytes: kotlin.ByteArray!, charset: java.nio.charset.Charset!)

constructor(p0: kotlin.ByteArray!, p1: kotlin.Int, p2: kotlin.Int)
constructor(bytes: kotlin.ByteArray!, offset: kotlin.Int, length: kotlin.Int)

constructor(p0: kotlin.ByteArray!)
constructor(bytes: kotlin.ByteArray!)

constructor(p0: java.lang.StringBuffer!)
constructor(buffer: java.lang.StringBuffer!)

constructor(p0: java.lang.StringBuilder!)
constructor(builder: java.lang.StringBuilder!)

constructor(p0: kotlin.CharArray!, p1: kotlin.Boolean)
constructor(value: kotlin.CharArray!, share: kotlin.Boolean)

@kotlin.Deprecated(message = "Deprecated in Java")
constructor(p0: kotlin.Int, p1: kotlin.Int, p2: kotlin.CharArray!)
constructor(offset: kotlin.Int, count: kotlin.Int, value: kotlin.CharArray!)
Loading

0 comments on commit aed6442

Please sign in to comment.