Daily update on 20250304-070522 by Nitload Youmu. Additional Message : None
Signed-off-by: Nitload <YoumuLiu_NSI@whv0t.onmicrosoft.com>
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,6 @@ INCLUDELIB OLDNAMES
|
||||
|
||||
_DATA SEGMENT
|
||||
COMM infolog:BYTE:0200H
|
||||
COMM currentContext:QWORD
|
||||
_DATA ENDS
|
||||
msvcjmc SEGMENT
|
||||
__7583A0D2_mmintrin@h DB 01H
|
||||
|
||||
@@ -1,56 +1,5 @@
|
||||
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(517,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
|
||||
StgSharpC.c
|
||||
intrinsic.c
|
||||
mat4.c
|
||||
string.c
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(14,30): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(16,43): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(21,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(36,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(9,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(9,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(11,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(11,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(20,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(20,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(22,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(22,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(24,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(24,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(26,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(26,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(36,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(36,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(38,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(38,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(40,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(40,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(42,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(42,62): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(51,54): warning C4028: 形参 1 与声明不同
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(51,84): warning C4028: 形参 2 与声明不同
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(53,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(54,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(55,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(56,22): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,28): warning C4013: “det_mat3_internal”未定义;假设外部返回 int
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,28): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(59,62): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(60,28): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(60,62): warning C4244: “函数”: 从“int”转换到“float”,可能丢失数据
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(61,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(69,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(69,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(70,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(70,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(71,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(71,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(72,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(72,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(77,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(78,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容
|
||||
正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.exp
|
||||
LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library
|
||||
StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="BlueprintSchedueler.cs"
|
||||
// file="Blueprint.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
@@ -28,27 +28,19 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
namespace StgSharp.Blueprint
|
||||
{
|
||||
/// <summary>
|
||||
/// A sets of complex logic designed for running in multi threads environment. Warning: do not
|
||||
/// run a <see cref="BlueprintSchedueler" /> instance in multi threads more than once.
|
||||
/// run a <see cref="BlueprintScheduler" /> instance in multi threads more than once.
|
||||
/// </summary>
|
||||
public partial class BlueprintSchedueler : IConvertableToBlueprintNode
|
||||
public partial class BlueprintScheduler : IConvertableToBlueprintNode
|
||||
{
|
||||
|
||||
private BeginningNode beginNode;
|
||||
@@ -64,7 +56,7 @@ namespace StgSharp.Blueprint
|
||||
internal int currentGlobalNodeIndex;
|
||||
internal int currentNativeNodeIndex;
|
||||
|
||||
public BlueprintSchedueler()
|
||||
public BlueprintScheduler()
|
||||
{
|
||||
allNode = new Dictionary<string, BlueprintNode>();
|
||||
globalNodeList = new List<BlueprintNode>();
|
||||
@@ -78,23 +70,24 @@ namespace StgSharp.Blueprint
|
||||
|
||||
public BlueprintNode EndLayer => endNode;
|
||||
|
||||
public BlueprintNodeOperation Operation
|
||||
{
|
||||
get => ExecuteMain;
|
||||
}
|
||||
|
||||
public bool IsRunning
|
||||
{
|
||||
get => runningStat.CurrentCount == 0;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<string> InputInterfacesName
|
||||
public IEnumerable<string> InputInterfacesName
|
||||
{
|
||||
get { return beginNode.OutputInterfaces
|
||||
.Select( p => p.Key )
|
||||
.ToArray(); }
|
||||
get { return beginNode.OutputInterfaces.Keys; }
|
||||
}
|
||||
|
||||
public ReadOnlySpan<string> OutputInterfacesName
|
||||
public IEnumerable<string> OutputInterfacesName
|
||||
{
|
||||
get { return beginNode.OutputInterfaces
|
||||
.Select( p => p.Key )
|
||||
.ToArray(); }
|
||||
get { return beginNode.OutputInterfaces.Keys; }
|
||||
}
|
||||
|
||||
/**/
|
||||
@@ -112,7 +105,6 @@ namespace StgSharp.Blueprint
|
||||
allNode.Add( node.Name, node );
|
||||
}
|
||||
|
||||
|
||||
public void ExecuteMain(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output )
|
||||
@@ -120,11 +112,6 @@ namespace StgSharp.Blueprint
|
||||
BlueprintRunner.Run( this );
|
||||
}
|
||||
|
||||
public BlueprintNodeOperation Operation
|
||||
{
|
||||
get => ExecuteMain;
|
||||
}
|
||||
|
||||
[MethodImpl( MethodImplOptions.AggressiveInlining )]
|
||||
public (string name, BlueprintPipelineArgs arg)[] GetOutput()
|
||||
{
|
||||
@@ -179,7 +166,7 @@ namespace StgSharp.Blueprint
|
||||
return false;
|
||||
}
|
||||
|
||||
~BlueprintSchedueler()
|
||||
~BlueprintScheduler()
|
||||
{
|
||||
runningStat.Dispose();
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Blueprint
|
||||
{
|
||||
public partial class BlueprintSchedueler
|
||||
public partial class BlueprintScheduler
|
||||
{
|
||||
|
||||
public BlueprintNode CreateBlueprintNode(
|
||||
|
||||
@@ -47,32 +47,28 @@ namespace StgSharp.Blueprint
|
||||
public static class BlueprintRunner
|
||||
{
|
||||
|
||||
private static NodeRunner[] allAvailableTask = CreateBlueprintRunnerArray();
|
||||
private static CancellationTokenSource cts = new CancellationTokenSource();
|
||||
private static ConcurrentStack<BlueprintSchedueler> blueprintInWaiting
|
||||
= new ConcurrentStack<BlueprintSchedueler>();
|
||||
private static NodeRunner[] allAvailableTask = CreateBlueprintRunnerArray(
|
||||
);
|
||||
private static CancellationTokenSource cts = new CancellationTokenSource(
|
||||
);
|
||||
private static ConcurrentStack<BlueprintScheduler> blueprintInWaiting
|
||||
= new ConcurrentStack<BlueprintScheduler>();
|
||||
private static int _callingThread;
|
||||
private static SemaphoreSlim bpLock = new SemaphoreSlim( 0, 1 );
|
||||
|
||||
private static NodeRunner[] CreateBlueprintRunnerArray()
|
||||
{
|
||||
int count = Environment.ProcessorCount;
|
||||
return new NodeRunner[ count < 2 ? count : count - 2];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Only the fallowing occasions of calling are valid:
|
||||
/// 1. no bp is running or the only bp is quitting.
|
||||
/// 2. calling from the main thread and the current running bp.
|
||||
/// Only the fallowing occasions of calling are valid: 1. no bp is running or the only bp is
|
||||
/// quitting. 2. calling from the main thread and the current running bp.
|
||||
/// </summary>
|
||||
internal static bool IsValidCalling
|
||||
{
|
||||
get
|
||||
{
|
||||
if( ( NodeRunner.CurrentBlueprint == null ) || //no bp running at all
|
||||
( ( blueprintInWaiting.IsEmpty ) && ( NodeRunner.CurrentBlueprint.IsRunning == false ) ) )
|
||||
// a bp is quiting
|
||||
{
|
||||
( ( blueprintInWaiting.IsEmpty ) && ( NodeRunner.CurrentBlueprint.IsRunning ==
|
||||
false ) ) )
|
||||
// a bp is quiting
|
||||
{
|
||||
//in case no bp is running
|
||||
return true;
|
||||
}
|
||||
@@ -91,7 +87,7 @@ namespace StgSharp.Blueprint
|
||||
}
|
||||
}
|
||||
|
||||
public static void Run(BlueprintSchedueler blueprint)
|
||||
public static void Run( BlueprintScheduler blueprint )
|
||||
{
|
||||
//Console.WriteLine();
|
||||
if( blueprint == null ) {
|
||||
@@ -104,14 +100,13 @@ namespace StgSharp.Blueprint
|
||||
if( IsValidCalling ) {
|
||||
//Console.WriteLine("valid and run");
|
||||
if( InterruptAndRunNewBp( blueprint ) ) {
|
||||
while (InterruptAndRunNewBp(
|
||||
NodeRunner.CurrentBlueprint )){ };
|
||||
while( InterruptAndRunNewBp( NodeRunner.CurrentBlueprint ) ) { }
|
||||
;
|
||||
}
|
||||
} else {
|
||||
bpLock.Wait();
|
||||
if( InterruptAndRunNewBp( blueprint ) ) {
|
||||
while (InterruptAndRunNewBp(
|
||||
NodeRunner.CurrentBlueprint)) { }
|
||||
while( InterruptAndRunNewBp( NodeRunner.CurrentBlueprint ) ) { }
|
||||
}
|
||||
|
||||
bpLock.Release();
|
||||
@@ -141,16 +136,17 @@ namespace StgSharp.Blueprint
|
||||
foreach( NodeRunner task in allAvailableTask ) {
|
||||
task.Cts.Cancel();
|
||||
}
|
||||
foreach( BlueprintSchedueler bp in blueprintInWaiting ) {
|
||||
foreach( BlueprintScheduler bp in blueprintInWaiting ) {
|
||||
bp.Terminate();
|
||||
}
|
||||
blueprintInWaiting.Clear();
|
||||
}
|
||||
|
||||
internal static bool InterruptAndRunNewBp( BlueprintSchedueler newBp )
|
||||
internal static bool InterruptAndRunNewBp( BlueprintScheduler newBp )
|
||||
{
|
||||
Debug.Assert( newBp != null );
|
||||
if( ( newBp != NodeRunner.CurrentBlueprint ) && ( NodeRunner.CurrentBlueprint != null ) ) {
|
||||
if( ( newBp != NodeRunner.CurrentBlueprint ) && ( NodeRunner.CurrentBlueprint !=
|
||||
null ) ) {
|
||||
//if a running bp exists
|
||||
blueprintInWaiting.Push( NodeRunner.CurrentBlueprint );
|
||||
}
|
||||
@@ -162,7 +158,8 @@ namespace StgSharp.Blueprint
|
||||
|
||||
//run beginning node to init it first.
|
||||
if( !NodeRunner.CurrentBlueprint.IsRunning ) {
|
||||
( NodeRunner.CurrentBlueprint.BeginLayer as BeginningNode )!.Run();
|
||||
( NodeRunner.CurrentBlueprint.BeginLayer as BeginningNode )!.Run(
|
||||
);
|
||||
}
|
||||
|
||||
//refresh all tasks
|
||||
@@ -174,7 +171,7 @@ namespace StgSharp.Blueprint
|
||||
}
|
||||
BlueprintNode node;
|
||||
while( !cts.Token.IsCancellationRequested && NodeRunner.CurrentBlueprint
|
||||
.RequestNextNativeNode( out node ) ) {
|
||||
.RequestNextNativeNode( out node ) ) {
|
||||
node.Run();
|
||||
if( !NodeRunner.CurrentBlueprint.IsRunning ) {
|
||||
break;
|
||||
@@ -184,12 +181,18 @@ namespace StgSharp.Blueprint
|
||||
return blueprintInWaiting.TryPeek( out NodeRunner.CurrentBlueprint );
|
||||
}
|
||||
|
||||
private static NodeRunner[] CreateBlueprintRunnerArray()
|
||||
{
|
||||
int count = Environment.ProcessorCount;
|
||||
return new NodeRunner[ count < 2 ? count : count - 2];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal class NodeRunner : CancellableTask
|
||||
{
|
||||
|
||||
private static BlueprintSchedueler _current;
|
||||
private static BlueprintScheduler _current;
|
||||
|
||||
internal NodeRunner()
|
||||
: base()
|
||||
@@ -197,7 +200,7 @@ namespace StgSharp.Blueprint
|
||||
_startup = InternalRun;
|
||||
}
|
||||
|
||||
internal static ref BlueprintSchedueler CurrentBlueprint
|
||||
internal static ref BlueprintScheduler CurrentBlueprint
|
||||
{
|
||||
get => ref _current;
|
||||
}
|
||||
|
||||
@@ -40,16 +40,19 @@ namespace StgSharp.Blueprint
|
||||
{
|
||||
public class CrossFrameOperation : IConvertableToBlueprintNode
|
||||
{
|
||||
|
||||
private static string[] _inputName = ["TaskIn"];
|
||||
private static string[] _outputName = ["TaskOut"];
|
||||
private Action _mainExecution;
|
||||
private int currentCount;
|
||||
private readonly int cycleCount;
|
||||
private Action _mainExecution;
|
||||
|
||||
public CrossFrameOperation( Action startup, int cycleCount )
|
||||
{
|
||||
MainExecution = startup;
|
||||
this.cycleCount = ( cycleCount > 1 ) ?
|
||||
cycleCount : throw new ArgumentException(
|
||||
$"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(BlueprintNode).Name} instead."}" );
|
||||
cycleCount : throw new ArgumentException(
|
||||
$"{$"The {typeof(CrossFrameOperation).Name} crosses only one cycle, "}{$"please use a {typeof(BlueprintNode).Name} instead."}" );
|
||||
this.cycleCount = cycleCount;
|
||||
currentCount = cycleCount;
|
||||
}
|
||||
@@ -60,17 +63,18 @@ namespace StgSharp.Blueprint
|
||||
private protected set => _mainExecution = value;
|
||||
}
|
||||
|
||||
private static string[] _inputName = ["TaskIn"];
|
||||
private static string[] _outputName = ["TaskOut"];
|
||||
|
||||
public BlueprintNodeOperation Operation
|
||||
{
|
||||
get => ExecuteMain;
|
||||
}
|
||||
|
||||
public IEnumerable<string> InputInterfacesName => _inputName;
|
||||
|
||||
public IEnumerable<string> OutputInterfacesName => _outputName;
|
||||
|
||||
public void ExecuteMain(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output )
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output )
|
||||
{
|
||||
if( currentCount < cycleCount ) {
|
||||
Interlocked.Increment( ref currentCount );
|
||||
@@ -83,9 +87,5 @@ namespace StgSharp.Blueprint
|
||||
BlueprintPipeline.SkipAll( output );
|
||||
}
|
||||
|
||||
public ReadOnlySpan<string> InputInterfacesName => _inputName;
|
||||
|
||||
public ReadOnlySpan<string> OutputInterfacesName => _outputName;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,22 +36,26 @@ using System.Text;
|
||||
namespace StgSharp.Blueprint
|
||||
{
|
||||
public delegate void BlueprintNodeOperation(
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output );
|
||||
in Dictionary<string, BlueprintPipeline> input,
|
||||
in Dictionary<string, BlueprintPipeline> output );
|
||||
|
||||
public interface IConvertableToBlueprintNode
|
||||
{
|
||||
public ReadOnlySpan<string> InputInterfacesName
|
||||
|
||||
BlueprintNodeOperation Operation
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public ReadOnlySpan<string> OutputInterfacesName
|
||||
public IEnumerable<string> InputInterfacesName
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
BlueprintNodeOperation Operation { get; }
|
||||
public IEnumerable<string> OutputInterfacesName
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -63,9 +67,9 @@ namespace StgSharp.Blueprint
|
||||
private BlueprintNodeOperation _execution;
|
||||
|
||||
public DefaultConvertableToBlueprintNode(
|
||||
BlueprintNodeOperation execution,
|
||||
string[] input,
|
||||
string[] output )
|
||||
BlueprintNodeOperation execution,
|
||||
string[] input,
|
||||
string[] output )
|
||||
{
|
||||
_input = input;
|
||||
_output = output;
|
||||
@@ -74,9 +78,9 @@ namespace StgSharp.Blueprint
|
||||
|
||||
public BlueprintNodeOperation Operation => _execution;
|
||||
|
||||
public ReadOnlySpan<string> InputInterfacesName => _input;
|
||||
public IEnumerable<string> InputInterfacesName => _input;
|
||||
|
||||
public ReadOnlySpan<string> OutputInterfacesName => _output;
|
||||
public IEnumerable<string> OutputInterfacesName => _output;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,10 +42,12 @@ namespace StgSharp.Blueprint
|
||||
internal sealed class BeginningNode : BlueprintNode
|
||||
{
|
||||
|
||||
private BlueprintSchedueler _bp;
|
||||
private BlueprintScheduler _bp;
|
||||
|
||||
public BeginningNode( BlueprintSchedueler bp )
|
||||
: base(DefaultOperation, name: "BeginningNode", true, ["default"], ["default"] )
|
||||
public BeginningNode( BlueprintScheduler bp )
|
||||
: base(
|
||||
DefaultOperation, name: "BeginningNode", true, ["default"],
|
||||
["default"] )
|
||||
{
|
||||
_bp = bp;
|
||||
}
|
||||
@@ -70,8 +72,8 @@ namespace StgSharp.Blueprint
|
||||
}
|
||||
|
||||
public new void SetCertainOutputPort(
|
||||
string name,
|
||||
BlueprintPipeline pipeline )
|
||||
string name,
|
||||
BlueprintPipeline pipeline )
|
||||
{
|
||||
if( _outputInterfaces.ContainsKey( name ) ) {
|
||||
_outputInterfaces[ name ] = pipeline;
|
||||
@@ -84,10 +86,12 @@ namespace StgSharp.Blueprint
|
||||
internal sealed class EndingNode : BlueprintNode
|
||||
{
|
||||
|
||||
private BlueprintSchedueler _bp;
|
||||
private BlueprintScheduler _bp;
|
||||
|
||||
public EndingNode( BlueprintSchedueler bp )
|
||||
: base(DefaultOperation, name: "EndingNode", true, ["default"], ["default"] )
|
||||
public EndingNode( BlueprintScheduler bp )
|
||||
: base(
|
||||
DefaultOperation, name: "EndingNode", true, ["default"],
|
||||
["default"] )
|
||||
{
|
||||
_bp = bp;
|
||||
}
|
||||
@@ -96,7 +100,7 @@ namespace StgSharp.Blueprint
|
||||
{
|
||||
get { return InputInterfaces.Select(
|
||||
key => (key.Key, key.Value.Args) )
|
||||
.ToArray(); }
|
||||
.ToArray(); }
|
||||
}
|
||||
|
||||
public override void Run()
|
||||
@@ -108,8 +112,8 @@ namespace StgSharp.Blueprint
|
||||
}
|
||||
|
||||
public new void SetCertainInputPort(
|
||||
string name,
|
||||
BlueprintPipeline pipeline )
|
||||
string name,
|
||||
BlueprintPipeline pipeline )
|
||||
{
|
||||
if( _inputInterfaces.ContainsKey( name ) ) {
|
||||
_inputInterfaces[ name ] = pipeline;
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Common")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+83bde12d2227bf32a3b939e94849bbd7273bad21")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+825e68853cd1738287eecc8a4390ee9c78550308")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Common")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Common")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/83bde12d2227bf32a3b939e94849bbd7273bad21/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/825e68853cd1738287eecc8a4390ee9c78550308/*"}}
|
||||
@@ -1,6 +1,6 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="STEP.cs"
|
||||
// file="StepModel.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
@@ -38,31 +38,27 @@ namespace StgSharp.Modeling.STEP
|
||||
{
|
||||
public class StepModel
|
||||
{
|
||||
|
||||
private BlueprintScheduler _builder;
|
||||
private Dictionary<int, IStepObject> _node
|
||||
= new Dictionary<int, IStepObject>( );
|
||||
private BlueprintSchedueler _builder;
|
||||
= new Dictionary<int, IStepObject>();
|
||||
private StepInfo _header;
|
||||
|
||||
internal StepModel(
|
||||
StepInfo header,
|
||||
Dictionary<int, IStepObject> nodeSource)
|
||||
StepInfo header,
|
||||
Dictionary<int, IStepObject> nodeSource )
|
||||
{
|
||||
_header = header;
|
||||
_node = nodeSource;
|
||||
_builder = new BlueprintSchedueler();
|
||||
_builder = new BlueprintScheduler();
|
||||
}
|
||||
|
||||
public void BuildGeometry() { }
|
||||
|
||||
public void OrganizeNode()
|
||||
{
|
||||
foreach (var node in _node)
|
||||
{
|
||||
|
||||
}
|
||||
foreach( KeyValuePair<int, IStepObject> node in _node ) { }
|
||||
}
|
||||
|
||||
public void BuildGeometry()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+c23b640cae59b9ee7dcfd8f026b8970a084ddbd7")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+825e68853cd1738287eecc8a4390ee9c78550308")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/c23b640cae59b9ee7dcfd8f026b8970a084ddbd7/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/825e68853cd1738287eecc8a4390ee9c78550308/*"}}
|
||||
@@ -32,11 +32,20 @@ using System;
|
||||
|
||||
namespace StgSharp.Script.Express
|
||||
{
|
||||
public class ExpBuiltinConstant<T> : ExpLiteralGenericNode<T>
|
||||
internal partial class ExpSchema_Nitload
|
||||
{
|
||||
|
||||
internal ExpBuiltinConstant( string name, T value )
|
||||
: base( name, null!, value ) { }
|
||||
public ExpTypeSource IntType
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
public ExpTypeSource FloatType
|
||||
{
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -68,12 +68,6 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public abstract IEnumerator<ExpElementInstanceBase> GetEnumerator();
|
||||
|
||||
public override sealed bool IsConvertable(
|
||||
ExpInstantiableElement targetType )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator()
|
||||
{
|
||||
return GetEnumerator();
|
||||
|
||||
@@ -40,8 +40,7 @@ namespace StgSharp.Script.Express
|
||||
protected internal (int min, int max) _range;
|
||||
protected internal ExpElementType _memberType;
|
||||
|
||||
protected ExpCollectionInstanceBase( string name, ExpSchema context )
|
||||
: base( name ) { }
|
||||
protected ExpCollectionInstanceBase( string name ) : base( name ) { }
|
||||
|
||||
public abstract ExpCollectionBase CollectionValue
|
||||
{
|
||||
|
||||
@@ -34,40 +34,84 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Script.Express
|
||||
{
|
||||
public enum ExpLogic
|
||||
public enum ExpLogicValue
|
||||
{
|
||||
|
||||
Unknown = 0,
|
||||
False = 1,
|
||||
True = 2,
|
||||
True,
|
||||
False,
|
||||
Unknown
|
||||
|
||||
}
|
||||
|
||||
public static class LogicConverter
|
||||
public struct ExpLogic
|
||||
{
|
||||
public static bool? AsNullableBool(this ExpLogic l)
|
||||
|
||||
public static readonly ExpLogic False = new ExpLogic(
|
||||
ExpLogicValue.False );
|
||||
|
||||
public static readonly ExpLogic True = new ExpLogic(
|
||||
ExpLogicValue.True );
|
||||
public static readonly ExpLogic Unknown = new ExpLogic(
|
||||
ExpLogicValue.Unknown );
|
||||
|
||||
private readonly ExpLogicValue _value;
|
||||
|
||||
public ExpLogic( ExpLogicValue value )
|
||||
{
|
||||
switch (l)
|
||||
{
|
||||
case ExpLogic.Unknown:
|
||||
return null;
|
||||
case ExpLogic.False:
|
||||
return false;
|
||||
case ExpLogic.True:
|
||||
return true;
|
||||
default:
|
||||
throw new ArgumentException();
|
||||
}
|
||||
_value = value;
|
||||
}
|
||||
|
||||
public static ExpLogic AsNullableInt(this bool? b)
|
||||
public bool IsTrue => _value == ExpLogicValue.True;
|
||||
|
||||
public bool IsFalse => _value == ExpLogicValue.False;
|
||||
|
||||
public bool IsUnknown => _value == ExpLogicValue.Unknown;
|
||||
|
||||
public override string ToString() => _value.ToString();
|
||||
|
||||
// NOT !
|
||||
public static ExpLogic operator !( ExpLogic a )
|
||||
{
|
||||
return b switch
|
||||
{
|
||||
null => ExpLogic.Unknown,
|
||||
true => ExpLogic.True,
|
||||
false => ExpLogic.False,
|
||||
};
|
||||
return a.IsTrue ? False : a.IsFalse ? True : Unknown;
|
||||
}
|
||||
|
||||
// AND &
|
||||
public static ExpLogic operator &( ExpLogic a, ExpLogic b )
|
||||
{
|
||||
if( a.IsFalse || b.IsFalse ) {
|
||||
return False;
|
||||
}
|
||||
|
||||
if( a.IsUnknown || b.IsUnknown ) {
|
||||
return Unknown;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
// XOR ^
|
||||
public static ExpLogic operator ^( ExpLogic a, ExpLogic b )
|
||||
{
|
||||
if( a.IsUnknown || b.IsUnknown ) {
|
||||
return Unknown;
|
||||
}
|
||||
|
||||
return ( a.IsTrue ^ b.IsTrue ) ? True : False;
|
||||
}
|
||||
|
||||
// OR |
|
||||
public static ExpLogic operator |( ExpLogic a, ExpLogic b )
|
||||
{
|
||||
if( a.IsTrue || b.IsTrue ) {
|
||||
return True;
|
||||
}
|
||||
|
||||
if( a.IsUnknown || b.IsUnknown ) {
|
||||
return Unknown;
|
||||
}
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,6 @@ using System.Collections;
|
||||
using System.Collections.Frozen;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
using static StgSharp.Script.Express.ExpCompile;
|
||||
|
||||
@@ -80,7 +77,7 @@ namespace StgSharp.Script.Express
|
||||
string name,
|
||||
out ExpFunctionSource f )
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return FunctionDict.TryGetValue( name, out f! );
|
||||
}
|
||||
|
||||
public override bool TryGetRule( string name, out ExpRuleSource r )
|
||||
@@ -131,9 +128,9 @@ namespace StgSharp.Script.Express
|
||||
|
||||
ConstDict = new Dictionary<string, ExpElementInstanceBase>(
|
||||
Multiplexer ) {
|
||||
{ PoolString( "PI" ), new ExpBuiltinConstant<float>(
|
||||
{ PoolString( "PI" ), new ExpLiteralGenericNode<float>(
|
||||
PoolString( "PI" ), MathF.PI ) },
|
||||
{ PoolString( "E" ), new ExpBuiltinConstant<float>(
|
||||
{ PoolString( "E" ), new ExpLiteralGenericNode<float>(
|
||||
PoolString( "E" ), MathF.E ) },
|
||||
}.ToFrozenDictionary();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
// file="ExpElementInstanceNode.cs"
|
||||
// Project: StgSharp
|
||||
// AuthorGroup: Nitload Space
|
||||
// Copyright (c) Nitload Space. All rights reserved.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person
|
||||
// obtaining a copy of this software and associated documentation
|
||||
// files (the “Software”), to deal in the Software without restriction,
|
||||
// including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
// and to permit persons to whom the Software is furnished to do so,
|
||||
// subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and
|
||||
// this permission notice shall be included in all copies
|
||||
// or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED “AS IS”,
|
||||
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
// ARISING FROM, OUT OF OR IN CONNECTION WITH
|
||||
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StgSharp.Script.Express
|
||||
{
|
||||
public class ExpElementInstanceNode : ExpNode
|
||||
{
|
||||
|
||||
private ExpInstantiableElement _element;
|
||||
|
||||
public ExpElementInstanceNode(
|
||||
string varName,
|
||||
ExpInstantiableElement element )
|
||||
: base( varName )
|
||||
{
|
||||
_element = element;
|
||||
}
|
||||
|
||||
public override ExpInstantiableElement EqualityTypeConvert => _element;
|
||||
|
||||
public override ExpNode Left => Empty;
|
||||
|
||||
public override ExpNode Right => Empty;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,10 +43,9 @@ namespace StgSharp.Script.Express
|
||||
|
||||
private ExpNode _indexExpression;
|
||||
|
||||
public ExpIndexOfNode(
|
||||
ExpSchema context,
|
||||
ExpCollectionInstanceBase instance,
|
||||
ExpNode indexExpression )
|
||||
private ExpIndexOfNode(
|
||||
ExpCollectionInstanceBase instance,
|
||||
ExpNode indexExpression )
|
||||
: base( ExpCompile.PoolString( "[" ) )
|
||||
{
|
||||
_collection = instance;
|
||||
@@ -60,5 +59,16 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => _collection.EqualityTypeConvert;
|
||||
|
||||
public static ExpIndexOfNode Create(
|
||||
ExpCollectionInstanceBase instance,
|
||||
ExpNode indexExpression )
|
||||
{
|
||||
if( !indexExpression.IsNumber ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
"Number", indexExpression.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpIndexOfNode( instance, indexExpression );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace StgSharp.Script.Express
|
||||
private readonly ExpBuiltinType _type;
|
||||
private readonly T _value;
|
||||
|
||||
public ExpLiteralGenericNode( string name, ExpSchema context, T value )
|
||||
public ExpLiteralGenericNode( string name, T value )
|
||||
: base( name )
|
||||
{
|
||||
_value = value;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace StgSharp.Script.Express
|
||||
|
||||
public override IExpElementSource EqualityTypeConvert => _operand.EqualityTypeConvert;
|
||||
|
||||
public static ExpUnaryOperatorNode UnaryNotNegation( ExpNode operand )
|
||||
public static ExpUnaryOperatorNode UnaryNegation( ExpNode operand )
|
||||
{
|
||||
if( !operand.IsNumber ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
@@ -73,5 +73,19 @@ namespace StgSharp.Script.Express
|
||||
};
|
||||
}
|
||||
|
||||
public static ExpUnaryOperatorNode UnaryNot( ExpNode operand )
|
||||
{
|
||||
if( ( operand._nodeFlag | ( ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.BuiltinType_Logic ) ) ==
|
||||
0 ) {
|
||||
throw new ExpInvalidTypeException(
|
||||
"Bool or Logic", operand.EqualityTypeConvert.Name );
|
||||
}
|
||||
return new ExpUnaryOperatorNode( ExpCompile.KeyWord.NOT )
|
||||
{
|
||||
_nodeFlag = ExpNodeFlag.Operator_Unary | ExpNodeFlag.BuiltinType_Logic,
|
||||
CodeConvertTemplate = "! {0}",
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,10 +77,10 @@ namespace StgSharp.Script.Express
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Read code until end of a line. Lines in multi-line comment will be ignored. Line
|
||||
/// <para> Read code until end of a line. Lines in multi-line comment will be ignored. Line
|
||||
/// begins with part of multi-line comment will automatically remove the comment part, but
|
||||
/// beginning with a full multi-line comment will not causing removing.</para> <para> (*Just
|
||||
/// Like The Comment Here*) Will Not Be Removed </para>
|
||||
/// beginning with a full multi-line comment will not causing removing. </para> <para>(*Just
|
||||
/// Like The Comment Here*) Will Not Be Removed</para>
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public unsafe ReadOnlySpan<char> ReadLine()
|
||||
@@ -185,7 +185,7 @@ namespace StgSharp.Script.Express
|
||||
return _last;
|
||||
case '-':
|
||||
|
||||
// 1. -number
|
||||
// 1. - number
|
||||
// 2. -- comment
|
||||
// 3. - number type param(UNARY)
|
||||
// 4. param - param(BINARY)
|
||||
|
||||
@@ -95,15 +95,14 @@ namespace StgSharp.Script.Express
|
||||
_operandsNode.Push( node );
|
||||
}
|
||||
|
||||
public AbstractSyntaxTree<ExpNode, IExpElementSource> CloseAndDispose(
|
||||
)
|
||||
public AbstractSyntaxTree<ExpNode, IExpElementSource> CloseAndDispose()
|
||||
{
|
||||
if( _operandsToken.Count != 0 ) {
|
||||
// convert rest to AST
|
||||
}
|
||||
return new AbstractSyntaxTree<ExpNode, IExpElementSource>();
|
||||
}
|
||||
|
||||
/*
|
||||
public ExpNode GenerateNode( Token t )
|
||||
{
|
||||
switch( t.Flag ) {
|
||||
@@ -131,10 +130,9 @@ namespace StgSharp.Script.Express
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**/
|
||||
|
||||
public int GetNextOperandCache(
|
||||
out Token? token,
|
||||
out ExpNode? node )
|
||||
public int GetNextOperandCache( out Token? token, out ExpNode? node )
|
||||
{
|
||||
if( _operandsNode.Count != 0 ) {
|
||||
node = _operandsNode.Pop();
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace StgSharp.Script.Express
|
||||
{
|
||||
public partial class ExpNodeGenerator
|
||||
{
|
||||
|
||||
/*
|
||||
public ExpNode GenerateUnaryToken( Token t )
|
||||
{
|
||||
switch( t.Value ) {
|
||||
@@ -52,6 +52,7 @@ namespace StgSharp.Script.Express
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+d12bbbd873ec13306fdfa5255965188674ed417c")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+825e68853cd1738287eecc8a4390ee9c78550308")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/ccef0de6f686f94da655b0e7d854d0acaf907d04/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/825e68853cd1738287eecc8a4390ee9c78550308/*"}}
|
||||
+11
-10
@@ -59,7 +59,7 @@ namespace StgSharp
|
||||
try {
|
||||
StgSharp.Init();
|
||||
|
||||
|
||||
/*
|
||||
ExpCompile.InitCompile();
|
||||
ExpFileSource reader = new ExpFileSource( testExpPath );
|
||||
ExpSchemaSource schemaSource = new ExpSchemaSource();
|
||||
@@ -96,23 +96,24 @@ namespace StgSharp
|
||||
$"{count}\t{str.Flag}\t\t{str.Value.ToString()}" );
|
||||
}
|
||||
IScriptSourceProvider slice = st.Slice( 5, 2 );
|
||||
|
||||
/*
|
||||
/**/
|
||||
/**/
|
||||
|
||||
StgSharp.InitGL( 4, 6 );
|
||||
StgSharp.GlobalSetting.VSyncActivated = false;
|
||||
|
||||
ViewPort vp = new ViewPort(800,600,"Hello StgSharp!",IntPtr.Zero);
|
||||
ViewPort vp = new ViewPort(
|
||||
800, 600, "Hello StgSharp!", IntPtr.Zero );
|
||||
|
||||
//throw new NotImplementedException();
|
||||
|
||||
var mul = new StringHashMultiplexer();
|
||||
IEqualityComparer<string> com = (IEqualityComparer<string>)mul;
|
||||
StringHashMultiplexer mul = new StringHashMultiplexer();
|
||||
IEqualityComparer<string> com = mul;
|
||||
string str = "1234567012345670";
|
||||
for (int i = 1; i < 100; i++)
|
||||
{
|
||||
for( int i = 1; i < 100; i++ ) {
|
||||
str += $"{(i%8)}";
|
||||
int hash = mul.ForceComputeHash(str);
|
||||
Thread.Sleep(20);
|
||||
int hash = mul.ForceComputeHash( str );
|
||||
Thread.Sleep( 20 );
|
||||
}
|
||||
|
||||
ViewModelBase mainModel = new ViewModelMain( vp );
|
||||
|
||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ccef0de6f686f94da655b0e7d854d0acaf907d04")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+825e68853cd1738287eecc8a4390ee9c78550308")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
||||
@@ -14,10 +14,8 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\St
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharpDebug.xml
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\CommunityToolkit.HighPerformance.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Common.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Generator.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Model.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Script.dll
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Generator.pdb
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Common.pdb
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Common.xml
|
||||
D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharpDebug\bin\x64\Debug\net8.0\StgSharp.Model.pdb
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/c23b640cae59b9ee7dcfd8f026b8970a084ddbd7/*"}}
|
||||
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/825e68853cd1738287eecc8a4390ee9c78550308/*"}}
|
||||
Reference in New Issue
Block a user