1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-22 09:38:01 +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:
Brian Fiete 2019-08-27 08:04:41 -07:00
parent efa22e51fb
commit 09016c8dc0
135 changed files with 3615 additions and 2337 deletions

View file

@ -10,6 +10,7 @@ IntermediateType = "ObjectAndIRCode"
ConfigSelections = {mintest2 = {Enabled = false}}
[Configs.Debug.Win64]
BfOptimizationLevel = "O0"
IntermediateType = "ObjectAndIRCode"
COptimizationLevel = "Og"

View file

@ -291,33 +291,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)
@ -325,6 +298,11 @@ namespace System
}
}
public struct ExportAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.StaticField | AttributeTargets.Field, .NotInherited)]
public struct ThreadStaticAttribute : Attribute
{

View file

@ -7,7 +7,6 @@
#endif
using System;
using System.Runtime;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Threading;

View file

@ -1,5 +1,4 @@
using System;
using System.Runtime.InteropServices;
namespace System.Collections
{

View file

@ -19,7 +19,6 @@ namespace System
///#if GENERICS_WORK
/// using System.Numerics;
///#endif
using System.Runtime.InteropServices;
using System.Diagnostics.Contracts;
public struct Double : double, IHashable, IOpComparable, IOpNegatable, ICanBeNaN /*: IComparable, IFormattable, IConvertible

View file

@ -16,7 +16,6 @@ namespace System
{
//This class contains only static members and doesn't require serialization.
using System;
using System.Runtime;
using System.Diagnostics.Contracts;
using System.Diagnostics;

View file

@ -1,6 +1,5 @@
using System.Reflection;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace System

View file

@ -20,7 +20,6 @@
namespace System.Threading
{
using System;
using System.Runtime;
using System.Threading;
using System.Diagnostics.Contracts;
using System.Diagnostics;

View file

@ -1,387 +0,0 @@
LastConfig = "Debug"
LastPlatform = "Win64"
RecentFilesList = ["c:\\beef\\ide\\mintest\\src\\main2.cs", "c:\\beef\\ide\\mintest\\src\\main3.cs", "c:\\beef\\ide\\mintest\\src\\main.cs", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\String.cs", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Collections\\Generic\\List.bf", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Array.cs", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\IComparable.cs", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Collections\\Generic\\Dictionary.bf", "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Object.cs", "Disassembly"]
[MainWindow]
X = 128
Y = 166
Width = 2434
Height = 1847
[MainDockingFrame]
Type = "DockingFrame"
SplitType = 2
[[MainDockingFrame.DockedWidgets]]
RequestedWidth = 250.000000
RequestedHeight = 1133.000000
SizePriority = 1133.000000
Type = "DockingFrame"
SplitType = 1
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
RequestedWidth = 263.000000
RequestedHeight = 250.000000
SizePriority = 0.000000
Type = "TabbedView"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Workspace"
TabWidth = 95.000000
Type = "ProjectPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
IsFillWidget = true
RequestedWidth = 1639.000000
RequestedHeight = 150.000000
SizePriority = 1639.000000
DefaultDocumentsTabbedView = true
Type = "TabbedView"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Contracts.cs"
TabWidth = 110.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Diagnostics\\Contracts\\Contracts.cs"
CursorPos = 2270
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "internal.cpp"
TabWidth = 108.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\beefrt\\rt\\internal.cpp"
CursorPos = 20281
VertPos = 0.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "main4.cs"
TabWidth = 90.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\mintest2\\src\\main4.cs"
CursorPos = 182
VertPos = 0.000000
ProjectName = "mintest2"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Internal.cs"
TabWidth = 98.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Internal.cs"
CursorPos = 2881
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Array.cs"
TabWidth = 86.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Array.cs"
CursorPos = 608
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Variant.cs"
TabWidth = 96.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Variant.cs"
CursorPos = 4292
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "String.cs"
TabWidth = 89.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\String.cs"
CursorPos = 10914
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Runtime.bf"
TabWidth = 102.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Runtime.bf"
CursorPos = 2021
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "List.bf"
TabWidth = 74.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Collections\\Generic\\List.bf"
CursorPos = 9410
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Event.bf"
TabWidth = 86.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Event.bf"
CursorPos = 743
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "IEnumerator.cs"
TabWidth = 125.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Collections\\IEnumerator.cs"
CursorPos = 464
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Type.cs"
TabWidth = 83.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Type.cs"
CursorPos = 1538
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Disassembly"
TabWidth = 112.000000
Type = "DisassemblyPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Object.cs"
TabWidth = 93.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Object.cs"
CursorPos = 452
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "main2.cs"
TabWidth = 90.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\src\\main2.cs"
CursorPos = 2845
VertPos = 3060.000000
ProjectName = "mintest"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "main3.cs"
TabWidth = 90.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\src\\main3.cs"
CursorPos = 1954
VertPos = 0.000000
ProjectName = "mintest"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "main.cs"
TabWidth = 83.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\src\\main.cs"
CursorPos = 4383
VertPos = 0.000000
ProjectName = "mintest"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Nullable.cs"
TabWidth = 103.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Nullable.cs"
CursorPos = 623
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "GC.cs"
TabWidth = 72.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\GC.cs"
CursorPos = 1934
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "testdll.cpp"
TabWidth = 100.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\beeftools\\testdll\\testdll.cpp"
CursorPos = 939
VertPos = 0.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "stdio.h"
TabWidth = 79.000000
Type = "SourceViewPanel"
FilePath = "c:\\program files (x86)\\windows kits\\10\\include\\10.0.16299.0\\ucrt\\stdio.h"
CursorPos = 27765
VertPos = 0.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Profiler.bf"
TabWidth = 96.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Diagnostics\\Profiler.bf"
CursorPos = 450
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Dictionary.bf"
TabWidth = 113.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\Collections\\Generic\\Dictionary.bf"
CursorPos = 3575
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "IComparable.cs"
TabWidth = 130.000000
Type = "SourceViewPanel"
FilePath = "c:\\beef\\ide\\mintest\\minlib\\src\\System\\IComparable.cs"
CursorPos = 75
VertPos = 0.000000
ProjectName = "minlib"
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
RequestedWidth = 291.000000
RequestedHeight = 250.000000
SizePriority = 0.000000
Type = "TabbedView"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Properties"
TabWidth = 90.000000
Type = "PropertiesPanel"
[[MainDockingFrame.DockedWidgets]]
RequestedWidth = 250.000000
RequestedHeight = 540.000000
SizePriority = 0.000000
Type = "DockingFrame"
SplitType = 1
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
RequestedWidth = 920.000000
RequestedHeight = 250.000000
SizePriority = 0.396523
Type = "TabbedView"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Auto"
TabWidth = 150.000000
Type = "AutoWatchPanel"
Items = ["args", "str", ""]
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 225.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 498.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 275.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Watch"
TabWidth = 150.000000
Type = "WatchPanel"
Items = ["args", "z", ""]
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 264.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 984.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs.Columns]]
Width = 275.000000
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Memory"
TabWidth = 150.000000
Type = "MemoryPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Breakpoints"
TabWidth = 150.000000
Type = "BreakpointPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets]]
RequestedWidth = 777.000000
RequestedHeight = 250.000000
SizePriority = 0.603477
Type = "TabbedView"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Threads"
TabWidth = 150.000000
Type = "ThreadPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Immediate"
TabWidth = 150.000000
Type = "ImmediatePanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Output"
TabWidth = 150.000000
Type = "OutputPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Find Results"
TabWidth = 150.000000
Type = "FindResultsPanel"
[[MainDockingFrame.DockedWidgets.DockedWidgets.Tabs]]
TabLabel = "Call Stack"
TabWidth = 150.000000
Type = "CallStackPanel"
[[Bookmarks]]
File = "c:\\beef\\IDE\\mintest\\main.cs"
Line = 306
Column = 3
[[Bookmarks]]
File = "c:\\beef\\IDE\\mintest\\main.cs"
Line = 56
Column = 2
[[Bookmarks]]
File = "c:\\beef\\IDE\\mintest\\main2.cs"
Line = 8
Column = 0
[[Bookmarks]]
File = "c:\\beef\\IDE\\mintest\\main3.cs"
Line = 177
Column = 2
[DebuggerDisplayTypes]
[DebuggerDisplayTypes.""]
IntDisplayType = "Hexadecimal"
MmDisplayType = "Default"
[[StepFilters]]
Filter = "System::Internal::ThrowIndexOutOfRange"
[[StepFilters]]
Filter = "BfObjectStackInit"
[[StepFilters]]
Filter = "[].this"
[[StepFilters]]
Filter = "std::basic_string<>::basic_string<>"
[[StepFilters]]
Filter = "System.StringView.this"
[[StepFilters]]
Filter = "TestA::TestA"

View file

@ -15,7 +15,6 @@ using System;
using System.Threading;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Collections.Generic;
using System.Collections;
@ -178,13 +177,18 @@ namespace Hey.Dude.Bro
public static int Main(String[] args)
{
while (true)
Blurg.Hey();
/*while (true)
{
int a = 0;
}
int* iPtr = null;
*iPtr = 123;
*iPtr = 123;*/
GC.SetAutoCollectPeriod(20);
Thread.Sleep(1000);
String str = scope .("Boops!");
int len = str.GetLength();
@ -196,7 +200,7 @@ namespace Hey.Dude.Bro
//Thread.Sleep(500);
Test2(1, 2, 3, 4);
//Test2(1, 2, 3, 4);
thread.Join();

View file

@ -0,0 +1,7 @@
class Snorf
{
struct Bloog
{
int mA;
}
}

View file

@ -80,13 +80,6 @@ class ClassF : ClassE
}
class Snorf
{
public static void Borf(ClassD cd)
{
cd.Poo();
}
}
[NoDiscard("Use this value!")]
struct TestStruct
@ -97,70 +90,33 @@ struct TestStruct
class Blurg
{
public static void UseTS(TestStruct ts)
[Export, CLink, StdCall]
public static void Poof()
{
int c = ts.mA;
PrintF("Poofs!\n");
}
[NoDiscard("Why you no use me?")]
public static int UseMe()
[Export, CLink, StdCall]
public static void Poof2()
{
return 999;
}
public static TestStruct UseIt()
{
return .();
}
mixin FartOut(int a)
{
a = 0;
//let c = 1;
//c = 3;
//int b = 123;
//int c = 99;
PrintF("Poofs2!\n");
}
public static void Hey()
{
mixin Fart(int a)
{
//a = 0;
//int b = 123;
//int c = 99;
}
Snorf sn = scope .();
/*int c = 222;
Fart!(c);*/
Result<void*> voidPtrResult = default;
//int __CRASH_AUTOVARIABLE__ = 123;
//UseIt();
//UseMe();
//int a;
//void* val = voidPtrResult;
for (int i < 10)
{
int a = 0;
}
//Result<TestStruct> ts = .Ok(.());
TestStruct ts = .();
ts.mA = 111;
ts.mB = 222;
UseTS(ts);
//let val = ts.Get();
//Snorf.Bloog bl = .();
ClassD cd = null;
//let str = cd.mStr;
#if A || B
ClassC cc = scope .();
#endif
//Poof();
}
}