Cosmos/source2/IL2CPU/Cosmos.IL2CPU/Plugs/System/Buffer.cs
EdwardNutting_cp cbd1b81ffb LabelName: Was removing underscores from method namesfor readability. Caused bug with Buffer.__Memcpy where Buffer.MemCpy and Buffer._Memcpy were also used labels.
PlugManager: bug in my design fixed.
FatFileSystem: completed the todo that said trailing periods should be ignored.
Buffer: Added __Memcpy plug so that String.Trim method compiles so that FAT code will compile.
2014-02-04 16:27:16 +00:00

24 lines
No EOL
828 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cosmos.IL2CPU.Plugs;
namespace Cosmos.IL2CPU.X86.Plugs.CustomImplementations.System {
[Plug(Target = typeof(global::System.Buffer))]
public class Buffer {
public static unsafe void __Memcpy(byte* src, byte* dest, int count)
{
global::System.Buffer.BlockCopy((Array)(object)*src, 0, (Array)(object)*dest, 0, count);
}
[PlugMethod(Assembler = typeof(Assemblers.Buffer_BlockCopy))]
public static void BlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count) {
}
public static void InternalBlockCopy(Array src, int srcOffset, Array dst, int dstOffset, int count) {
global::System.Buffer.BlockCopy(src, srcOffset, dst, dstOffset, count);
}
}
}