[merged from monodroid by rodo]
part of
commit
0b9c100b60fc2502a0d6347d50cac444bb82b285
Author: Jonathan Pobst <monkey@jpobst.com>
Date: Wed Sep 28 15:50:39 2011 -0500
Instead of preserving every method with a [Register] attribute on it in Mono.Android.dll, only save the things that the user actually uses. Reduces HelloWorld release apk by ~1.3MB.
MarkMethodsIf (type.Methods, IsStaticConstructorPredicate);
}
MarkMethodsIf (type.Methods, IsStaticConstructorPredicate);
}
+ DoAdditionalTypeProcessing (type);
+
Annotations.Mark (type);
ApplyPreserveInfo (type);
Annotations.Mark (type);
ApplyPreserveInfo (type);
+ // Allow subclassers to mark additional things when marking a method
+ protected virtual void DoAdditionalTypeProcessing (TypeDefinition method)
+ {
+ }
+
void MarkTypeSpecialCustomAttributes (TypeDefinition type)
{
if (!type.HasCustomAttributes)
void MarkTypeSpecialCustomAttributes (TypeDefinition type)
{
if (!type.HasCustomAttributes)
if (ShouldParseMethodBody (method))
MarkMethodBody (method.Body);
if (ShouldParseMethodBody (method))
MarkMethodBody (method.Body);
+ DoAdditionalMethodProcessing (method);
+
Annotations.Mark (method);
ApplyPreserveMethods (method);
}
Annotations.Mark (method);
ApplyPreserveMethods (method);
}
+ // Allow subclassers to mark additional things when marking a method
+ protected virtual void DoAdditionalMethodProcessing (MethodDefinition method)
+ {
+ }
+
void MarkBaseMethods (MethodDefinition method)
{
IList base_methods = Annotations.GetBaseMethods (method);
void MarkBaseMethods (MethodDefinition method)
{
IList base_methods = Annotations.GetBaseMethods (method);