Replaced JetMethodAnnotationWriter.writeFlags(BitSet) method with method taking indices of bits which should be set.
This commit is contained in:
@@ -135,7 +135,7 @@ public class FunctionCodegen {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
JetMethodAnnotationWriter aw = JetMethodAnnotationWriter.visitAnnotation(mv);
|
||||
aw.writeFlags(new BitSet());
|
||||
aw.writeFlags();
|
||||
aw.writeNullableReturnType(functionDescriptor.getReturnType().isNullable());
|
||||
aw.writeTypeParameters(jvmSignature.getKotlinTypeParameter());
|
||||
aw.writeReturnType(jvmSignature.getKotlinReturnType());
|
||||
|
||||
@@ -223,9 +223,7 @@ public class PropertyCodegen {
|
||||
|
||||
public static void generateJetPropertyAnnotation(MethodVisitor mv, @NotNull String kotlinType, @NotNull String typeParameters) {
|
||||
JetMethodAnnotationWriter aw = JetMethodAnnotationWriter.visitAnnotation(mv);
|
||||
BitSet flags = new BitSet();
|
||||
flags.set(JvmStdlibNames.JET_METHOD_FLAG_PROPERTY_BIT);
|
||||
aw.writeFlags(flags);
|
||||
aw.writeFlags(JvmStdlibNames.JET_METHOD_FLAG_PROPERTY_BIT);
|
||||
aw.writeTypeParameters(typeParameters);
|
||||
aw.writePropertyType(kotlinType);
|
||||
aw.visitEnd();
|
||||
|
||||
+9
-1
@@ -33,7 +33,15 @@ public class JetMethodAnnotationWriter {
|
||||
this.av = av;
|
||||
}
|
||||
|
||||
public void writeFlags(BitSet flags) {
|
||||
public void writeFlags(int... flagBits) {
|
||||
BitSet bitSet = new BitSet();
|
||||
for (int bit : flagBits) {
|
||||
bitSet.set(bit);
|
||||
}
|
||||
writeFlags(bitSet);
|
||||
}
|
||||
|
||||
private void writeFlags(BitSet flags) {
|
||||
int flagsValue = 0;
|
||||
for (int bit = 0; bit < flags.length(); bit++) {
|
||||
if (flags.get(bit)) {
|
||||
|
||||
Reference in New Issue
Block a user