mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
8340024: In ClassReader, extract a constant for the superclass supertype_index
Backport-of: 68c4f36857
This commit is contained in:
committed by
Vitaly Provodin
parent
a79f790e26
commit
c030c1734d
@@ -2286,6 +2286,12 @@ public class ClassReader {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* A supertype_index value of 65535 specifies that the annotation appears on the superclass
|
||||
* in an extends clause of a class declaration, see JVMS 4.7.20.1
|
||||
*/
|
||||
public static final int SUPERCLASS_INDEX = 65535;
|
||||
|
||||
@Override
|
||||
public Void visitClassSymbol(Symbol.ClassSymbol s, Void unused) {
|
||||
ClassType t = (ClassType) s.type;
|
||||
@@ -2295,7 +2301,7 @@ public class ClassReader {
|
||||
interfaces.add(addTypeAnnotations(itf, classExtends(i++)));
|
||||
}
|
||||
t.interfaces_field = interfaces.toList();
|
||||
t.supertype_field = addTypeAnnotations(t.supertype_field, classExtends(65535));
|
||||
t.supertype_field = addTypeAnnotations(t.supertype_field, classExtends(SUPERCLASS_INDEX));
|
||||
if (t.typarams_field != null) {
|
||||
t.typarams_field =
|
||||
rewriteTypeParameters(
|
||||
|
||||
Reference in New Issue
Block a user