From 100a7887572083bc64be67fa81b89f0c34f15100 Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Tue, 8 Sep 2009 19:52:38 +0000 Subject: [PATCH] --- source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs | 3 +++ source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs | 2 ++ source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs | 3 +++ source2/IL2PCU/Cosmos.IL2CPU/Assembler/Assembler.cs | 10 ++++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs index 1347cdfdb..9222c40dd 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/Assembler.cs @@ -10,6 +10,9 @@ using Cosmos.IL2CPU.ILOpCodes; using Indy.IL2CPU; namespace Cosmos.IL2CPU.X86 { + // TODO: I think we need to later elminate this class + // Much of it is left over from the old build stuff, and info + // here actually belongs else where, not in the assembler public abstract class CosmosAssembler : Cosmos.IL2CPU.Assembler { //TODO: COM Port info - should be in assembler? Assembler should not know about comports... diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs index 8a35a2bc7..b4b6e028a 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerBin.cs @@ -12,9 +12,11 @@ namespace Cosmos.IL2CPU.X86 { } protected override void MethodBegin(MethodInfo aMethod) { + base.MethodBegin(aMethod); } protected override void MethodEnd(MethodInfo aMethod) { + base.MethodEnd(aMethod); } public AssemblerBin() : base(0) { } diff --git a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs index a9dcdb9fc..48ec82bc5 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU.X86/AssemblerNasm.cs @@ -14,9 +14,12 @@ namespace Cosmos.IL2CPU.X86 { public AssemblerNasm() : base( 0 ) { } protected override void MethodBegin(MethodInfo aMethod) { + base.MethodBegin(aMethod); + new Label(aMethod.MethodBase); } protected override void MethodEnd(MethodInfo aMethod) { + base.MethodEnd(aMethod); } // These are all temp functions until we move to the new assembler. diff --git a/source2/IL2PCU/Cosmos.IL2CPU/Assembler/Assembler.cs b/source2/IL2PCU/Cosmos.IL2CPU/Assembler/Assembler.cs index 3df0efa86..ca03fc11a 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU/Assembler/Assembler.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU/Assembler/Assembler.cs @@ -105,8 +105,14 @@ namespace Cosmos.IL2CPU { } } - protected abstract void MethodBegin(MethodInfo aMethod); - protected abstract void MethodEnd(MethodInfo aMethod); + protected virtual void MethodBegin(MethodInfo aMethod) { + new Comment(this, "---------------------------------------------------------"); + new Comment(this, "Begin Method: " + aMethod.MethodBase.Name); + } + + protected virtual void MethodEnd(MethodInfo aMethod) { + new Comment(this, "End Method: " + aMethod.MethodBase.Name); + } public void ProcessMethod(MethodInfo aMethod, List aOpCodes) { // We check this here and not scanner as when scanner makes these