Author: jbevain
Date: 2007-05-17 08:29:10 -0400 (Thu, 17 May 2007)
New Revision: 77546
Modified:
trunk/cecil/linker/ChangeLog
trunk/cecil/linker/Mono.Linker/CleanStep.cs
trunk/cecil/linker/Mono.Linker/MarkStep.cs
trunk/cecil/linker/Mono.Linker/SweepStep.cs
Log:
2007-05-17 Jb Evain <[EMAIL PROTECTED]>
* Mono.Linker/CleanStep.cs
Mono.Linker/SweepStep.cs
Mono.Linker/MarkStep.cs:
Link only when necessary.
Modified: trunk/cecil/linker/ChangeLog
===================================================================
--- trunk/cecil/linker/ChangeLog 2007-05-17 12:19:28 UTC (rev 77545)
+++ trunk/cecil/linker/ChangeLog 2007-05-17 12:29:10 UTC (rev 77546)
@@ -1,5 +1,10 @@
2007-05-17 Jb Evain <[EMAIL PROTECTED]>
+ * Mono.Linker/CleanStep.cs
+ Mono.Linker/SweepStep.cs
+ Mono.Linker/MarkStep.cs:
+ Link only when necessary.
+
* Tests/Mono.Linker.Tests/AbstractLinkingTestFixture.cs
Tests/Mono.Linker.Tests/AbstractTestFixture.cs
Mono.Linker.csproj
Modified: trunk/cecil/linker/Mono.Linker/CleanStep.cs
===================================================================
--- trunk/cecil/linker/Mono.Linker/CleanStep.cs 2007-05-17 12:19:28 UTC (rev
77545)
+++ trunk/cecil/linker/Mono.Linker/CleanStep.cs 2007-05-17 12:29:10 UTC (rev
77546)
@@ -37,7 +37,7 @@
public void Process (LinkContext context)
{
foreach (AssemblyMarker am in context.GetAssemblies())
- if (am.Action != AssemblyAction.Skip)
+ if (am.Action != AssemblyAction.Link)
CleanAssembly (am.Assembly);
}
Modified: trunk/cecil/linker/Mono.Linker/MarkStep.cs
===================================================================
--- trunk/cecil/linker/Mono.Linker/MarkStep.cs 2007-05-17 12:19:28 UTC (rev
77545)
+++ trunk/cecil/linker/Mono.Linker/MarkStep.cs 2007-05-17 12:29:10 UTC (rev
77546)
@@ -113,6 +113,9 @@
{
AssemblyMarker am = _context.Resolve
(field.DeclaringType.Scope);
MarkAssembly (am);
+ if (am.Action != AssemblyAction.Link)
+ return;
+
FieldDefinition fd = field as FieldDefinition;
if (fd == null)
fd = am.Resolve (field);
@@ -142,6 +145,9 @@
AssemblyMarker am = _context.Resolve (type.Scope);
MarkAssembly (am);
+ if (am.Action != AssemblyAction.Link)
+ return;
+
TypeDefinition td = type as TypeDefinition;
if (td == null)
td = am.Resolve (type);
@@ -228,6 +234,9 @@
AssemblyMarker am = _context.Resolve
(method.DeclaringType.Scope);
MarkAssembly (am);
+ if (am.Action != AssemblyAction.Link)
+ return;
+
MethodDefinition md = method as MethodDefinition;
if (md == null)
md = am.Resolve (method);
Modified: trunk/cecil/linker/Mono.Linker/SweepStep.cs
===================================================================
--- trunk/cecil/linker/Mono.Linker/SweepStep.cs 2007-05-17 12:19:28 UTC (rev
77545)
+++ trunk/cecil/linker/Mono.Linker/SweepStep.cs 2007-05-17 12:29:10 UTC (rev
77546)
@@ -42,7 +42,7 @@
static void SweepAssembly (AssemblyMarker am, LinkContext
context)
{
- if (am.Action == AssemblyAction.Skip)
+ if (am.Action != AssemblyAction.Link)
return;
Hashtable typesUsed = new Hashtable ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches