зеркало из https://github.com/mono/ikvm-fork.git
Removed last remaining TypeAsBuilder usage.
This commit is contained in:
Родитель
fe7c453a90
Коммит
933bdf2f97
|
@ -2121,14 +2121,6 @@ namespace IKVM.Internal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal override TypeBuilder TypeAsBuilder
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return typeBuilder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal override bool IsMapUnsafeException
|
internal override bool IsMapUnsafeException
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
|
@ -623,9 +623,10 @@ namespace IKVM.Internal
|
||||||
// baking the outer type before the inner type) and that the inner and outer
|
// baking the outer type before the inner type) and that the inner and outer
|
||||||
// class live in the same class loader (when doing a multi target compilation,
|
// class live in the same class loader (when doing a multi target compilation,
|
||||||
// it is possible to split the two classes acros assemblies)
|
// it is possible to split the two classes acros assemblies)
|
||||||
if (outerClassWrapper.impl is JavaTypeImpl && outerClassWrapper.GetClassLoader() == wrapper.GetClassLoader())
|
JavaTypeImpl oimpl = outerClassWrapper.impl as JavaTypeImpl;
|
||||||
|
if (oimpl != null && outerClassWrapper.GetClassLoader() == wrapper.GetClassLoader())
|
||||||
{
|
{
|
||||||
ClassFile outerClassFile = ((JavaTypeImpl)outerClassWrapper.impl).classFile;
|
ClassFile outerClassFile = oimpl.classFile;
|
||||||
ClassFile.InnerClass[] outerInnerClasses = outerClassFile.InnerClasses;
|
ClassFile.InnerClass[] outerInnerClasses = outerClassFile.InnerClasses;
|
||||||
if (outerInnerClasses == null)
|
if (outerInnerClasses == null)
|
||||||
{
|
{
|
||||||
|
@ -657,7 +658,7 @@ namespace IKVM.Internal
|
||||||
}
|
}
|
||||||
if (outerClassWrapper != null)
|
if (outerClassWrapper != null)
|
||||||
{
|
{
|
||||||
outer = outerClassWrapper.TypeAsBuilder;
|
outer = oimpl.typeBuilder;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -779,7 +780,7 @@ namespace IKVM.Internal
|
||||||
}
|
}
|
||||||
if (f.IsAnnotation && Annotation.HasRetentionPolicyRuntime(f.Annotations))
|
if (f.IsAnnotation && Annotation.HasRetentionPolicyRuntime(f.Annotations))
|
||||||
{
|
{
|
||||||
annotationBuilder = new AnnotationBuilder(this);
|
annotationBuilder = new AnnotationBuilder(this, outer);
|
||||||
((AotTypeWrapper)wrapper).SetAnnotation(annotationBuilder);
|
((AotTypeWrapper)wrapper).SetAnnotation(annotationBuilder);
|
||||||
}
|
}
|
||||||
// For Java 5 Enum types, we generate a nested .NET enum.
|
// For Java 5 Enum types, we generate a nested .NET enum.
|
||||||
|
@ -1577,13 +1578,15 @@ namespace IKVM.Internal
|
||||||
sealed class AnnotationBuilder : Annotation
|
sealed class AnnotationBuilder : Annotation
|
||||||
{
|
{
|
||||||
private JavaTypeImpl impl;
|
private JavaTypeImpl impl;
|
||||||
|
private TypeBuilder outer;
|
||||||
private TypeBuilder annotationTypeBuilder;
|
private TypeBuilder annotationTypeBuilder;
|
||||||
private TypeBuilder attributeTypeBuilder;
|
private TypeBuilder attributeTypeBuilder;
|
||||||
private ConstructorBuilder defineConstructor;
|
private ConstructorBuilder defineConstructor;
|
||||||
|
|
||||||
internal AnnotationBuilder(JavaTypeImpl o)
|
internal AnnotationBuilder(JavaTypeImpl o, TypeBuilder outer)
|
||||||
{
|
{
|
||||||
this.impl = o;
|
this.impl = o;
|
||||||
|
this.outer = outer;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Link()
|
internal void Link()
|
||||||
|
@ -1636,7 +1639,7 @@ namespace IKVM.Internal
|
||||||
{
|
{
|
||||||
typeAttributes |= TypeAttributes.NestedAssembly;
|
typeAttributes |= TypeAttributes.NestedAssembly;
|
||||||
}
|
}
|
||||||
attributeTypeBuilder = o.outerClassWrapper.TypeAsBuilder.DefineNestedType(GetInnerClassName(o.outerClassWrapper.Name, name) + "Attribute", typeAttributes, annotationAttributeBaseType.TypeAsBaseType);
|
attributeTypeBuilder = outer.DefineNestedType(GetInnerClassName(o.outerClassWrapper.Name, name) + "Attribute", typeAttributes, annotationAttributeBaseType.TypeAsBaseType);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2604,16 +2604,6 @@ namespace IKVM.Internal
|
||||||
get;
|
get;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal virtual TypeBuilder TypeAsBuilder
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
TypeBuilder typeBuilder = TypeAsTBD as TypeBuilder;
|
|
||||||
Debug.Assert(typeBuilder != null);
|
|
||||||
return typeBuilder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal Type TypeAsSignatureType
|
internal Type TypeAsSignatureType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Загрузка…
Ссылка в новой задаче