mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Bug fixes, installer, [Export]
Fixed a bunch of bugs in aggregate const initializers Fixed ZIP bugs Fixed a compilation case where we change protection while reifying a type Added another project kind - Dynamic Library Added [Export] for DLL method exporting Fixed some issues of things being generated as __NOINLINE incorrectly Fixed an issue with module extensions with not-yet-demanded on-demand methods Started adding Installer
This commit is contained in:
parent
efa22e51fb
commit
09016c8dc0
135 changed files with 3615 additions and 2337 deletions
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using Beefy.gfx;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using Beefy.gfx;
|
||||
using Beefy.sys;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.IO;
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Beefy.widgets;
|
||||
using Beefy;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy.utils;
|
||||
using Beefy.geom;
|
||||
using System.Diagnostics;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy.utils;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Beefy;
|
||||
using Beefy.utils;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Beefy;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.gfx
|
||||
{
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.gfx
|
||||
{
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Reflection;
|
||||
using System.Diagnostics;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy.gfx;
|
||||
|
||||
namespace Beefy.res
|
||||
|
|
|
@ -4,7 +4,6 @@ using System.Text;
|
|||
using System.Reflection;
|
||||
using Beefy.utils;
|
||||
using Beefy.gfx;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.res
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy;
|
||||
|
||||
namespace Beefy.res
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy;
|
||||
|
||||
namespace Beefy.res
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using Beefy;
|
||||
|
||||
namespace Beefy.res
|
||||
|
|
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Beefy.widgets;
|
||||
using Beefy;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.sys
|
||||
{
|
||||
|
|
|
@ -82,6 +82,7 @@ namespace Beefy.theme.dark
|
|||
|
||||
public ~this()
|
||||
{
|
||||
Debug.Assert(mHasClosed);
|
||||
Detach();
|
||||
}
|
||||
|
||||
|
@ -187,11 +188,6 @@ namespace Beefy.theme.dark
|
|||
|
||||
if (mWidgetWindow != null)
|
||||
{
|
||||
WidgetWindow.sOnMouseDown.Remove(scope => HandleMouseDown, true);
|
||||
WidgetWindow.sOnMouseWheel.Remove(scope => HandleMouseWheel, true);
|
||||
WidgetWindow.sOnMenuItemSelected.Remove(scope => HandleSysMenuItemSelected, true);
|
||||
WidgetWindow.sOnKeyDown.Remove(scope => HandleKeyDown, true);
|
||||
|
||||
mWidgetWindow.Close();
|
||||
}
|
||||
mCloseEvent();
|
||||
|
@ -249,6 +245,18 @@ namespace Beefy.theme.dark
|
|||
|
||||
Close();
|
||||
}
|
||||
|
||||
protected override void RemovedFromWindow()
|
||||
{
|
||||
base.RemovedFromWindow();
|
||||
|
||||
Debug.Assert(mHasClosed);
|
||||
|
||||
WidgetWindow.sOnMouseDown.Remove(scope => HandleMouseDown, true);
|
||||
WidgetWindow.sOnMouseWheel.Remove(scope => HandleMouseWheel, true);
|
||||
WidgetWindow.sOnMenuItemSelected.Remove(scope => HandleSysMenuItemSelected, true);
|
||||
WidgetWindow.sOnKeyDown.Remove(scope => HandleKeyDown, true);
|
||||
}
|
||||
}
|
||||
|
||||
static class DarkTooltipManager
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.utils
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Beefy.utils
|
||||
|
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Beefy.gfx;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Beefy.widgets
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
|
|
@ -852,7 +852,7 @@ namespace Beefy.widgets
|
|||
newSelection = GetRoot();
|
||||
while (newSelection.mChildAreaHeight > 0)
|
||||
{
|
||||
newSelection = GetRoot().mChildItems[GetRoot().mChildItems.Count - 1];
|
||||
newSelection = newSelection.mChildItems[newSelection.mChildItems.Count - 1];
|
||||
}
|
||||
case KeyCode.PageUp:
|
||||
int32 numIterations = (int32)(mScrollContentContainer.mHeight / selectedItem.mSelfHeight);
|
||||
|
|
|
@ -277,33 +277,6 @@ namespace System
|
|||
public bool Profile;
|
||||
}
|
||||
|
||||
namespace Runtime.InteropServices
|
||||
{
|
||||
public enum CallingConvention
|
||||
{
|
||||
Winapi = 1,
|
||||
Cdecl = 2,
|
||||
StdCall = 3,
|
||||
ThisCall = 4,
|
||||
FastCall = 5,
|
||||
|
||||
Default = Cdecl
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method /*3*/)]
|
||||
public struct DllImportAttribute : Attribute
|
||||
{
|
||||
public this(String dllName)
|
||||
{
|
||||
CallingConvention = .Default;
|
||||
CLink = false;
|
||||
}
|
||||
|
||||
public CallingConvention CallingConvention;
|
||||
public bool CLink;
|
||||
}
|
||||
}
|
||||
|
||||
public struct ImportAttribute : Attribute
|
||||
{
|
||||
public this(String libName)
|
||||
|
@ -311,6 +284,11 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public struct ExportAttribute : Attribute
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.StaticField | AttributeTargets.Field, .NotInherited)]
|
||||
public struct ThreadStaticAttribute : Attribute
|
||||
{
|
||||
|
|
|
@ -261,7 +261,7 @@ namespace System.Collections.Generic
|
|||
return -1;
|
||||
}
|
||||
|
||||
private int FindEntryAlt<TOther>(TOther key) where TOther : IOpEquals<TKey>, IHashable
|
||||
private int FindEntryWith<TAltKey>(TAltKey key) where TAltKey : IOpEquals<TKey>, IHashable
|
||||
{
|
||||
if (mBuckets != null)
|
||||
{
|
||||
|
@ -545,6 +545,20 @@ namespace System.Collections.Generic
|
|||
return false;
|
||||
}
|
||||
|
||||
public bool TryGetWith<TAltKey>(TAltKey key, out TKey matchKey, out TValue value) where TAltKey : IOpEquals<TKey>, IHashable
|
||||
{
|
||||
int_cosize i = (int_cosize)FindEntryWith(key);
|
||||
if (i >= 0)
|
||||
{
|
||||
matchKey = mEntries[i].mKey;
|
||||
value = mEntries[i].mValue;
|
||||
return true;
|
||||
}
|
||||
matchKey = default(TKey);
|
||||
value = default(TValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
public TValue GetValueOrDefault(TKey key)
|
||||
{
|
||||
int_cosize i = (int_cosize)FindEntry(key);
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Collections.Generic
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@ namespace System {
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace System
|
|||
{
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics;
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace System.Globalization
|
|||
{
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics;
|
||||
|
|
|
@ -8,7 +8,6 @@ namespace System {
|
|||
using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Diagnostics.Contracts;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// The original source was submitted to https://github.com/Microsoft/referencesource
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.IO
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace System
|
||||
|
|
|
@ -399,11 +399,11 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
static int GetHashCode(char8* ptr, int length)
|
||||
{
|
||||
int charsLeft = mLength;
|
||||
int charsLeft = length;
|
||||
int hash = 0;
|
||||
char8* curPtr = Ptr;
|
||||
char8* curPtr = ptr;
|
||||
let intSize = sizeof(int);
|
||||
while (charsLeft >= intSize)
|
||||
{
|
||||
|
@ -422,6 +422,11 @@ namespace System
|
|||
return hash;
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return GetHashCode(Ptr, mLength);
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.Append(this);
|
||||
|
@ -2495,7 +2500,7 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public struct StringView : Span<char8>, IFormattable, IPrintable
|
||||
public struct StringView : Span<char8>, IFormattable, IPrintable, IOpEquals<String>, IHashable
|
||||
{
|
||||
public this()
|
||||
{
|
||||
|
@ -2579,6 +2584,11 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
public int GetHashCode()
|
||||
{
|
||||
return String.[Friend]GetHashCode(mPtr, mLength);
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer)
|
||||
{
|
||||
strBuffer.Append(mPtr, mLength);
|
||||
|
@ -2840,11 +2850,13 @@ namespace System
|
|||
return String.UnQuoteString(Ptr, Length, outString);
|
||||
}
|
||||
|
||||
[NoDiscard]
|
||||
public StringView Substring(int pos)
|
||||
{
|
||||
return .(this, pos);
|
||||
}
|
||||
|
||||
[NoDiscard]
|
||||
public StringView Substring(int pos, int length)
|
||||
{
|
||||
return .(this, pos, length);
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace System {
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#if BF_PLATFORM_WINDOWS
|
||||
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
|
@ -9,7 +8,6 @@ namespace System
|
|||
{
|
||||
class Windows
|
||||
{
|
||||
|
||||
public struct COM_IUnknown
|
||||
{
|
||||
public enum ClsContext : uint32
|
||||
|
@ -1245,6 +1243,9 @@ namespace System
|
|||
public static extern IntBool GetFileMUIPath(uint32 dwFlags, char16* pcwszFilePath, char16* pwszLanguage, uint32* pcchLanguage,
|
||||
char16* pwszFileMUIPath, uint32* pcchFileMUIPath, uint64* pululEnumerator);
|
||||
|
||||
[CLink, StdCall]
|
||||
public static extern HInstance LoadLibraryW(char16* libFileName);
|
||||
|
||||
[CLink, StdCall]
|
||||
public static extern HInstance LoadLibraryExW(char16* libFileName, HModule hFile, uint32 dwFlags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue