diff --git a/Source/Data/IR-Instructions.json b/Source/Data/IR-Instructions.json index 4f9b7e9aa1..e453d10a7d 100644 --- a/Source/Data/IR-Instructions.json +++ b/Source/Data/IR-Instructions.json @@ -1494,7 +1494,7 @@ "IgnoreInstructionBasicBlockTargets": "true" }, { - "Name": "GCPoint", + "Name": "SafePoint", "FamilyName": "IR", "ResultCount": 0, "OperandCount": 0, diff --git a/Source/Mosa.Compiler.Framework/Compiler.cs b/Source/Mosa.Compiler.Framework/Compiler.cs index 0afdf88c98..5eb29149d5 100644 --- a/Source/Mosa.Compiler.Framework/Compiler.cs +++ b/Source/Mosa.Compiler.Framework/Compiler.cs @@ -198,7 +198,7 @@ public sealed class Compiler new DeadBlockStage(), new AdvancedBlockOrderingStage(), - //new PreciseGCStage(), + new SafePointStage(), new CodeGenerationStage(), mosaSettings.EmitBinary ? new ProtectedRegionLayoutStage() : null, diff --git a/Source/Mosa.Compiler.Framework/IR.cs b/Source/Mosa.Compiler.Framework/IR.cs index 87c92bc72f..4249c041a3 100644 --- a/Source/Mosa.Compiler.Framework/IR.cs +++ b/Source/Mosa.Compiler.Framework/IR.cs @@ -224,7 +224,7 @@ public static class IR public static readonly BaseInstruction Truncate64x32 = new Truncate64x32(); public static readonly BaseInstruction TryEnd = new TryEnd(); public static readonly BaseInstruction TryStart = new TryStart(); - public static readonly BaseInstruction GCPoint = new GCPoint(); + public static readonly BaseInstruction SafePoint = new SafePoint(); public static readonly BaseInstruction Rethrow = new Rethrow(); public static readonly BaseInstruction GetVirtualFunctionPtr = new GetVirtualFunctionPtr(); public static readonly BaseInstruction MemoryCopy = new MemoryCopy(); diff --git a/Source/Mosa.Compiler.Framework/Instructions/GCPoint.cs b/Source/Mosa.Compiler.Framework/Instructions/SafePoint.cs similarity index 77% rename from Source/Mosa.Compiler.Framework/Instructions/GCPoint.cs rename to Source/Mosa.Compiler.Framework/Instructions/SafePoint.cs index 19e9259aab..dea9f8bddd 100644 --- a/Source/Mosa.Compiler.Framework/Instructions/GCPoint.cs +++ b/Source/Mosa.Compiler.Framework/Instructions/SafePoint.cs @@ -5,11 +5,11 @@ namespace Mosa.Compiler.Framework.Instructions; /// -/// GCPoint +/// SafePoint /// -public sealed class GCPoint : BaseIRInstruction +public sealed class SafePoint : BaseIRInstruction { - public GCPoint() + public SafePoint() : base(0, 0) { } diff --git a/Source/Mosa.Compiler.Framework/Stages/PreciseGCStage.cs b/Source/Mosa.Compiler.Framework/Stages/SafePointStage.cs similarity index 73% rename from Source/Mosa.Compiler.Framework/Stages/PreciseGCStage.cs rename to Source/Mosa.Compiler.Framework/Stages/SafePointStage.cs index 80c5dab7c6..bece041e2b 100644 --- a/Source/Mosa.Compiler.Framework/Stages/PreciseGCStage.cs +++ b/Source/Mosa.Compiler.Framework/Stages/SafePointStage.cs @@ -3,9 +3,9 @@ namespace Mosa.Compiler.Framework.Stages; /// -/// This stage determines were object references are located in code. +/// This stage inserts the GC safe points. /// -public class PreciseGCStage : BaseMethodCompilerStage +public class SafePointStage : BaseMethodCompilerStage { private TraceLog trace;