Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
quajak authored Apr 16, 2023
2 parents df44f3a + 77c4b7f commit 235043d
Show file tree
Hide file tree
Showing 42 changed files with 182 additions and 521 deletions.
13 changes: 0 additions & 13 deletions Build.sln
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Runner", "Test Runner"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cosmos.TestRunner.TestController", "Tests\Cosmos.TestRunner.TestController\Cosmos.TestRunner.TestController.csproj", "{2EEC1BF8-758F-4D9D-B063-8CF005468B24}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TheRingMaster", "source\TheRingMaster\TheRingMaster.csproj", "{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{3C4B0261-3B1D-4503-97F1-AC0252D500E6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NASM", "Tools\NASM\NASM.csproj", "{A7C295D2-8DEA-4CAE-A8CB-44CD0529EC65}"
Expand Down Expand Up @@ -364,16 +362,6 @@ Global
{2EEC1BF8-758F-4D9D-B063-8CF005468B24}.Release-CI|Any CPU.Build.0 = Release|Any CPU
{2EEC1BF8-758F-4D9D-B063-8CF005468B24}.TEST|Any CPU.ActiveCfg = TEST|Any CPU
{2EEC1BF8-758F-4D9D-B063-8CF005468B24}.TEST|Any CPU.Build.0 = TEST|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Debug-CI|Any CPU.ActiveCfg = Debug|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Debug-CI|Any CPU.Build.0 = Debug|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Release|Any CPU.Build.0 = Release|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Release-CI|Any CPU.ActiveCfg = Release|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.Release-CI|Any CPU.Build.0 = Release|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.TEST|Any CPU.ActiveCfg = TEST|Any CPU
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817}.TEST|Any CPU.Build.0 = TEST|Any CPU
{A7C295D2-8DEA-4CAE-A8CB-44CD0529EC65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7C295D2-8DEA-4CAE-A8CB-44CD0529EC65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7C295D2-8DEA-4CAE-A8CB-44CD0529EC65}.Debug-CI|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -476,7 +464,6 @@ Global
{366C2EC6-B9D8-4676-9C88-98F041B8FC93} = {CAF5EB57-6CAD-446D-8FC7-4C03D4B996A6}
{535A7E34-AC73-4781-B791-2C81A9066A2C} = {CD3F5E45-8B24-424F-ADF1-0211712F4CB7}
{2EEC1BF8-758F-4D9D-B063-8CF005468B24} = {D4833110-032D-40E3-ACB3-F11583727B08}
{0EE3DF1C-44E6-4669-88AA-D8D2612DA817} = {6A15C540-8278-4B9C-B890-FA57FB6AE6A6}
{A7C295D2-8DEA-4CAE-A8CB-44CD0529EC65} = {3C4B0261-3B1D-4503-97F1-AC0252D500E6}
{C984AF76-66C2-4A5F-A3DC-9F8FE0CD4D2F} = {9C8A3E55-9045-44CA-BFD4-16D5B4343A90}
{0BA0EC69-F124-44C1-823D-C97FE3AEC59E} = {D95021E1-A2C9-4829-819E-ED433AF13162}
Expand Down
Binary file removed Docs/RingsGen3.vsdx
Binary file not shown.
Binary file removed Docs/RingsGen3.xlsx
Binary file not shown.
12 changes: 0 additions & 12 deletions Tests/.editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions source/Cosmos.Build.Tasks/.editorconfig

This file was deleted.

49 changes: 0 additions & 49 deletions source/Cosmos.Build.Tasks/TheRingMaster.cs

This file was deleted.

2 changes: 0 additions & 2 deletions source/Cosmos.Core/.editorconfig

This file was deleted.

2 changes: 0 additions & 2 deletions source/Cosmos.Core_Plugs/.editorconfig

This file was deleted.

11 changes: 3 additions & 8 deletions source/Cosmos.Core_Plugs/MemoryOperationsImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ unsafe private static void CopyTiny(byte* dest, byte* src, int size)
{
/* We do copy in reverse */
byte* dd = dest + size;
byte* ss = src + size;
byte* ss = src + size;

switch (size)
{
Expand Down Expand Up @@ -750,15 +750,10 @@ unsafe public static void Copy(byte* dest, byte* src, int size)
return;
}

int xByteRemaining;
const int xBlockSize = 128;

#if NETSTANDARD1_5
xBlocksNum = size / xBlockSize;
xByteRemaining = size % xBlockSize;
#else
var xBlocksNum = Math.DivRem(size, xBlockSize, out xByteRemaining);
#endif
var xBlocksNum = Math.DivRem(size, xBlockSize, out int xByteRemaining);

Global.debugger.SendInternal($"size {size} is composed of {xBlocksNum} blocks of {xBlockSize} bytes with {xByteRemaining} remainder");

// TODO call Copy128Blocks()
Expand Down
3 changes: 1 addition & 2 deletions source/Cosmos.Core_Plugs/System/ArrayImpl.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using Cosmos.Core;
using Cosmos.Debug.Kernel;
using IL2CPU.API;
using IL2CPU.API.Attribs;

Expand Down Expand Up @@ -154,4 +153,4 @@ public static Array CreateInstance(Type type, int size)
return GCImpl.CreateNewArray((int)VTablesImpl.GetSize(((CosmosRuntimeType)type).mTypeId), size);
}
}
}
}
7 changes: 1 addition & 6 deletions source/Cosmos.Core_Plugs/System/CharUnicodeInfoImpl.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IL2CPU.API;
using IL2CPU.API.Attribs;

namespace Cosmos.Core_Plugs.System
Expand All @@ -15,4 +10,4 @@ public static void Cctor()

}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/DelegateImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public static bool Equals(Delegate aThis, object aThat)
}

}
}
}
5 changes: 2 additions & 3 deletions source/Cosmos.Core_Plugs/System/EnvironmentImpl.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;

using IL2CPU.API.Attribs;
using System;

namespace Cosmos.Core_Plugs.System
{
Expand Down Expand Up @@ -54,4 +53,4 @@ public static void CCtor()
{
}
}
}
}
3 changes: 1 addition & 2 deletions source/Cosmos.Core_Plugs/System/EventHandlerImpl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using IL2CPU.API;
using IL2CPU.API.Attribs;

namespace Cosmos.Core_Plugs.System {
Expand All @@ -16,4 +15,4 @@ public static bool Equals(EventHandler aThis, object aThat) {
return false;
}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/ExceptionImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ public static void GetStackTracesDeepCopy(Exception aException, ref byte[] aByte
throw new NotImplementedException();
}
}
}
}
7 changes: 3 additions & 4 deletions source/Cosmos.Core_Plugs/System/MarvinImpl.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;

using IL2CPU.API.Attribs;
using IL2CPU.API.Attribs;
using System;

namespace Cosmos.Core_Plugs.System
{
Expand All @@ -18,4 +17,4 @@ public static ulong GenerateSeed()
return BitConverter.ToUInt64(buffer, 0);
}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/MathFImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public static class MathFImpl

public static float Cos(float d) => (float)Math.Cos(d);
}
}
}
2 changes: 0 additions & 2 deletions source/Cosmos.Core_Plugs/System/MathImpl.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using IL2CPU.API.Attribs;
using XSharp;
using XSharp.Assembler;
Expand Down
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/MulticastDelegateImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public static bool Equals(MulticastDelegate aThis, object aThat)
return false;
}
}
}
}
3 changes: 1 addition & 2 deletions source/Cosmos.Core_Plugs/System/OutOfMemoryExceptionImpl.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using IL2CPU.API;
using IL2CPU.API.Attribs;

namespace Cosmos.Core_Plugs.System {
Expand All @@ -9,4 +8,4 @@ public static void Ctor(OutOfMemoryException aThis) {
//
}
}
}
}
10 changes: 3 additions & 7 deletions source/Cosmos.Core_Plugs/System/RuntimeMethodHandleImpl.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using IL2CPU.API.Attribs;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using IL2CPU.API.Attribs;
using System;

namespace Cosmos.Core_Plugs.System
{
Expand Down Expand Up @@ -89,4 +85,4 @@ public static bool IsCAVisibleFromDecoratedType(object aQCallTypeHandle, object
throw new NotImplementedException();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ public static class RuntimeType_RuntimeTypeCache {
// return "**Reflection is not yet supported**";
//}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/RuntimeTypeHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ public static void MakeSZArray(object aQCallTypeHandle, object aObjectHandleOnSt
throw new NotImplementedException();
}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/RuntimeTypeImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ public static FieldInfo[] GetFields(object aThis, BindingFlags aBindingFlags)
throw new NotImplementedException();
}
}
}
}
6 changes: 1 addition & 5 deletions source/Cosmos.Core_Plugs/System/SRImpl.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;

using IL2CPU.API.Attribs;

namespace Cosmos.Core_Plugs.System
Expand Down Expand Up @@ -119,4 +115,4 @@ public static string InternalGetResourceString(string aKey)
return aKey;
}
}
}
}
14 changes: 6 additions & 8 deletions source/Cosmos.Core_Plugs/System/StringImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ public static unsafe char get_Chars(
return *(aFirstChar + aIndex);
}



public static bool IsAscii(string aThis)
{
for (int i = 0; i < aThis.Length; i++)
Expand Down Expand Up @@ -409,13 +407,13 @@ public static int IndexOf(string aThis, char value, int startIndex, int count)

// HACK: TODO - improve efficiency of this.
//How do we access the raw memory to copy it into a char array?
public static char[] ToCharArray(string aThis)
public static unsafe char[] ToCharArray(string aThis)
{
var result = new char[aThis.Length];
char[] result = new char[aThis.Length];

for (int i = 0; i < aThis.Length; i++)
fixed (char* P1 = aThis, P2 = result)
{
result[i] = aThis[i];
MemoryOperationsImpl.Copy((byte*)P2, (byte*)P1, aThis.Length * sizeof(char));
}

return result;
Expand Down Expand Up @@ -638,7 +636,7 @@ public static int LastIndexOf(string aThis, string aString, int aIndex)

public static int LastIndexOf(string aThis, string aString, int aIndex, int aCount)
{
if (aString == String.Empty)
if (aString == string.Empty)
{
if (aIndex > aThis.Length)
{
Expand Down Expand Up @@ -1024,4 +1022,4 @@ public static unsafe int GetNonRandomizedHashCode(string aString)
}
}
}
}
}
13 changes: 4 additions & 9 deletions source/Cosmos.Core_Plugs/System/TimeZoneInfoImpl.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IL2CPU.API.Attribs;
using IL2CPU.API.Attribs;
using System;

namespace Cosmos.Core_Plugs.System
{
Expand All @@ -13,8 +9,7 @@ public enum TimeZoneInfoOptions
NoThrowOnInvalidTime = 0x2
}


[Plug(typeof(global::System.TimeZoneInfo))]
[Plug(typeof(TimeZoneInfo))]
class TimeZoneInfoImpl
{
public static TimeZoneInfo get_Local()
Expand All @@ -33,4 +28,4 @@ public static TimeSpan GetLocalUtcOffset(DateTime aDateTime, TimeZoneInfoOptions
throw new NotImplementedException();
}
}
}
}
2 changes: 1 addition & 1 deletion source/Cosmos.Core_Plugs/System/TypeImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ public static CosmosRuntimeType GetType(string aName)
return new CosmosRuntimeType((uint)typeId);
}
}
}
}
8 changes: 0 additions & 8 deletions source/Cosmos.Debug.DebugConnectors/.editorconfig

This file was deleted.

Loading

0 comments on commit 235043d

Please sign in to comment.