actors example and related bug fixes
This commit is contained in:
@@ -115,8 +115,7 @@ public abstract class ClassBodyCodegen {
|
||||
|
||||
private void generateStaticInitializer() {
|
||||
if (staticInitializerChunks.size() > 0) {
|
||||
final MethodVisitor mv = v.newMethod(null, Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC,
|
||||
"<clinit>", "()V", null, null);
|
||||
final MethodVisitor mv = v.newMethod(null, Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC,"<clinit>", "()V", null, null);
|
||||
if (v.generateCode()) {
|
||||
mv.visitCode();
|
||||
|
||||
|
||||
@@ -207,6 +207,8 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
|
||||
@Override
|
||||
protected void generateSyntheticParts() {
|
||||
generateGetTypeInfo();
|
||||
|
||||
generateFieldForObjectInstance();
|
||||
generateFieldForClassObject();
|
||||
|
||||
@@ -220,8 +222,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
||||
throw new RuntimeException("Error generating primary constructor of class " + myClass.getName() + " with kind " + kind, e);
|
||||
}
|
||||
|
||||
generateGetTypeInfo();
|
||||
|
||||
generateAccessors();
|
||||
}
|
||||
|
||||
|
||||
@@ -679,7 +679,7 @@ public class JetTypeMapper {
|
||||
return new CallableMethod(owner, method, INVOKESPECIAL);
|
||||
}
|
||||
|
||||
static int getAccessModifiers(DeclarationDescriptorWithVisibility p, int defaultFlags) {
|
||||
public static int getAccessModifiers(DeclarationDescriptorWithVisibility p, int defaultFlags) {
|
||||
DeclarationDescriptor declaration = p.getContainingDeclaration();
|
||||
if(CodegenUtil.isInterface(declaration)) {
|
||||
return ACC_PUBLIC;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class PropertyCodegen {
|
||||
modifiers = access | Opcodes.ACC_STATIC;
|
||||
}
|
||||
else {
|
||||
modifiers = Opcodes.ACC_PRIVATE;
|
||||
modifiers = JetTypeMapper.getAccessModifiers(propertyDescriptor, 0);
|
||||
}
|
||||
if (!propertyDescriptor.isVar()) {
|
||||
modifiers |= Opcodes.ACC_FINAL;
|
||||
|
||||
Reference in New Issue
Block a user