Skip to content

Commit

Permalink
g3
Browse files Browse the repository at this point in the history
  • Loading branch information
jp2masa committed Jul 27, 2017
1 parent 960fb12 commit fff6d5b
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 8 deletions.
13 changes: 12 additions & 1 deletion Test.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26621.2
VisualStudioVersion = 15.0.26724.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assembler", "Assembler", "{BBB4022B-CC17-4A35-8881-65657260442F}"
EndProject
Expand Down Expand Up @@ -146,6 +146,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuessKernelGen3", "Demos\Gu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.System3", "source\Kernel\Cosmos.System\Cosmos.System3.csproj", "{F588033A-6B7D-4ABF-96C4-73D8B2271A6B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.System3_Plugs", "source\Kernel\Cosmos.System3_Plugs\Cosmos.System3_Plugs.csproj", "{756ECECD-B213-42F0-BF58-4A91B4C47FAA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -539,6 +541,14 @@ Global
{F588033A-6B7D-4ABF-96C4-73D8B2271A6B}.Release|Any CPU.Build.0 = Release|Any CPU
{F588033A-6B7D-4ABF-96C4-73D8B2271A6B}.Release|x86.ActiveCfg = Release|Any CPU
{F588033A-6B7D-4ABF-96C4-73D8B2271A6B}.Release|x86.Build.0 = Release|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Debug|x86.ActiveCfg = Debug|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Debug|x86.Build.0 = Debug|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Release|Any CPU.Build.0 = Release|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Release|x86.ActiveCfg = Release|Any CPU
{756ECECD-B213-42F0-BF58-4A91B4C47FAA}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -607,6 +617,7 @@ Global
{34AFAD8A-EBF0-4278-A99F-A33CA0094E7C} = {DD3367EF-D6B9-405C-AEB0-5E724C48F87D}
{9E58E949-7B71-45ED-9610-11DA287EE933} = {02FF94AF-6BA3-49ED-A027-A63F591C310D}
{F588033A-6B7D-4ABF-96C4-73D8B2271A6B} = {DE38917F-969B-486C-AF83-C59E5E52400A}
{756ECECD-B213-42F0-BF58-4A91B4C47FAA} = {DE38917F-969B-486C-AF83-C59E5E52400A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4418C803-277E-448F-A0A0-52788FA215AD}
Expand Down
1 change: 1 addition & 0 deletions Tests/Cosmos.TestRunner.Core/Cosmos.TestRunner.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<ProjectReference Include="..\..\source\Cosmos.IL2CPU\Cosmos.IL2CPU.csproj" />
<ProjectReference Include="..\..\source\Cosmos.IL2CPU.API\Cosmos.IL2CPU.API.csproj" />
<ProjectReference Include="..\..\source\Cosmos.System_Plugs\Cosmos.System_Plugs.csproj" />
<ProjectReference Include="..\..\source\Kernel\Cosmos.System3_Plugs\Cosmos.System3_Plugs.csproj" />
<ProjectReference Include="..\BoxingTests\BoxingTests.csproj" />
<ProjectReference Include="..\Cosmos.Compiler.Tests.Bcl\Cosmos.Compiler.Tests.Bcl.csproj" />
<ProjectReference Include="..\Cosmos.Compiler.Tests.Encryption\Cosmos.Compiler.Tests.Encryption.csproj" />
Expand Down
6 changes: 5 additions & 1 deletion Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ private void RunIL2CPU(string kernelFileName, string outputFile)
{
References = new List<string>() { kernelFileName };

if (!UseG3Kernel)
if (UseG3Kernel)
{
References.Add(Assembly.Load(new AssemblyName("Cosmos.System3_Plugs")).Location);
}
else
{
References.Add(Assembly.Load(new AssemblyName("Cosmos.Core_Plugs")).Location);
References.Add(Assembly.Load(new AssemblyName("Cosmos.Core_Asm")).Location);
Expand Down
2 changes: 1 addition & 1 deletion Tests/Cosmos.TestRunner.Core/TestKernelSets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static IEnumerable<Type> GetStableKernelTypes()

//yield return typeof(FrotzKernel.Kernel);

//yield return typeof(Guess.Boot);
//yield return typeof(KernelGen3.Boot);

/* Please see the notes on the kernel itself before enabling it */
//yield return typeof(GraphicTest.Kernel);
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.IL2CPU/CompilerEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CompilerEngine {
public Action<Exception> OnLogException;
protected static Action<string> mStaticLog = null;

public bool UseGen3Kernel { get; set; }
public static bool UseGen3Kernel { get; set; }
public string DebugMode { get; set; }
public string TraceAssemblies { get; set; }
public byte DebugCom { get; set; }
Expand Down
7 changes: 6 additions & 1 deletion source/Cosmos.IL2CPU/GCImplementationRefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ public static class GCImplementationRefs {
public static readonly MethodBase DecRefCountRef;

static GCImplementationRefs() {
var xType = Type.GetType("Cosmos.Core.GCImplementation, Cosmos.Core", true);
Type xType;
if (CompilerEngine.UseGen3Kernel) {
xType = Type.GetType("Cosmos.CPU.GCImplementation, Cosmos.CPU", true);
} else {
xType = Type.GetType("Cosmos.Core.GCImplementation, Cosmos.Core", true);
}
if (xType == null) {
throw new Exception("GCImplementation type not found!");
}
Expand Down
4 changes: 2 additions & 2 deletions source/Cosmos.IL2CPU/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ public static int Run(string[] args, Action<string> logMessage, Action<string> l

var xEngine = new CompilerEngine();

xEngine.UseGen3Kernel = false;
CompilerEngine.UseGen3Kernel = false;
if (CmdOptions.ContainsKey("UseGen3Kernel".ToLower())) {
xEngine.UseGen3Kernel = Convert.ToBoolean(CmdOptions["UseGen3Kernel".ToLower()]);
CompilerEngine.UseGen3Kernel = Convert.ToBoolean(CmdOptions["UseGen3Kernel".ToLower()]);
}

xEngine.DebugEnabled = Convert.ToBoolean(CmdOptions["DebugEnabled".ToLower()]);
Expand Down
2 changes: 1 addition & 1 deletion source/Kernel/Cosmos.CPU/GcHook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Cosmos.CPU {
[DebuggerStepThrough]
public static class GCImplementationRefs {
public static class GCImplementation {
private static void AcquireLock() {
throw new NotImplementedException();
}
Expand Down

0 comments on commit fff6d5b

Please sign in to comment.