Module 'util.runtime' doesn't depend on intellij-core anymore

This commit is contained in:
Alexander Udalov
2014-03-28 20:00:06 +04:00
parent d719222bc4
commit 59c04f5aff
7 changed files with 10 additions and 33 deletions
@@ -168,16 +168,12 @@ public class PropertyCodegen extends GenerationStateAware {
if (descriptor.getAnnotations().isEmpty()) return;
ReceiverParameterDescriptor receiver = descriptor.getReceiverParameter();
Type receiverAsmType = receiver == null ? null : typeMapper.mapType(receiver.getType());
Method method = JvmAbi.getSyntheticMethodSignatureForAnnotatedProperty(descriptor.getName(), receiverAsmType);
String name = JvmAbi.getSyntheticMethodNameForAnnotatedProperty(descriptor.getName());
String desc = receiver == null ? "()V" : "(" + typeMapper.mapType(receiver.getType()) + ")V";
if (!isTrait(context.getContextDescriptor()) || kind == OwnerKind.TRAIT_IMPL) {
MethodVisitor mv = v.newMethod(null,
ACC_DEPRECATED | ACC_FINAL | ACC_PRIVATE | ACC_STATIC | ACC_SYNTHETIC,
method.getName(),
method.getDescriptor(),
null,
null);
int flags = ACC_DEPRECATED | ACC_FINAL | ACC_PRIVATE | ACC_STATIC | ACC_SYNTHETIC;
MethodVisitor mv = v.newMethod(null, flags, name, desc, null, null);
AnnotationCodegen.forMethod(mv, typeMapper).genAnnotations(descriptor);
mv.visitCode();
mv.visitInsn(Opcodes.RETURN);
@@ -189,7 +185,7 @@ public class PropertyCodegen extends GenerationStateAware {
}
if (kind != OwnerKind.TRAIT_IMPL) {
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, method);
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, new Method(name, desc));
}
}
@@ -41,8 +41,7 @@ public class SyntheticMethodForAnnotatedPropertyGenTest extends CodegenTestCase
return "properties/syntheticMethod";
}
private static final String TEST_SYNTHETIC_METHOD_NAME =
JvmAbi.getSyntheticMethodSignatureForAnnotatedProperty(Name.identifier("property"), null).getName();
private static final String TEST_SYNTHETIC_METHOD_NAME = JvmAbi.getSyntheticMethodNameForAnnotatedProperty(Name.identifier("property"));
public void testInClass() {
loadFile();
+1 -1
View File
@@ -7,7 +7,7 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" scope="PROVIDED" name="intellij-core" level="project" />
<orderEntry type="library" exported="" scope="PROVIDED" name="intellij-core" level="project" />
<orderEntry type="module" module-name="util.runtime" exported="" />
<orderEntry type="module" module-name="Kotlin" exported="" />
<orderEntry type="library" exported="" name="kotlin-runtime" level="project" />