1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Mintest updates

This commit is contained in:
Brian Fiete 2020-04-10 08:58:12 -07:00
parent 5879469933
commit 2fbaf061ef
7 changed files with 104 additions and 81 deletions

View file

@ -88,6 +88,14 @@ BuildKind = "StaticLib"
BuildKind = "StaticLib" BuildKind = "StaticLib"
RelocType = "PIC" RelocType = "PIC"
[[ProjectFolder.Items]]
Type = "Folder"
Name = "snorg"
[[ProjectFolder.Items.Items]]
Type = "IgnoreSource"
Name = "Zap.bf"
[[ProjectFolder.Items]] [[ProjectFolder.Items]]
Type = "Source" Type = "Source"
Path = "../../../temp/test.txt" Path = "../../../temp/test.txt"

View file

@ -5,7 +5,6 @@ Projects = {mintest = {Path = "."}, minlib = {Path = "minlib"}, LibA = {Path = "
StartupProject = "mintest" StartupProject = "mintest"
[Configs.Debug.Win32] [Configs.Debug.Win32]
BfOptimizationLevel = "OgPlus"
InitLocalVariables = true InitLocalVariables = true
IntermediateType = "ObjectAndIRCode" IntermediateType = "ObjectAndIRCode"
ConfigSelections = {mintest2 = {Enabled = false}} ConfigSelections = {mintest2 = {Enabled = false}}
@ -55,7 +54,9 @@ AllocStackTraceDepth = 0
IntermediateType = "ObjectAndIRCode" IntermediateType = "ObjectAndIRCode"
[Configs.Release.Win64] [Configs.Release.Win64]
Toolset = "LLVM"
BfSIMDSetting = "SSE3" BfSIMDSetting = "SSE3"
LTOType = "Thin"
AllocStackTraceDepth = 0 AllocStackTraceDepth = 0
IntermediateType = "ObjectAndIRCode" IntermediateType = "ObjectAndIRCode"
COptimizationLevel = "O3" COptimizationLevel = "O3"
@ -94,8 +95,6 @@ CSIMDSetting = "None"
COptimizationLevel = "O2" COptimizationLevel = "O2"
ConfigSelections = {mintest = {Config = "Debug"}} ConfigSelections = {mintest = {Config = "Debug"}}
[Configs.Test.Win64]
[Configs.Test.WinFart] [Configs.Test.WinFart]
Toolset = "GNU" Toolset = "GNU"
BuildKind = "Normal" BuildKind = "Normal"

View file

@ -3,39 +3,56 @@ Dependencies = {}
[Project] [Project]
Name = "minlib" Name = "minlib"
TargetType = "BeefLib"
DefaultNamespace = "" DefaultNamespace = ""
Aliases = ["corlib"] Aliases = ["corlib"]
[Configs.Debug.Win32] [Configs.Debug.Win32]
OtherLinkFlags = "" OtherLinkFlags = ""
OptimizationLevel = "O0"
[[Configs.Debug.Win32.DistinctOptions]] [[Configs.Debug.Win32.DistinctOptions]]
Filter = "[System.Optimize]" Filter = "[System.Optimize]"
BfOptimizationLevel = "O2"
RuntimeChecks = false [[Configs.Debug.Win32.DistinctOptions]]
EmitDynamicCastCheck = false Filter = "[System.UseLLVM]"
EmitObjectAccessCheck = false
[Configs.Debug.Win64] [Configs.Debug.Win64]
CLibType = "Static" CLibType = "Static"
[[Configs.Debug.Win64.DistinctOptions]] [[Configs.Debug.Win64.DistinctOptions]]
Filter = "[System.Optimize]" Filter = "[System.Optimize]"
BfOptimizationLevel = "O2"
RuntimeChecks = false [[Configs.Debug.Win64.DistinctOptions]]
EmitDynamicCastCheck = false Filter = "[System.UseLLVM]"
EmitObjectAccessCheck = false
[Configs.Debug.WinFart] [Configs.Debug.WinFart]
OtherLinkFlags = "" OtherLinkFlags = ""
CLibType = "Static" CLibType = "Static"
BeefLibType = "Static" BeefLibType = "Static"
[[Configs.Debug.WinFart.DistinctOptions]]
Filter = "[System.UseLLVM]"
[[Configs.Debug.Linux64.DistinctOptions]]
Filter = "[System.UseLLVM]"
[[Configs.Debug.macOS.DistinctOptions]]
Filter = "[System.UseLLVM]"
[Configs.Debug.iOS]
BuildKind = "StaticLib"
[[Configs.Debug.iOS.DistinctOptions]]
Filter = "[System.UseLLVM]"
[Configs.Debug.aarch64-none-linux-android21]
BuildKind = "StaticLib"
RelocType = "PIC"
[[Configs.Debug.aarch64-none-linux-android21.DistinctOptions]]
Filter = "[System.UseLLVM]"
[Configs.Release.Win32] [Configs.Release.Win32]
OtherLinkFlags = "" OtherLinkFlags = ""
OptimizationLevel = "O2"
[Configs.Release.Win64] [Configs.Release.Win64]
OtherLinkFlags = "" OtherLinkFlags = ""
@ -43,6 +60,13 @@ OtherLinkFlags = ""
[Configs.Release.WinFart] [Configs.Release.WinFart]
OtherLinkFlags = "" OtherLinkFlags = ""
[Configs.Release.iOS]
BuildKind = "StaticLib"
[Configs.Release.aarch64-none-linux-android21]
BuildKind = "StaticLib"
RelocType = "PIC"
[Configs.Test.WinFart] [Configs.Test.WinFart]
BuildKind = "Normal" BuildKind = "Normal"
OtherLinkFlags = "" OtherLinkFlags = ""
@ -59,3 +83,10 @@ CLibType = "Static"
OtherLinkFlags = "" OtherLinkFlags = ""
CLibType = "Static" CLibType = "Static"
BeefLibType = "Static" BeefLibType = "Static"
[Configs.Paranoid.iOS]
BuildKind = "StaticLib"
[Configs.Paranoid.aarch64-none-linux-android21]
BuildKind = "StaticLib"
RelocType = "PIC"

View file

@ -234,7 +234,7 @@ namespace System
{ {
switch (this) switch (this)
{ {
case ' ', '\t', '\n', '\r', '\xa0', '\x85': return true; case ' ', '\t', '\n', '\r', (.)'\xa0', (.)'\x85': return true;
default: return false; default: return false;
} }
} }

View file

@ -30,6 +30,12 @@ public enum QIntDisplayType
COUNT COUNT
} }
[CRepr]
public struct ALLEGRO_COLOR
{
public float r, g, b, a;
}
namespace Hey.Dude.Bro namespace Hey.Dude.Bro
{ {
class TestClass class TestClass
@ -66,13 +72,21 @@ namespace Hey.Dude.Bro
#if BF_64_BIT #if BF_64_BIT
[Import(@"C:\Beef\BeefTools\TestDLL\x64\Debug\TestDLL.dll"), LinkName("Test2")] [Import(@"C:\Beef\BeefTools\TestDLL\x64\Debug\TestDLL.dll"), LinkName("Test2")]
public static extern void Test2(int32 a, int32 b, int32 c, int32 d); public static extern void Test2(int32 a, int32 b, int32 c, int32 d);
[Import(@"C:\Beef\BeefTools\TestDLL\x64\Debug\TestDLL.dll"), LinkName("Test3")]
public static extern void Test3(void* ptr, ALLEGRO_COLOR color);
#else #else
[Import(@"C:\Beef\BeefTools\TestDLL\Debug\TestDLL.dll"), LinkName("Test2")] [Import(@"C:\Beef\BeefTools\TestDLL\Debug\TestDLL.dll"), LinkName("Test2")]
public static extern void Test2(int32 a, int32 b, int32 c, int32 d); public static extern void Test2(int32 a, int32 b, int32 c, int32 d);
[Import(@"C:\Beef\BeefTools\TestDLL\Debug\TestDLL.dll"), LinkName("Test3")]
public static extern void Test3(void* ptr, ALLEGRO_COLOR color);
[Import(@"C:\Beef\BeefTools\TestDLL\Debug\TestDLL.dll"), LinkName("Test4")]
public static extern void Test4(void* ptr, ALLEGRO_COLOR* color);
#endif #endif
[Import(@"C:\Beef\BeefTools\TestDLL\x64\Debug\TestDLL.dll"), CLink]
public static extern void Test4(int32 a, int32 b);
static uint32 sStaticVar = 234; static uint32 sStaticVar = 234;
@ -223,15 +237,6 @@ namespace Hey.Dude.Bro
public static int Main(String[] args) public static int Main(String[] args)
{ {
function void() func = => Florgs;
int32 val = (int32)(int)(void*)func;
//void* ptr = "Hey";
//val = (int32)ptr;
//Test2(1, 2, val, 4);
Blurg.Hey(); Blurg.Hey();
return 1; return 1;
} }

View file

@ -1,24 +1,17 @@
// more text at the end of the first line. This is more text.
using System; using System;
#define SMz class Pooble
#if SM
typealias int_test = int32;
#else
typealias int_test = int64;
#endif
struct Floof
{ {
public static int32 Hey() public void Test(int abcdefgh, int abcdefgh2, int abcdefgh3, int abcdefgh4, int abcdefgh5, int abcdefgh6, int abcdefgh7, int abcdefgh8)
{ {
Result<int> res = 123; }
switch (res)
{
case .Ok(let val):
default:
}
return 123; public static float sVal = 9;
public static mixin Zorp(var z)
{
z * sVal
} }
} }

View file

@ -1,56 +1,43 @@
//using Squarf;
//GORB
#pragma warning disable 168 #pragma warning disable 168
using System; using System;
using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Collections.Generic;
#region EnumA Crapsos struct Smibbs
[AllowDuplicates]
enum EnumA
{ {
Abo = 1, public int16 mX = 11;
Boop = _*2, public int16 mY = 22;
Croop = _*2, public int16 mZ = 33;
Zoop = 1
} }
struct StructA namespace PropertyStructCrash
{ {
public int mA; struct B
public int mB; {
public int c;
}
struct A
{
public B Prop { get; set; }
}
class Program
{
public static void Main()
{
var c = '¥';
}
}
} }
#region Blurg
struct Blurg struct Blurg
{ {
static mixin MixA(var sa2) public static void Hey()
{ {
sa2.mA++; PropertyStructCrash.Program.Main();
}
static mixin MixB(mut StructA sa2)
{
sa2.mA++;
}
static void MethodA(mut StructA sa)
{
MixA!(sa);
//MixB!(mut sa);
}
public static int32 Hey()
{
StructA sa = .();
sa.mA = 123
return (int32)123;
} }
} }