From 74c01effe4cabbc9d0e2e87b0d295bb29d7c62ba Mon Sep 17 00:00:00 2001 From: Nitload Date: Wed, 30 Apr 2025 07:38:04 +0800 Subject: [PATCH] Daily update on 20250430-073804 by Nitload Youmu. Additional Message : full function of syntax analyze to STEP file Signed-off-by: Nitload --- StgSharp.C/hash.c | 3 +- StgSharp.C/x64/Debug/StgSharp.C.ilk | Bin 2041720 -> 2045592 bytes .../Debug/StgSharp.C.tlog/CL.command.1.tlog | Bin 10872 -> 10872 bytes .../x64/Debug/StgSharp.C.tlog/CL.read.1.tlog | Bin 222988 -> 223378 bytes .../x64/Debug/StgSharp.C.tlog/CL.write.1.tlog | Bin 13976 -> 14706 bytes StgSharp.C/x64/Debug/StgSharpC.log | 65 +--- StgSharp.C/x64/Debug/hash.cod | 49 +-- StgSharp.C/x64/Debug/hash.obj | Bin 35380 -> 35388 bytes StgSharp.C/x64/Debug/hash.sbr | Bin 2258751 -> 2258754 bytes StgSharp.C/x64/Debug/vc143.idb | Bin 347136 -> 347136 bytes StgSharp.C/x64/Debug/vc143.pdb | Bin 241664 -> 241664 bytes StgSharp.Common/Counter.cs | 17 +- .../Graphics/OpenGL/ShaderEdit/Shader.cs | 120 +++--- StgSharp.Common/Graphics/OpenGL/glFunction.cs | 353 +++++++++--------- StgSharp.Common/Internal/InternalResource.cs | 17 +- StgSharp.Common/Stg/Bullet.cs | 8 +- .../net8.0/StgSharp.Common.AssemblyInfo.cs | 9 +- StgSharp.Common/obj/project.packagespec.json | 1 + .../net8.0/StgSharp.Common.AssemblyInfo.cs | 2 +- .../net8.0/StgSharp.Common.sourcelink.json | 2 +- .../net8.0/StgSharp.Generator.AssemblyInfo.cs | 9 +- .../obj/project.packagespec.json | 1 + .../STEP/Analyser/StepDependencyDetector.cs | 61 +++ .../STEP/Analyser/StepEntityDefineSequence.cs | 54 +++ .../STEP/StepHeaderLineConstructor.cs | 101 +++++ .../net8.0/StgSharp.Model.AssemblyInfo.cs | 9 +- StgSharp.Model/obj/project.packagespec.json | 1 + .../net8.0/StgSharp.Model.AssemblyInfo.cs | 2 +- .../net8.0/StgSharp.Model.sourcelink.json | 2 +- StgSharp.Script/Common/CompileStack.cs | 12 +- StgSharp.Script/Express/CompileEnv/KeyWord.cs | 4 +- .../Express/Element/ExpFunction.cs | 2 +- .../ExpAstNode/ExpBinaryOperatorNode.cs | 29 +- .../ExpAstNode/ExpCollectionIndexNode.cs | 2 +- .../ExpAstNode/ExpFunctionCallingNode.cs | 2 +- .../Express/ExpAstNode/ExpRepeatNode.cs | 2 +- .../ExpAstNode/ExpUnaryOperatorNode.cs | 8 +- StgSharp.Script/Express/ExpExceptions.cs | 25 +- ...xpSyntaxAnalyzer.PrefixReverseAnalysing.cs | 2 +- StgSharp.Script/Express/ExpTokenReader.cs | 25 +- .../net8.0/StgSharp.Script.AssemblyInfo.cs | 9 +- StgSharp.Script/obj/project.packagespec.json | 1 + .../net8.0/StgSharp.Script.AssemblyInfo.cs | 2 +- .../net8.0/StgSharp.Script.sourcelink.json | 2 +- ...CoreApp,Version=v8.0.AssemblyAttributes.cs | 34 +- .../StgSharp.TerminalDialogue.AssemblyInfo.cs | 9 +- .../obj/project.packagespec.json | 1 + StgSharpDebug/Program.cs | 12 +- StgSharpDebug/StepReadingTest.cs | 61 +++ StgSharpDebug/obj/project.packagespec.json | 1 + .../net8.0/StgSharpDebug.AssemblyInfo.cs | 2 +- .../net8.0/StgSharpDebug.sourcelink.json | 2 +- 52 files changed, 693 insertions(+), 442 deletions(-) create mode 100644 StgSharp.Common/obj/project.packagespec.json create mode 100644 StgSharp.Generator/obj/project.packagespec.json create mode 100644 StgSharp.Model/STEP/Analyser/StepDependencyDetector.cs create mode 100644 StgSharp.Model/STEP/Analyser/StepEntityDefineSequence.cs create mode 100644 StgSharp.Model/STEP/StepHeaderLineConstructor.cs create mode 100644 StgSharp.Model/obj/project.packagespec.json create mode 100644 StgSharp.Script/obj/project.packagespec.json create mode 100644 StgSharp.TerminalDialogue/obj/project.packagespec.json create mode 100644 StgSharpDebug/StepReadingTest.cs create mode 100644 StgSharpDebug/obj/project.packagespec.json diff --git a/StgSharp.C/hash.c b/StgSharp.C/hash.c index 8939ef66..a4256a4d 100644 --- a/StgSharp.C/hash.c +++ b/StgSharp.C/hash.c @@ -19,7 +19,8 @@ INTERNAL int SSCDECL city_hash_simplify_sse(byte const *str, int const length) hash = _mm_crc32_u16(hash, *ptr); } } else { - byte *last_128 = end - 16, *last_32 = end - 4; + byte *last_128 = end - 16; + byte *last_32 = end - 4; uint64_t hash64 = size; for (; ptr < last_128; ptr += 16) { __m128i vec = _mm_loadu_si32((int *)ptr); diff --git a/StgSharp.C/x64/Debug/StgSharp.C.ilk b/StgSharp.C/x64/Debug/StgSharp.C.ilk index 380997684919baca44eb7ddbce964fef3a7f2bdf..aee14176fd3187e765f7f785fc160f2ee397a419 100644 GIT binary patch delta 21247 zcmaKUdt6ji_x=np3J7vWxeUT67;htq24#hY3TcLBhJ~huHWv8>qr&3##j;mOODHQ; zWTTl5Nrq;L*Fhr#MFS&6!wZTA<^_DcVBXM7e`}v-8~dC;e$z);?dN&cT6>+f_c@yx zr+x3N!V9zVqAd>v92hsF?3mFI?{1)1R`N$(46(<2Qr0Kg2bFp06_=I_{i)*yY4ao!xznKZUw2FP?359(u%hF4W7gh{=~+5i`4 z+5p#O(~X(TW0h+!kC3D%4GNV!ZC=zWS7+2Jw_Xd`hf9pz7ezi{Vkyz4P`29J#fKF} zn_iJ~bQ@?=lP@1=vKu?`OP25$n>NxknPok0vbfQN4J>TimuFKl&KeMdfb$B zkNEK@Q%~l2-rtQS$CwK5jjnmx)SKCNTfJE1VAH22_}nwvG=?cdOkVd`4?JTU@5~%x zYU|{dbp=s;omo$sCb+3(J~q;H)?3cB_63uAndeV1ZF2QCtQw|Hw`4j^n^o2tyF2Yk zrX3!#B4Vm(H@`4frIJ6$3_h8q!?` zX1%Ne^TO<%=uc;7nB9H*Nttl|2@h47Kg?sxa2ZI<0dPCV<4sLJW#j<}Uf{8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e92f5ff6 100644 GIT binary patch delta 25 hcmewn@*`x!1L4U%(mb2@iSH7coW(z3^8;ZgW&oy13ta#J delta 29 jcmewn@*`x!1L4UTS^}H9Sd^GSjLBN!b2h&b-X#P8#5)W6 diff --git a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.read.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.read.1.tlog index c3da481df9c898587cadc59e0094cf5633aca5e6..18832a2163ad90c1d872703bc91e9d90643afac9 100644 GIT binary patch delta 53 zcmeA<$2;jF?}imerpE~}v$emGWCUWS?QbNR6?~_k6J(w+dBqWd=~J?q#Fi&zF)?jF Ju$PH11OQrT6(9fr delta 57 zcmV-90LK54(G85w4X~)hmtGPB5R)1nke4780U(z=7Xpy8&~!*ow@wfOrUaKDy#fY< PuEd9~!~wUi!~!5qe_IwL diff --git a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.write.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.write.1.tlog index fca4f9ba09cc27df76b39332f1a31c0e77a5e94b..9c290a6ff6b073391a7a0c88c1119d17e34aacba 100644 GIT binary patch delta 54 zcmV-60LlNDZSr!k%qo+R3J|l#CQJddfGrpalkhB%la2)plh`V}leQeBlTZN)lM(`~ MlRy{>v)&eV0f;#j*#H0l delta 24 gcmexVG$VJz8Li0|OixU9Fr6@Y0++z%J6b7R0HB)-YybcN diff --git a/StgSharp.C/x64/Debug/StgSharpC.log b/StgSharp.C/x64/Debug/StgSharpC.log index d995dc14..11a5cd61 100644 --- a/StgSharp.C/x64/Debug/StgSharpC.log +++ b/StgSharp.C/x64/Debug/StgSharpC.log @@ -1,62 +1,7 @@ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(517,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - mat4.c - string.c -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\mat4.c(9,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容 -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,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\内核源代码\StgSharp.C\mat4.c(88,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(88,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(89,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(90,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(91,61): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(96,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,38): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 + hash.c +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(30,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(31,50): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,15): warning C4090: “初始化”: 不同的“const”限定符 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,34): warning C4090: “初始化”: 不同的“const”限定符 StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.dll diff --git a/StgSharp.C/x64/Debug/hash.cod b/StgSharp.C/x64/Debug/hash.cod index d6f90aa0..2f0b8e8a 100644 --- a/StgSharp.C/x64/Debug/hash.cod +++ b/StgSharp.C/x64/Debug/hash.cod @@ -332,24 +332,27 @@ $LN9@city_hash_: 00101 e9 21 01 00 00 jmp $LN23@city_hash_ $LN22@city_hash_: -; 22 : byte *last_128 = end - 16, *last_32 = end - 4; +; 22 : byte *last_128 = end - 16; 00106 48 8b 45 48 mov rax, QWORD PTR end$[rbp] 0010a 48 83 e8 10 sub rax, 16 0010e 48 89 85 a8 00 00 00 mov QWORD PTR last_128$2[rbp], rax + +; 23 : byte *last_32 = end - 4; + 00115 48 8b 45 48 mov rax, QWORD PTR end$[rbp] 00119 48 83 e8 04 sub rax, 4 0011d 48 89 85 c8 00 00 00 mov QWORD PTR last_32$3[rbp], rax -; 23 : uint64_t hash64 = size; +; 24 : uint64_t hash64 = size; 00124 8b 45 24 mov eax, DWORD PTR size$[rbp] 00127 48 89 85 e8 00 00 00 mov QWORD PTR hash64$4[rbp], rax -; 24 : for (; ptr < last_128; ptr += 16) { +; 25 : for (; ptr < last_128; ptr += 16) { 0012e eb 0c jmp SHORT $LN13@city_hash_ $LN11@city_hash_: @@ -362,14 +365,14 @@ $LN13@city_hash_: 00143 48 39 45 68 cmp QWORD PTR ptr$[rbp], rax 00147 73 5e jae SHORT $LN12@city_hash_ -; 25 : __m128i vec = _mm_loadu_si32((int *)ptr); +; 26 : __m128i vec = _mm_loadu_si32((int *)ptr); 00149 48 8b 45 68 mov rax, QWORD PTR ptr$[rbp] 0014d 66 0f 6e 00 movd xmm0, DWORD PTR [rax] 00151 66 0f 7f 85 10 01 00 00 movdqa XMMWORD PTR vec$5[rbp], xmm0 -; 26 : hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 0)); +; 27 : hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 0)); 00159 66 0f 6f 85 10 01 00 00 movdqa xmm0, XMMWORD PTR vec$5[rbp] @@ -383,7 +386,7 @@ $LN13@city_hash_: 00178 48 89 85 e8 00 00 00 mov QWORD PTR hash64$4[rbp], rax -; 27 : hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 1)); +; 28 : hash64 = _mm_crc32_u64(hash64, _mm_extract_epi64(vec, 1)); 0017f 66 0f 6f 85 10 01 00 00 movdqa xmm0, XMMWORD PTR vec$5[rbp] @@ -397,19 +400,19 @@ $LN13@city_hash_: 0019e 48 89 85 e8 00 00 00 mov QWORD PTR hash64$4[rbp], rax -; 28 : } +; 29 : } 001a5 eb 89 jmp SHORT $LN11@city_hash_ $LN12@city_hash_: -; 29 : hash = _mm_crc32_u8(hash, hash64); +; 30 : hash = _mm_crc32_u8(hash, hash64); 001a7 8b 45 04 mov eax, DWORD PTR hash$[rbp] 001aa f2 0f 38 f0 85 e8 00 00 00 crc32 eax, BYTE PTR hash64$4[rbp] 001b3 89 45 04 mov DWORD PTR hash$[rbp], eax -; 30 : hash = _mm_crc32_u8(hash, hash64 >> 32); +; 31 : hash = _mm_crc32_u8(hash, hash64 >> 32); 001b6 48 8b 85 e8 00 00 00 mov rax, QWORD PTR hash64$4[rbp] @@ -419,7 +422,7 @@ $LN12@city_hash_: 001c9 8b c1 mov eax, ecx 001cb 89 45 04 mov DWORD PTR hash$[rbp], eax -; 31 : for (; ptr < last_32; ptr += 4) { +; 32 : for (; ptr < last_32; ptr += 4) { 001ce eb 0c jmp SHORT $LN16@city_hash_ $LN14@city_hash_: @@ -432,7 +435,7 @@ $LN16@city_hash_: 001e3 48 39 45 68 cmp QWORD PTR ptr$[rbp], rax 001e7 73 13 jae SHORT $LN15@city_hash_ -; 32 : hash = _mm_crc32_u32(hash,*(uint32_t *)ptr); +; 33 : hash = _mm_crc32_u32(hash,*(uint32_t *)ptr); 001e9 48 8b 45 68 mov rax, QWORD PTR ptr$[rbp] 001ed 8b 4d 04 mov ecx, DWORD PTR hash$[rbp] @@ -440,12 +443,12 @@ $LN16@city_hash_: 001f5 8b c1 mov eax, ecx 001f7 89 45 04 mov DWORD PTR hash$[rbp], eax -; 33 : } +; 34 : } 001fa eb d4 jmp SHORT $LN14@city_hash_ $LN15@city_hash_: -; 34 : for (; ptr < end; ptr += 2) { +; 35 : for (; ptr < end; ptr += 2) { 001fc eb 0c jmp SHORT $LN19@city_hash_ $LN17@city_hash_: @@ -457,7 +460,7 @@ $LN19@city_hash_: 0020e 48 39 45 68 cmp QWORD PTR ptr$[rbp], rax 00212 73 13 jae SHORT $LN18@city_hash_ -; 35 : hash = _mm_crc32_u8(hash,*ptr); +; 36 : hash = _mm_crc32_u8(hash,*ptr); 00214 48 8b 45 68 mov rax, QWORD PTR ptr$[rbp] 00218 8b 4d 04 mov ecx, DWORD PTR hash$[rbp] @@ -465,15 +468,15 @@ $LN19@city_hash_: 00220 8b c1 mov eax, ecx 00222 89 45 04 mov DWORD PTR hash$[rbp], eax -; 36 : } +; 37 : } 00225 eb d7 jmp SHORT $LN17@city_hash_ $LN18@city_hash_: $LN23@city_hash_: $LN21@city_hash_: -; 37 : } -; 38 : hash ^= hash >> 16; +; 38 : } +; 39 : hash ^= hash >> 16; 00227 8b 45 04 mov eax, DWORD PTR hash$[rbp] 0022a c1 e8 10 shr eax, 16 @@ -482,13 +485,13 @@ $LN21@city_hash_: 00232 8b c1 mov eax, ecx 00234 89 45 04 mov DWORD PTR hash$[rbp], eax -; 39 : hash *= 0x85ebca6b; +; 40 : hash *= 0x85ebca6b; 00237 69 45 04 6b ca eb 85 imul eax, DWORD PTR hash$[rbp], -2048144789 ; 85ebca6bH 0023e 89 45 04 mov DWORD PTR hash$[rbp], eax -; 40 : hash ^= hash >> 13; +; 41 : hash ^= hash >> 13; 00241 8b 45 04 mov eax, DWORD PTR hash$[rbp] 00244 c1 e8 0d shr eax, 13 @@ -497,13 +500,13 @@ $LN21@city_hash_: 0024c 8b c1 mov eax, ecx 0024e 89 45 04 mov DWORD PTR hash$[rbp], eax -; 41 : hash *= 0xc2b2ae35; +; 42 : hash *= 0xc2b2ae35; 00251 69 45 04 35 ae b2 c2 imul eax, DWORD PTR hash$[rbp], -1028477387 ; c2b2ae35H 00258 89 45 04 mov DWORD PTR hash$[rbp], eax -; 42 : hash ^= hash >> 16; +; 43 : hash ^= hash >> 16; 0025b 8b 45 04 mov eax, DWORD PTR hash$[rbp] 0025e c1 e8 10 shr eax, 16 @@ -512,11 +515,11 @@ $LN21@city_hash_: 00266 8b c1 mov eax, ecx 00268 89 45 04 mov DWORD PTR hash$[rbp], eax -; 43 : return hash; +; 44 : return hash; 0026b 8b 45 04 mov eax, DWORD PTR hash$[rbp] -; 44 : } +; 45 : } 0026e 48 8d a5 f8 01 00 00 lea rsp, QWORD PTR [rbp+504] diff --git a/StgSharp.C/x64/Debug/hash.obj b/StgSharp.C/x64/Debug/hash.obj index 45eca682762e365f50baa7cae05f9ddda77a2ae6..4beb8e7c334a782c230e782298a30337e5f4b23a 100644 GIT binary patch delta 407 zcmX}mPbhL9{<7OU*&Q$w5i7 zt(3ycYQ@2U%gkX%6f28qXp}}W-;?L^`F@|v^Be`(lK{(~S}G=8H>GCl0l$^u=U76F zvxMlWfl)9)YGIVTV>=;dbd6E)?vNhoDN+{ci>4R_Tj1aX?6gcCy2kuU ze$eJW7X1Fn>$lLm)1{vuxaC&mhdl*_gwU*RjN39Bc#;u@{LefN-=jBT(?@^jsHXx= zM2NQ@ieWR9KqIV#qp%8kU^NUvDGWmyjKCUr1?4aeYvDJngFjFKg}7V~8(;%eLM0*1 z-Zlih2jsm>m6f9X{1y3EnUd3mqXlo5|TzY4ZDMag(1mdRxI o-Ol0u{K~|hZ^)NSYd*`KBEIgBA-rR8a~+PBA|}V#7B5Qv0Nspqb^rhX delta 372 zcmXxePbhaFjoR3FmxD;!PLf>sZ7HRp zjFP{v-cpKIQ%CHBdJd(+BRN_jSUd{!aVsQ7pxEQ*avWz??o;SjK z%F6KNS;}*jPNvOFE@tT4;>}PQC4`yX6Z%2W$J9EWu<3LWqm*25Fn01fDbZ_owvP=rO;2!CJ`tj0wNdY~K1&+uF5nQE0|0?@ByPba zI0H4)(pV0@y8eIF`t|+yYJXJEScExh%(K8E5so@bG+1VZRn}N%gH5*BW``y*2`$=m z*riL4K7&a*%wlPp%bGQxxxK%6c)UJ4HGZ61iANV%nmi@OzvtF}sPv7bW&F#zEj~Z{0Q(+>7z_({7`A9q8~YLt2S69>O*oKC*1q3A zvE!oBuZB+5^5=!W6;EIY){wzEHjssZMGl+T!ZvoWi#!V0!#)mBL{F(Yct;ZZb@to*#yj$J?t*a_^p{OzwU~iSy-oJe-WL`{dp{8>x`{@a*OaeT`Jf zJr6iZE<8_1cfpn#IsF)*vef@kYo$T%Rs94r4N5a|rAAt5i_S`0+R-1af@iIfPMXre fX{sAjy3J}&?@y8AaLP$kPQzK0vnZX1)7soG!y9C) diff --git a/StgSharp.C/x64/Debug/vc143.idb b/StgSharp.C/x64/Debug/vc143.idb index 502da69ce66fd60ae20fb654b5bca36317131ce8..cf2749cb4da642e55062a8b6a24835741a1be4ce 100644 GIT binary patch delta 1379 zcma*nT}TvB6bJCRGk0~3EnVGBH#HSCkTlvvu+Y*-$WUnsE6We0f(nJSlq^IkM1%@; zs!=GYD8q*ybkIrqLeW4%O2`MPNTH(0$gOnMbhmr{`BD%xFuy%}|7XsfnT4%yv)8xT zo8zoZlB7L?9VStTBhPRy@)0H8OMxuadwkn6sH9_}j(dHI^w=kkD9Km%M0fJ%ikiV! zw3^LPvtEz1^*?%VS!`E#^E5RrVud^yr|&#fD|7E)T(;V^Hq@9{#nKoHR3qO#6MhO> zFSJ|9Ojr)v;Sj00t!$r&vxBLr>ce^AJnHxmT5-Wz*a^oV`$%aLEU;1C0K4ED7+|OM z6j%x`!ah6gXkATdIy?riz<&4zIzp)@3s%7Ea2U>frZi@X%!M^!RNsN4a0w_7LTZn~@tW+@bXg`WpQd;SwHrpdDb0pe@TPlxQsD1j zUwYs#;pF1`-H7zMllNb-hknbU_&6wX@$zw9{5P89g0CfEZf;mQT-*}OnATTnlOpP>CGrI|k|ZAU!>-7s>I(rj1-Z^98c5961p z#|3L)Cme&!OKB1;fDNS4wSnz3F|G$hd!kyeah)GttkYVo$~v_qCrHc7UGX)|5zMmGUtmad;c{_ zQTsQ={5^lfW*n?wR%VF7ms#&ACY}IO)S5G~Y_r;VHvI4VwwT2ZcJUt=Njtd?t<#U^ eUR{1}wR~;35go?g%8kBrOq}$o7`}6y4gUfa3AR!I delta 2327 zcmeH}T}TvB6vyZ8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JMsW`3@+;c diff --git a/StgSharp.Common/Counter.cs b/StgSharp.Common/Counter.cs index 28045a5a..dbb1d05c 100644 --- a/StgSharp.Common/Counter.cs +++ b/StgSharp.Common/Counter.cs @@ -42,20 +42,17 @@ namespace StgSharp internal readonly T _defualtIncreament; - public Counter( - T defualtValue, - T defualtIncreament, - T defualtDecreament ) + public Counter( T defaultValue, T defaultIncrement, T defaultDecrement ) { - _value = defualtValue; - _defaultValue = defualtValue; - _defualtIncreament = defualtIncreament; - _defualtDecreament = defualtDecreament; + _value = defaultValue; + _defaultValue = defaultValue; + _defualtIncreament = defaultIncrement; + _defualtDecreament = defaultDecrement; } - public T DecreamentSoan => _defualtDecreament; + public T DecrementSpan => _defualtDecreament; - public T IncreamentSpan => _defualtIncreament; + public T IncrementSpan => _defualtIncreament; public T CurrentSpan => _value - _defaultValue; diff --git a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs index 0794d5c1..2e427b18 100644 --- a/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs +++ b/StgSharp.Common/Graphics/OpenGL/ShaderEdit/Shader.cs @@ -45,9 +45,11 @@ namespace StgSharp.Graphics.OpenGL { /// - /// Create an instance of program + /// Create an instance of program /// - /// New instance of instance. + /// + /// New instance of instance. + /// [MethodImpl( MethodImplOptions.AggressiveInlining )] protected override sealed ShaderProgram CreateShaderProgram() { @@ -55,9 +57,7 @@ namespace StgSharp.Graphics.OpenGL } [MethodImpl( MethodImplOptions.AggressiveInlining )] - protected override sealed Shader CreateShaderSegment( - ShaderType type, - int count ) + protected override sealed Shader CreateShaderSegment( ShaderType type, int count ) { return new Shader( GL.CreateShaderSet( count, type ), type, this ); } @@ -71,10 +71,7 @@ namespace StgSharp.Graphics.OpenGL internal readonly GlHandle[] handle; public readonly ShaderType type; - internal unsafe Shader( - GlHandle[] handle, - ShaderType usage, - glRender stream ) + internal unsafe Shader( GlHandle[] handle, ShaderType usage, glRender stream ) { this.handle = handle; GL = stream.GL; @@ -84,10 +81,14 @@ namespace StgSharp.Graphics.OpenGL public SerializableTypeCode SSDTypeCode => SerializableTypeCode.Shader; /// - /// Attach one shader code to a shader program. + /// Attach one shader code to a shader program. /// - /// Shader program to attach - /// Index of shader code in current shader code set. + /// + /// Shader program to attach + /// + /// + /// Index of shader code in current shader code set. + /// [MethodImpl( MethodImplOptions.AggressiveInlining )] public void AttachTo( int index, ShaderProgram target ) { @@ -98,16 +99,22 @@ namespace StgSharp.Graphics.OpenGL { string log = GL.GetShaderStatus( this, index, ( int )status ); if( !string.IsNullOrEmpty( log ) ) { - throw new Exception( $"{$"Shader Error \t{status}\n"}{log}" ); + throw new InvalidOperationException( $"{$"Shader Error \t{status}\n"}{log}" ); } } + [MethodImpl( MethodImplOptions.AggressiveInlining )] + public unsafe void Compile( int index, ReadOnlySpan codeU8Stream ) + { + GL.LoadShaderSource( handle[ index ], codeU8Stream ); + GL.CompileShader( handle[ index ] ); + CheckStatus( index, ShaderStatus.CompileStatus ); + } + [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void Compile( int index, byte[] codeStream ) { - if( codeStream == null ) { - throw new ArgumentNullException( nameof( codeStream ) ); - } + ArgumentNullException.ThrowIfNull( codeStream ); GL.LoadShaderSource( handle[ index ], codeStream ); GL.CompileShader( handle[ index ] ); CheckStatus( index, ShaderStatus.CompileStatus ); @@ -119,8 +126,7 @@ namespace StgSharp.Graphics.OpenGL if( codeStream == null ) { throw new ArgumentNullException( nameof( codeStream ) ); } - GL.LoadShaderSource( - handle[ index ], codeStream.AsSpan() ); + GL.LoadShaderSource( handle[ index ], codeStream.AsSpan() ); GL.CompileShader( handle[ index ] ); CheckStatus( index, ShaderStatus.CompileStatus ); } @@ -134,8 +140,7 @@ namespace StgSharp.Graphics.OpenGL { string str = File.ReadAllText( fileRoute ); if( string.IsNullOrEmpty( str ) ) { - throw new InvalidOperationException( - $"Cannot load and GLSL code from {fileRoute}" ); + throw new InvalidOperationException( $"Cannot load and GLSL code from {fileRoute}" ); } return Encoding.UTF8.GetBytes( str ); } @@ -171,7 +176,7 @@ namespace StgSharp.Graphics.OpenGL internal readonly GlHandle handle; /// - /// CustomizeInit a program with no shader attached. + /// CustomizeInit a program with no shader attached. /// internal unsafe ShaderProgram( glRender binding ) { @@ -180,10 +185,14 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Get a uniform form current shader, the value type of the uniform should be provided. + /// Get a uniform form current shader, the value type of the uniform should be provided. /// - /// ContextName of the Uniform in shader code - /// + /// + /// ContextName of the Uniform in shader code + /// + /// + /// + /// [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe Uniform GetUniform( string name ) where T: struct { @@ -191,70 +200,79 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Get a uniform form current shader, the value type of the uniform should be provided. + /// Get a uniform form current shader, the value type of the uniform should be provided. /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform( string name ) - where T: struct - where U: struct + /// + /// ContextName of the Uniform in shader code + /// + /// + /// + /// + public unsafe Uniform GetUniform( string name ) where T: struct where U: struct { - return new Uniform( - GL.GetUniformLocation( this.handle, name ) ); + return new Uniform( GL.GetUniformLocation( this.handle, name ) ); } /// - /// Get a uniform form current shader, the value type of the uniform should be provided. + /// Get a uniform form current shader, the value type of the uniform should be provided. /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform( string name ) - where T: struct + /// + /// ContextName of the Uniform in shader code + /// + /// + /// + /// + public unsafe Uniform GetUniform( string name ) where T: struct where U: struct where V: struct { - return new Uniform( - GL.GetUniformLocation( this.handle, name ) ); + return new Uniform( GL.GetUniformLocation( this.handle, name ) ); } /// - /// Get a uniform form current shader, the value type of the uniform should be provided. + /// Get a uniform form current shader, the value type of the uniform should be provided. /// - /// ContextName of the Uniform in shader code - /// - public unsafe Uniform GetUniform( string name ) - where T: struct + /// + /// ContextName of the Uniform in shader code + /// + /// + /// + /// + public unsafe Uniform GetUniform( string name ) where T: struct where U: struct where V: struct where W: struct { - return new Uniform( - GL.GetUniformLocation( this.handle, name ) ); + return new Uniform( GL.GetUniformLocation( this.handle, name ) ); } /// - /// Link the shader to current viewPortDisplay. + /// Link the shader to current viewPortDisplay. /// public unsafe void Link() { if( InternalIO.InternalLinkShaderProgram( - ( OpenglContext* )this.GL.ContextHandle, handle.Value ) == 0 ) { + ( OpenglContext* )this.GL.ContextHandle, handle.Value ) == + 0 ) + { IntPtr logPtr = InternalIO.InternalReadSSCLog(); - try { + try + { byte[] logByte = new byte[512]; Marshal.Copy( logPtr, logByte, 0, 512 ); string log = Encoding.UTF8.GetString( logByte ); log = log.Replace( "\0", string.Empty ); InternalIO.InternalWriteLog( log, LogType.Error ); } - catch( Exception ex ) { + catch( Exception ex ) + { InternalIO.InternalWriteLog( ex.Message, LogType.Error ); } } } /// - /// Let the current viewPortDisplay use this shader. + /// Let the current viewPortDisplay use this shader. /// [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void Use() diff --git a/StgSharp.Common/Graphics/OpenGL/glFunction.cs b/StgSharp.Common/Graphics/OpenGL/glFunction.cs index 6636edb7..80f19661 100644 --- a/StgSharp.Common/Graphics/OpenGL/glFunction.cs +++ b/StgSharp.Common/Graphics/OpenGL/glFunction.cs @@ -50,8 +50,7 @@ namespace StgSharp.Graphics.OpenGL private static Dictionary contextToGLMap = new Dictionary( ); - private static ThreadLocal _currentGL = new ThreadLocal( - ); + private static ThreadLocal _currentGL = new ThreadLocal(); private OpenglContext* _context; private Lazy _attachmentColorRange; @@ -64,8 +63,7 @@ namespace StgSharp.Graphics.OpenGL InitializeUnusedTextureImageUint ); _attachmentColorRange = new Lazy( () => { - return GetMaskInteger( - ( uint )glConst.MAX_COLOR_ATTACHMENTS ); + return GetMaskInteger( ( uint )glConst.MAX_COLOR_ATTACHMENTS ); } ); } @@ -87,7 +85,8 @@ namespace StgSharp.Graphics.OpenGL get { #if DEBUG - if( ( IntPtr )_context == IntPtr.Zero ) { + if( ( IntPtr )_context == IntPtr.Zero ) + { throw new NullReferenceException(); } #endif @@ -126,11 +125,15 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Bind a frame Buffer to a frame Buffer target Same function as glBindFramebuffer. + /// Bind a frame Buffer to a frame Buffer target Same function as glBindFramebuffer . /// - /// The frame Buffer target of the binding operation. - /// The handle of the frame Buffer object to bind. + /// + /// The frame Buffer target of the binding operation. + /// + /// + /// The handle of the frame Buffer object to bind. + /// [MethodImpl( MethodImplOptions.AggressiveInlining )] public void BindFrameBuffer( FrameBufferTarget target, GlHandle handle ) { @@ -156,11 +159,9 @@ namespace StgSharp.Graphics.OpenGL } [MethodImpl( MethodImplOptions.AggressiveInlining )] - public FrameBufferStatus CheckFrameBufferStatus( - FrameBufferTarget target ) + public FrameBufferStatus CheckFrameBufferStatus( FrameBufferTarget target ) { - return ( FrameBufferStatus )Context.glCheckFramebufferStatus( - ( uint )target ); + return ( FrameBufferStatus )Context.glCheckFramebufferStatus( ( uint )target ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] @@ -179,7 +180,8 @@ namespace StgSharp.Graphics.OpenGL public void ClearError() { uint code = 0; - for( int i = 0; i < 1024; i++ ) { + for( int i = 0; i < 1024; i++ ) + { code = Context.glGetError(); if( code == 0 ) { return; @@ -201,12 +203,11 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public void CombineFrameBufferRenderBuffer( - FrameBufferAttachment attachment, - GlHandle rboHandle ) + FrameBufferAttachment attachment, + GlHandle rboHandle ) { Context.glFramebufferRenderbuffer( - glConst.FRAMEBUFFER, ( uint )attachment, glConst.RENDERBUFFER, - rboHandle.Value ); + glConst.FRAMEBUFFER, ( uint )attachment, glConst.RENDERBUFFER, rboHandle.Value ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] @@ -242,12 +243,13 @@ namespace StgSharp.Graphics.OpenGL { GlHandle[] ret = new GlHandle[count]; uint t = ( uint )type; - for( int i = 0; i < count; i++ ) { + for( int i = 0; i < count; i++ ) + { uint id = Context.glCreateShader( t ); - if( id == 0 ) { + if( id == 0 ) + { uint error = Context.glGetError(); - throw new InvalidOperationException( - $"Failed in creating shader: {error}" ); + throw new InvalidOperationException( $"Failed in creating shader: {error}" ); } ret[ i ] = GlHandle.Alloc( id ); } @@ -266,7 +268,8 @@ namespace StgSharp.Graphics.OpenGL if( ( handle == null ) || ( handle.Length == 0 ) ) { throw new ArgumentNullException( nameof( handle ) ); } - fixed( GlHandle* hptr = handle ) { + fixed( GlHandle* hptr = handle ) + { uint* iptr = ( uint* )hptr; for( int i = 0; i < handle.Length; i++ ) { Context.glDeleteBuffers( 1, iptr + i ); @@ -275,11 +278,14 @@ namespace StgSharp.Graphics.OpenGL } /// - /// Delete a render Buffer object Very simlilar function as glDeleteRenderbuffers. The only - /// deifference is that this mehtod can only delete one renderbuffer at the same time. + /// Delete a render Buffer object Very simlilar function as glDeleteRenderbuffers . The + /// only deifference is that this mehtod can only delete one renderbuffer at the same + /// time. /// - /// Handle to Buffer to delete. + /// + /// Handle to Buffer to delete. + /// public unsafe void DeleteRenderBuffer( GlHandle bufferHandle ) { Context.glDeleteRenderbuffers( 1, &bufferHandle.Value ); @@ -288,7 +294,8 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void DeleteVertexArrays( GlHandle[] arrays ) { - fixed( GlHandle* hptr = arrays ) { + fixed( GlHandle* hptr = arrays ) + { uint* iptr = ( uint* )hptr; for( int i = 0; i < arrays.Length; i++ ) { Context.glDeleteVertexArrays( 1, iptr + i ); @@ -297,11 +304,7 @@ namespace StgSharp.Graphics.OpenGL } [MethodImpl( MethodImplOptions.AggressiveInlining )] - public unsafe void DrawElements( - GeometryType mode, - uint count, - TypeCode type, - IntPtr ptr ) + public unsafe void DrawElements( GeometryType mode, uint count, TypeCode type, IntPtr ptr ) { uint a; a = type switch @@ -317,14 +320,15 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public void DrawElementsInstanced( - GeometryType mode, - uint count, - TypeCode type, - IntPtr ptr, - uint amount ) + GeometryType mode, + uint count, + TypeCode type, + IntPtr ptr, + uint amount ) { uint a; - switch( type ) { + switch( type ) + { case TypeCode.UInt32: a = glConst.UNSIGNED_INT; break; @@ -343,8 +347,7 @@ namespace StgSharp.Graphics.OpenGL LogType.Error ); return; } - Context.glDrawElementsInstanced( - ( uint )mode, count, a, ( void* )ptr, amount ); + Context.glDrawElementsInstanced( ( uint )mode, count, a, ( void* )ptr, amount ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] @@ -355,22 +358,22 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public void FrameBufferTexture2d( - FrameBufferTarget target, - uint attachment, - Texture2DTarget texTarget, - GlHandle textureHandle, - int level ) + FrameBufferTarget target, + uint attachment, + Texture2DTarget texTarget, + GlHandle textureHandle, + int level ) { Context.glFramebufferTexture2D( - ( uint )target, attachment, ( uint )texTarget, - textureHandle.Value, level ); + ( uint )target, attachment, ( uint )texTarget, textureHandle.Value, level ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe GlHandle[] GenBuffers( int count ) { GlHandle[] h = new GlHandle[count]; - fixed( GlHandle* hptr = h ) { + fixed( GlHandle* hptr = h ) + { for( int i = 0; i < count; i++ ) { Context.glGenBuffers( count, ( ( uint* )hptr ) + i ); } @@ -448,51 +451,48 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void GetTextureImage( - Texture2DTarget target, - int level, - ImageChannel channel, - PixelChannelLayout channelLayout, - T[] dataStream ) + Texture2DTarget target, + int level, + ImageChannel channel, + PixelChannelLayout channelLayout, + T[] dataStream ) where T: struct,INumber { #pragma warning disable CS8500 - fixed( T* tptr = dataStream ) { + fixed( T* tptr = dataStream ) + { Context.glGetTexImage( - ( uint )target, level, ( uint )channel, - ( uint )channelLayout, tptr ); + ( uint )target, level, ( uint )channel, ( uint )channelLayout, tptr ); } #pragma warning restore CS8500 } [MethodImpl( MethodImplOptions.AggressiveInlining )] public void GetTextureLevelProperty( - uint textureTypeMask, - int level, - uint propertyMask, - out int propertyValue ) + uint textureTypeMask, + int level, + uint propertyMask, + out int propertyValue ) { fixed( int* iptr = &propertyValue ) { - Context.glGetTexLevelParameteriv( - textureTypeMask, level, propertyMask, iptr ); + Context.glGetTexLevelParameteriv( textureTypeMask, level, propertyMask, iptr ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] - public unsafe GlHandle GetUniformLocation( - GlHandle program, - string name ) + public unsafe GlHandle GetUniformLocation( GlHandle program, string name ) { byte[] code = Encoding.UTF8.GetBytes( name ); - fixed( byte* ptr = code ) { + fixed( byte* ptr = code ) + { int ret = Context.glGetUniformLocation( program.Value, ptr ); #if DEBUG - if( ( ret == glConst.INVALID_OPERATION ) || ( ret == - glConst.INVALID_VALUE ) ) { + if( ( ret == glConst.INVALID_OPERATION ) || ( ret == glConst.INVALID_VALUE ) ) + { throw new InvalidOperationException(); } if( ret == -1 ) { - throw new UniformEmptyReferenceException( - nameof( program ), name ); + throw new UniformEmptyReferenceException( nameof( program ), name ); } #endif return GlHandle.SignedAlloc( ret ); @@ -500,47 +500,51 @@ namespace StgSharp.Graphics.OpenGL } [MethodImpl( MethodImplOptions.AggressiveInlining )] - public unsafe void LoadShaderSource( - GlHandle shaderHandle, - byte[] codeStream ) + public unsafe void LoadShaderSource( GlHandle shaderHandle, byte[] codeStream ) { fixed( byte* streamPtr = codeStream ) { - Context.glShaderSource( - shaderHandle.Value, 1, &streamPtr, ( void* )0 ); + Context.glShaderSource( shaderHandle.Value, 1, &streamPtr, ( void* )0 ); } } - public unsafe void LoadShaderSource( - GlHandle shaderHandle, - ReadOnlySpan codeStream ) + public unsafe void LoadShaderSource( GlHandle shaderHandle, ReadOnlySpan codeStream ) { - fixed( char* streamPtr = codeStream ) { + fixed( char* streamPtr = codeStream ) + { byte* bptr = ( byte* )streamPtr; - Context.glShaderSource( - shaderHandle.Value, 1, &bptr, ( void* )0 ); + Context.glShaderSource( shaderHandle.Value, 1, &bptr, ( void* )0 ); + } + } + + public unsafe void LoadShaderSource( GlHandle shaderHandle, ReadOnlySpan codeStream ) + { + fixed( byte* streamPtr = codeStream ) + { + byte* bptr = streamPtr; + Context.glShaderSource( shaderHandle.Value, 1, &bptr, ( void* )0 ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public void ReadPixels( - (int X, int Y) beginPosition, - (int width, int height) size, - FrameBufferChannel format, - PixelChannelLayout dataType, - ref byte[] stream ) + (int X, int Y) beginPosition, + (int width, int height) size, + FrameBufferChannel format, + PixelChannelLayout dataType, + ref byte[] stream ) { fixed( byte* bptr = stream ) { Context.glReadPixels( - beginPosition.X, beginPosition.Y, size.width, size.height, - ( uint )format, ( uint )dataType, bptr ); + beginPosition.X, beginPosition.Y, size.width, size.height, ( uint )format, + ( uint )dataType, bptr ); } } public void RereadImage( - in Image i, - (int X, int Y) beginPosition, - FrameBufferChannel format, - PixelChannelLayout dataType ) + in Image i, + (int X, int Y) beginPosition, + FrameBufferChannel format, + PixelChannelLayout dataType ) { byte[] pixels = i.PixelBuffer; if( !pixels.CheckArrayFormat( dataType ) ) { @@ -548,33 +552,31 @@ namespace StgSharp.Graphics.OpenGL } fixed( byte* bptr = pixels ) { Context.glReadPixels( - beginPosition.X, beginPosition.Y, i.Width, i.Height, - ( uint )format, ( uint )dataType, bptr ); + beginPosition.X, beginPosition.Y, i.Width, i.Height, ( uint )format, + ( uint )dataType, bptr ); } i.PixelUpdateCount++; } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferData( - BufferType bufferType, - T bufferData, - BufferUsage usage ) + BufferType bufferType, + T bufferData, + BufferUsage usage ) where T: struct { int size = Marshal.SizeOf(); #pragma warning disable CS8500 T* p = &bufferData; #pragma warning restore CS8500 - Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )p, - ( uint )usage ); + Context.glBufferData( ( uint )bufferType, ( IntPtr )size, ( IntPtr )p, ( uint )usage ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferData( - BufferType bufferType, - T[] bufferArray, - BufferUsage usage ) + BufferType bufferType, + T[] bufferArray, + BufferUsage usage ) where T: struct,INumber { int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) ); @@ -583,19 +585,18 @@ namespace StgSharp.Graphics.OpenGL } #pragma warning disable CS8500 fixed( void* bufferPtr = bufferArray ) - #pragma warning restore CS8500 - { + #pragma warning restore CS8500 + { Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, - ( uint )usage ); + ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, ( uint )usage ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferData( - BufferType bufferType, - ReadOnlySpan bufferArray, - BufferUsage usage ) + BufferType bufferType, + ReadOnlySpan bufferArray, + BufferUsage usage ) where T: struct,INumber { int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) ); @@ -604,19 +605,18 @@ namespace StgSharp.Graphics.OpenGL } #pragma warning disable CS8500 fixed( void* bufferPtr = bufferArray ) - #pragma warning restore CS8500 - { + #pragma warning restore CS8500 + { Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, - ( uint )usage ); + ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, ( uint )usage ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferData( - BufferType bufferType, - Span bufferArray, - BufferUsage usage ) + BufferType bufferType, + Span bufferArray, + BufferUsage usage ) where T: struct, INumber { int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) ); @@ -626,19 +626,18 @@ namespace StgSharp.Graphics.OpenGL #pragma warning disable CS8500 fixed( void* bufferPtr = &bufferArray.GetPinnableReference() ) - #pragma warning restore CS8500 - { + #pragma warning restore CS8500 + { Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, - ( uint )usage ); + ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, ( uint )usage ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferVectorData( - BufferType bufferType, - ReadOnlySpan bufferArray, - BufferUsage usage ) + BufferType bufferType, + ReadOnlySpan bufferArray, + BufferUsage usage ) where T: struct, IVector { int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) ); @@ -647,19 +646,18 @@ namespace StgSharp.Graphics.OpenGL } #pragma warning disable CS8500 fixed( void* bufferPtr = &bufferArray.GetPinnableReference() ) - #pragma warning restore CS8500 - { + #pragma warning restore CS8500 + { Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, - ( uint )usage ); + ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, ( uint )usage ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetBufferVectorData( - BufferType bufferType, - T[] bufferArray, - BufferUsage usage ) + BufferType bufferType, + T[] bufferArray, + BufferUsage usage ) where T: struct, IVector { int size = bufferArray.Length * Marshal.SizeOf( typeof( T ) ); @@ -668,28 +666,26 @@ namespace StgSharp.Graphics.OpenGL } #pragma warning disable CS8500 fixed( void* bufferPtr = bufferArray ) - #pragma warning restore CS8500 - { + #pragma warning restore CS8500 + { Context.glBufferData( - ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, - ( uint )usage ); + ( uint )bufferType, ( IntPtr )size, ( IntPtr )bufferPtr, ( uint )usage ); } } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetRenderBufferStorage( - RenderBufferInternalFormat internalFormat, - (int width, int height) size ) + RenderBufferInternalFormat internalFormat, + (int width, int height) size ) { Context.glRenderbufferStorage( - glConst.RENDERBUFFER, ( uint )internalFormat, size.width, - size.height ); + glConst.RENDERBUFFER, ( uint )internalFormat, size.width, size.height ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] public unsafe void SetRenderBufferStorage( - RenderBufferInternalFormat internalFormat, - (uint width, uint height) size ) + RenderBufferInternalFormat internalFormat, + (uint width, uint height) size ) { Context.glRenderbufferStorage( glConst.RENDERBUFFER, ( uint )internalFormat, ( int )size.width, @@ -698,60 +694,60 @@ namespace StgSharp.Graphics.OpenGL [MethodImpl( MethodImplOptions.AggressiveInlining )] public void SetVertexAttribute( - uint index, - int size, - TypeCode t, - bool normalized, - uint stride, - int pointer ) + uint index, + int size, + TypeCode t, + bool normalized, + uint stride, + int pointer ) { uint type = InternalIO.GLtype[ t ]; Context.glVertexAttribPointer( - index, size, type, normalized ? 1 : 0, stride, - ( void* )pointer ); + index, size, type, normalized ? 1 : 0, stride, ( void* )pointer ); Context.glEnableVertexAttribArray( index ); } [MethodImpl( MethodImplOptions.AggressiveInlining )] public void TextureImage2d( - Texture2DTarget target, - int level, - ImageChannel sourceChannel, - uint width, - uint height, - ImageChannel targetChannel, - PixelChannelLayout type, - T[] pixels ) + Texture2DTarget target, + int level, + ImageChannel sourceChannel, + uint width, + uint height, + ImageChannel targetChannel, + PixelChannelLayout type, + T[] pixels ) where T: struct, INumber { #pragma warning disable CS8500 - fixed( T* tptr = pixels ) { - T* ptr = ( ( pixels == null ) || ( pixels.Length == 0 ) ) ? - ( T* )IntPtr.Zero : tptr; + fixed( T* tptr = pixels ) + { + T* ptr = ( ( pixels == null ) || ( pixels.Length == 0 ) ) ? ( T* )IntPtr.Zero : tptr; Context.glTexImage2D( - ( uint )target, level, ( uint )sourceChannel, width, height, - 0, ( uint )targetChannel, ( uint )type, tptr ); + ( uint )target, level, ( uint )sourceChannel, width, height, 0, + ( uint )targetChannel, ( uint )type, tptr ); } #pragma warning restore CS8500 } [MethodImpl( MethodImplOptions.AggressiveInlining )] public void TextureImage2d( - Texture2DTarget target, - int level, - ImageChannel sourceChannel, - uint width, - uint height, - ImageChannel targetChannel, - PixelChannelLayout type, - Span pixelSpan ) + Texture2DTarget target, + int level, + ImageChannel sourceChannel, + uint width, + uint height, + ImageChannel targetChannel, + PixelChannelLayout type, + Span pixelSpan ) where T: struct, INumber { #pragma warning disable CS8500 - fixed( T* tptr = pixelSpan ) { + fixed( T* tptr = pixelSpan ) + { Context.glTexImage2D( - ( uint )target, level, ( uint )sourceChannel, width, height, - 0, ( uint )targetChannel, ( uint )type, tptr ); + ( uint )target, level, ( uint )sourceChannel, width, height, 0, + ( uint )targetChannel, ( uint )type, tptr ); } #pragma warning restore CS8500 } @@ -763,8 +759,8 @@ namespace StgSharp.Graphics.OpenGL } public static bool TryGetFunctionPackage( - IntPtr handle, - out OpenGLFunction functionPackage ) + IntPtr handle, + out OpenGLFunction functionPackage ) { return contextToGLMap.TryGetValue( handle, out functionPackage ); } @@ -798,7 +794,10 @@ namespace StgSharp.Graphics.OpenGL if( contextToGLMap.TryGetValue( handle, out pack ) ) { return pack; } - pack = new OpenGLFunction { _context = ( OpenglContext* )handle }; + pack = new OpenGLFunction + { + _context = ( OpenglContext* )handle + }; contextToGLMap.Add( handle, pack ); return pack; } diff --git a/StgSharp.Common/Internal/InternalResource.cs b/StgSharp.Common/Internal/InternalResource.cs index 3daeae0d..fd73565e 100644 --- a/StgSharp.Common/Internal/InternalResource.cs +++ b/StgSharp.Common/Internal/InternalResource.cs @@ -49,7 +49,9 @@ namespace StgSharp.Internal #region CollisionTexture - internal const string CollisionTextureVertexShader = """ + internal static ReadOnlySpan CollisionTextureVertexShader + { + get => """ #version 430 core layout(location = 0) in vec2 localCollisionCoord; layout(location = 1) in vec2 spaceCoord; @@ -75,8 +77,12 @@ namespace StgSharp.Internal float angle = atan(realCoord.y, realCoord.x); gl_Position = vec4(angle, realCoord.y, dist, 1); } - """; - internal const string CollisionTextureFragmentShader = """ + """u8; + } + + internal static ReadOnlySpan CollisionTextureFragmentShader + { + get => """ #version 430 core out vec4 Color; @@ -92,8 +98,9 @@ namespace StgSharp.Internal gl_FragDepth = min(dist, gl_FragDepth); Color = vec4(dist,0,0,1); } - """; + """u8; + } - #endregion + #endregion } } diff --git a/StgSharp.Common/Stg/Bullet.cs b/StgSharp.Common/Stg/Bullet.cs index 1f31f3c5..ef4c73ec 100644 --- a/StgSharp.Common/Stg/Bullet.cs +++ b/StgSharp.Common/Stg/Bullet.cs @@ -7,7 +7,7 @@ // // 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, +// 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, @@ -17,7 +17,7 @@ // this permission notice shall be included in all copies // or substantial portions of the Software. // -// THE SOFTWARE IS PROVIDED ¡°AS IS¡±, +// 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. @@ -46,9 +46,7 @@ namespace StgSharp.Gaming float angle, float scale ) { - if( buffer == null ) { - throw new ArgumentNullException( nameof( buffer ) ); - } + ArgumentNullException.ThrowIfNull(buffer); GlobalBuffer = buffer; BufferId = buffer.CreateInstanceID(); ( ( IInstancing )this ).Scale = scale; diff --git a/StgSharp.Common/obj/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs b/StgSharp.Common/obj/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs index d87061fd..5e596158 100644 --- a/StgSharp.Common/obj/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs +++ b/StgSharp.Common/obj/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs @@ -1,9 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,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+ccef0de6f686f94da655b0e7d854d0acaf907d04")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Common")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Common")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Common/obj/project.packagespec.json b/StgSharp.Common/obj/project.packagespec.json new file mode 100644 index 00000000..ee8a3349 --- /dev/null +++ b/StgSharp.Common/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj","projectName":"StgSharp.Common","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.CSharp":{"target":"Package","version":"[4.7.0, )"},"System.Runtime.CompilerServices.Unsafe":{"target":"Package","version":"[6.1.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs b/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs index 5b2fe53e..5e596158 100644 --- a/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs +++ b/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.AssemblyInfo.cs @@ -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+b618fdf7b5295b190dcc6b7168e038d1d5a11455")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Common")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Common")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.sourcelink.json b/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.sourcelink.json index 77b8f154..6fa307cc 100644 --- a/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.sourcelink.json +++ b/StgSharp.Common/obj/x64/Debug/net8.0/StgSharp.Common.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/b618fdf7b5295b190dcc6b7168e038d1d5a11455/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/a6411e2f25010961d278c5bcb4a929e21b176bba/*"}} \ No newline at end of file diff --git a/StgSharp.Generator/obj/Debug/net8.0/StgSharp.Generator.AssemblyInfo.cs b/StgSharp.Generator/obj/Debug/net8.0/StgSharp.Generator.AssemblyInfo.cs index 961587ff..e592a92f 100644 --- a/StgSharp.Generator/obj/Debug/net8.0/StgSharp.Generator.AssemblyInfo.cs +++ b/StgSharp.Generator/obj/Debug/net8.0/StgSharp.Generator.AssemblyInfo.cs @@ -1,9 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.Generator")] [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+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Generator")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Generator")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Generator/obj/project.packagespec.json b/StgSharp.Generator/obj/project.packagespec.json new file mode 100644 index 00000000..60093af2 --- /dev/null +++ b/StgSharp.Generator/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Generator\\StgSharp.Generator.csproj","projectName":"StgSharp.Generator","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Generator\\StgSharp.Generator.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Generator\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Microsoft.CodeAnalysis.CSharp":{"suppressParent":"All","target":"Package","version":"[4.13.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharp.Model/STEP/Analyser/StepDependencyDetector.cs b/StgSharp.Model/STEP/Analyser/StepDependencyDetector.cs new file mode 100644 index 00000000..ea072bb6 --- /dev/null +++ b/StgSharp.Model/STEP/Analyser/StepDependencyDetector.cs @@ -0,0 +1,61 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StepDependencyDetector.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 StgSharp.Model.Step; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Model.Step +{ + internal class StepDependencyDetector + { + + public StepDependencyDetector() { } + + public List Dependencies { get; private set; } = new(); + + public void AddDependency( StepEntityInstanceNode node ) + { + Dependencies.Add( node.Id ); + } + + public IEnumerable ExportAllDependencies() + { + List ret = Dependencies; + Dependencies = new List(); + return ret; + } + + } +} diff --git a/StgSharp.Model/STEP/Analyser/StepEntityDefineSequence.cs b/StgSharp.Model/STEP/Analyser/StepEntityDefineSequence.cs new file mode 100644 index 00000000..840ed15b --- /dev/null +++ b/StgSharp.Model/STEP/Analyser/StepEntityDefineSequence.cs @@ -0,0 +1,54 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StepEntityDefineSequence.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 StgSharp.Script.Express; + +using System; +using System.Collections.Generic; +using System.ComponentModel.Design; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp.Model.Step +{ + public record class StepEntityDefineSequence + { + public StepEntityDefineSequence( ExpSyntaxNode node, IEnumerable dep ) + { + Expression = node; + Dependencies = dep; + } + + public ExpSyntaxNode Expression { get; init; } + + public IEnumerable Dependencies { get; init; } + } +} diff --git a/StgSharp.Model/STEP/StepHeaderLineConstructor.cs b/StgSharp.Model/STEP/StepHeaderLineConstructor.cs new file mode 100644 index 00000000..3595fa86 --- /dev/null +++ b/StgSharp.Model/STEP/StepHeaderLineConstructor.cs @@ -0,0 +1,101 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StepHeaderLineConstructor.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.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; + +namespace StgSharp.Model.Step +{ + public class StepHeaderLineConstructor + { + + private static Regex regex = new Regex( + @"(?.+?(\)|'\s?\)|'))\s?(?,)\s?(?(.|\(|\(\s?').+)", + RegexOptions.Compiled ); + + private readonly int _id; + private readonly List _paramList; + private string _caller; + + public StepHeaderLineConstructor( int id, string caller, string parameters ) + { + _caller = caller; + _paramList = new List(); + SplitParameter( parameters ); + } + + public string this[ int paramIndex ] + { + get => _paramList[ paramIndex ]; + } + + public ReadOnlyCollection ParamList + { + get => _paramList.AsReadOnly(); + } + + public static string TempCallerName + { + get => "TEMPCALLER"; + } + + public string Caller + { + get => _caller; + internal set => _caller = value; + } + + public static StepHeaderLineConstructor CreateTempExpression( int id ) + { + return new StepHeaderLineConstructor( id, "TEMPCALLER", string.Empty ); + } + + private void SplitParameter( string parameters ) + { + if( string.IsNullOrEmpty( parameters ) || string.IsNullOrWhiteSpace( parameters ) ) { + return; + } + Match match = regex.Match( parameters ); + while( match.Success ) + { + _paramList.Add( match.Groups[ "param1" ].Value ); + parameters = match.Groups[ "other" ].Value; + match = regex.Match( parameters ); + } + _paramList.Add( parameters ); + } + + } +} diff --git a/StgSharp.Model/obj/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs b/StgSharp.Model/obj/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs index 17640bef..ec6d5c05 100644 --- a/StgSharp.Model/obj/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs +++ b/StgSharp.Model/obj/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs @@ -1,9 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,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+ccef0de6f686f94da655b0e7d854d0acaf907d04")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Model/obj/project.packagespec.json b/StgSharp.Model/obj/project.packagespec.json new file mode 100644 index 00000000..6d25e4b5 --- /dev/null +++ b/StgSharp.Model/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Model\\StgSharp.Model.csproj","projectName":"StgSharp.Model","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Model\\StgSharp.Model.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Model\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj"},"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs index f8722827..ec6d5c05 100644 --- a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs +++ b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.AssemblyInfo.cs @@ -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+a0f7476291d65b51de2055f8b2d69fa44348d04b")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Model")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json index 77b8f154..6fa307cc 100644 --- a/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json +++ b/StgSharp.Model/obj/x64/Debug/net8.0/StgSharp.Model.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/b618fdf7b5295b190dcc6b7168e038d1d5a11455/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/a6411e2f25010961d278c5bcb4a929e21b176bba/*"}} \ No newline at end of file diff --git a/StgSharp.Script/Common/CompileStack.cs b/StgSharp.Script/Common/CompileStack.cs index ac3e595a..d5a9252f 100644 --- a/StgSharp.Script/Common/CompileStack.cs +++ b/StgSharp.Script/Common/CompileStack.cs @@ -89,6 +89,8 @@ namespace StgSharp.Script get => _statementCache.Peek(); } + public Stack DepthStack => _depthStack; + public void DecreaseDepth() { CompileDepthMark mark = _depthStack.Pop(); @@ -110,9 +112,13 @@ namespace StgSharp.Script if( StatementsInDepth.Count == 0 ) { return TNode.Empty; } - TNode first = StatementsInDepth.Peek(); - while( StatementsInDepth.Count > 0 ) { - first.PrependNode( StatementsInDepth.Pop() ); + TNode end = StatementsInDepth.Peek(); + TNode first = end; + while( StatementsInDepth.Count > 0 ) + { + first = StatementsInDepth.Pop(); + end.PrependNode( first ); + end = first; } return first; } diff --git a/StgSharp.Script/Express/CompileEnv/KeyWord.cs b/StgSharp.Script/Express/CompileEnv/KeyWord.cs index eb320d3e..85205451 100644 --- a/StgSharp.Script/Express/CompileEnv/KeyWord.cs +++ b/StgSharp.Script/Express/CompileEnv/KeyWord.cs @@ -69,7 +69,7 @@ namespace StgSharp.Script.Express Dot, Comma, Semicolon, Colon, Percent, Apostrophe, Backslash, IndexOf, RightBracket, LeftBrace, RightBrace, Pipe, LeftParen, RightParen, LeftAsterisk, - Assignment, DoublePipe, ExpSymbole, CommentSingleLine, + Assignment, DoublePipe, ExpSymbol, CommentSingleLine, CommentStart, CommentEnd, InstanceEqual, InstanceNotEqual ]; @@ -342,7 +342,7 @@ namespace StgSharp.Script.Express public const string LeftAsterisk = "<*"; public const string Assignment = ":="; public const string DoublePipe = "||"; - public const string ExpSymbole = "**"; + public const string ExpSymbol = "**"; public const string CommentSingleLine = "--"; public const string CommentStart = "(*"; public const string CommentEnd = "*)"; diff --git a/StgSharp.Script/Express/Element/ExpFunction.cs b/StgSharp.Script/Express/Element/ExpFunction.cs index e2cc7961..3f5b16a3 100644 --- a/StgSharp.Script/Express/Element/ExpFunction.cs +++ b/StgSharp.Script/Express/Element/ExpFunction.cs @@ -54,7 +54,7 @@ namespace StgSharp.Script.Express public override ExpElementType ElementType => ExpElementType.Function; - public IExpElementSource ReturningType { get; protected set; } + public ExpInstantiableElement ReturningType { get; protected set; } public override IScriptSourceProvider SourceProvider => _transmitter; diff --git a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs index a713a449..5d753d20 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs @@ -69,7 +69,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == @@ -89,7 +90,7 @@ namespace StgSharp.Script.Express { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -133,7 +134,7 @@ namespace StgSharp.Script.Express { if( right is not ExpMetaRefNode metaRef ) { throw new ExpInvalidTypeException( - "", right.EqualityTypeConvert.Name ); + source, "", right.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -153,7 +154,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == @@ -173,7 +175,7 @@ namespace StgSharp.Script.Express { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -189,7 +191,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -205,7 +208,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -221,7 +225,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == @@ -241,7 +246,7 @@ namespace StgSharp.Script.Express { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); + source, left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -257,7 +262,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } return new ExpBinaryOperatorNode( source, left, right ) { @@ -273,7 +279,8 @@ namespace StgSharp.Script.Express ExpSyntaxNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( source, "Number", + left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == diff --git a/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs index 47ac0c43..ffaa0923 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpCollectionIndexNode.cs @@ -67,7 +67,7 @@ namespace StgSharp.Script.Express { if( !indexExpression.IsNumber ) { throw new ExpInvalidTypeException( - "Number", indexExpression.EqualityTypeConvert.Name ); + source, "Number", indexExpression.EqualityTypeConvert.Name ); } return new ExpCollectionIndexNode( source, instance, indexExpression ); } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs index 16ebc340..f78ebf11 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpFunctionCallingNode.cs @@ -58,7 +58,7 @@ namespace StgSharp.Script.Express public ExpFunctionSource FunctionCaller => _function; - public override ExpInstantiableElement EqualityTypeConvert => _function.; + public override ExpInstantiableElement EqualityTypeConvert => _function.ReturningType; public override ExpSyntaxNode Left => Empty; diff --git a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs index 3d4018f5..969864a5 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpRepeatNode.cs @@ -78,7 +78,7 @@ namespace StgSharp.Script.Express 1, isLiteral: true ); break; default: - throw new ExpInvalidTypeException( "Int or Real", "otherwise" ); + throw new ExpInvalidTypeException( variable, "Int or Real", "otherwise" ); } } _variable = variable; diff --git a/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs index 63101d30..99e9e9c1 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpUnaryOperatorNode.cs @@ -58,7 +58,8 @@ namespace StgSharp.Script.Express public static ExpUnaryOperatorNode UnaryMinus( Token source, ExpSyntaxNode operand ) { if( !operand.IsNumber ) { - throw new ExpInvalidTypeException( "Number", operand.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( + source, "Number", operand.EqualityTypeConvert.Name ); } bool isFloat = ( operand._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; @@ -74,7 +75,7 @@ namespace StgSharp.Script.Express if( ( operand._nodeFlag | ( ExpNodeFlag.BuiltinType_Logic | ExpNodeFlag.BuiltinType_Logic ) ) == 0 ) { throw new ExpInvalidTypeException( - "Bool or Logic", operand.EqualityTypeConvert.Name ); + source, "Bool or Logic", operand.EqualityTypeConvert.Name ); } return new ExpUnaryOperatorNode( source ) { @@ -86,7 +87,8 @@ namespace StgSharp.Script.Express public static ExpUnaryOperatorNode UnaryPlus( Token source, ExpSyntaxNode operand ) { if( !operand.IsNumber ) { - throw new ExpInvalidTypeException( "Number", operand.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( + source, "Number", operand.EqualityTypeConvert.Name ); } bool isFloat = ( operand._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; diff --git a/StgSharp.Script/Express/ExpExceptions.cs b/StgSharp.Script/Express/ExpExceptions.cs index cb82f4e4..d6cb855f 100644 --- a/StgSharp.Script/Express/ExpExceptions.cs +++ b/StgSharp.Script/Express/ExpExceptions.cs @@ -42,8 +42,23 @@ namespace StgSharp.Script.Express public class ExpException : Exception { + private Token _pos; + public ExpException( string message ) : base( message ) { } + public ExpException( Token position, string message ) + : base( $"Express compile error at {position.Line}-{position.Column}:\n{message}" ) + { + _pos = position; + } + + public ExpException( ExpSyntaxNode node, string message ) + : base( + $"Express compile error at {node.Source.Line}-{node.Source.Column}:\n{message}" ) + { + _pos = node._source; + } + } public class ExpInvalidCharException : ExpException @@ -100,11 +115,17 @@ namespace StgSharp.Script.Express } - public class ExpInvalidTypeException : InvalidCastException + public class ExpInvalidTypeException : ExpException { - public ExpInvalidTypeException( string required, string provided ) + public ExpInvalidTypeException( ExpSyntaxNode node, string required, string provided ) : base( + node, + $"Type {required} is required at position, but a {provided} instance is provided." ) { } + + public ExpInvalidTypeException( Token t, string required, string provided ) + : base( + t, $"Type {required} is required at position, but a {provided} instance is provided." ) { } } diff --git a/StgSharp.Script/Express/ExpSyntaxAnalyzer.PrefixReverseAnalysing.cs b/StgSharp.Script/Express/ExpSyntaxAnalyzer.PrefixReverseAnalysing.cs index ba58bee7..d522a1a5 100644 --- a/StgSharp.Script/Express/ExpSyntaxAnalyzer.PrefixReverseAnalysing.cs +++ b/StgSharp.Script/Express/ExpSyntaxAnalyzer.PrefixReverseAnalysing.cs @@ -54,7 +54,7 @@ namespace StgSharp.Script.Express _cache.StatementsInDepth.Push( statement ); } else { - ExpInvalidSyntaxException.ThrowNoOperator( rightSeparator ); + _cache.StatementsInDepth.Push( ExpSyntaxNode.Empty ); } } else { diff --git a/StgSharp.Script/Express/ExpTokenReader.cs b/StgSharp.Script/Express/ExpTokenReader.cs index 094fcc60..19e5f033 100644 --- a/StgSharp.Script/Express/ExpTokenReader.cs +++ b/StgSharp.Script/Express/ExpTokenReader.cs @@ -114,7 +114,7 @@ namespace StgSharp.Script.Express do { _lineCache = _provider.ReadLine( out _lineNum ); - } while (string.IsNullOrEmpty( _lineCache )); + } while (string.IsNullOrEmpty( _lineCache ) && !_provider.IsEmpty); _current = 0; } if( _isReadingMultiLineComment ) @@ -182,7 +182,7 @@ namespace StgSharp.Script.Express rest = match.Groups[ "rest" ].Index; _current = rest; _last = new( - ExpressCompile.PoolString( source[ 1..( end - begin ) ] ), _lineNum, + ExpressCompile.PoolString( source[ 0..( end - begin ) ] ), _lineNum, begin, TokenFlag.Member ); return _last; } else @@ -236,21 +236,12 @@ namespace StgSharp.Script.Express throw new ExpInvalidCharException( '\"' ); } case '(': - cNext = source[ 1 ]; - if( cNext == '*' ) - { - _isReadingMultiLineComment = true; - _current += 2; - goto readLine; - } else - { - begin = _current; - _current++; - _last = new( - ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, - TokenFlag.Separator_Left ); - return _last; - } + begin = _current; + _current++; + _last = new( + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, + TokenFlag.Separator_Left ); + return _last; case ')' or '}': begin = _current; _current++; diff --git a/StgSharp.Script/obj/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs b/StgSharp.Script/obj/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs index c0cd0726..c2bbcd95 100644 --- a/StgSharp.Script/obj/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs +++ b/StgSharp.Script/obj/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs @@ -1,9 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,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+ccef0de6f686f94da655b0e7d854d0acaf907d04")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Script/obj/project.packagespec.json b/StgSharp.Script/obj/project.packagespec.json new file mode 100644 index 00000000..cae5fc4b --- /dev/null +++ b/StgSharp.Script/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj","projectName":"StgSharp.Script","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"CommunityToolkit.HighPerformance":{"target":"Package","version":"[8.4.0, )"},"Microsoft.CodeAnalysis.CSharp":{"target":"Package","version":"[4.13.0, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs index 1c90c81b..c2bbcd95 100644 --- a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs +++ b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.AssemblyInfo.cs @@ -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+b618fdf7b5295b190dcc6b7168e038d1d5a11455")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.Script")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json index 77b8f154..6fa307cc 100644 --- a/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json +++ b/StgSharp.Script/obj/x64/Debug/net8.0/StgSharp.Script.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/b618fdf7b5295b190dcc6b7168e038d1d5a11455/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/a6411e2f25010961d278c5bcb4a929e21b176bba/*"}} \ No newline at end of file diff --git a/StgSharp.TerminalDialogue/obj/Debug/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs b/StgSharp.TerminalDialogue/obj/Debug/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs index a73d1a1c..2217181c 100644 --- a/StgSharp.TerminalDialogue/obj/Debug/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +++ b/StgSharp.TerminalDialogue/obj/Debug/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs @@ -1,36 +1,4 @@ -//----------------------------------------------------------------------- -//----------------------------------------------------------------------- -// file=".NETCoreApp,Version=v8.0.AssemblyAttributes.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.Reflection; -[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute( - ".NETCoreApp,Version=v8.0", - FrameworkDisplayName = ".NET 8.0" )] +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")] diff --git a/StgSharp.TerminalDialogue/obj/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs b/StgSharp.TerminalDialogue/obj/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs index 434e588d..b130a49b 100644 --- a/StgSharp.TerminalDialogue/obj/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs +++ b/StgSharp.TerminalDialogue/obj/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs @@ -1,9 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 // //------------------------------------------------------------------------------ @@ -13,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("StgSharp.TerminalDialogue")] [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+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharp.TerminalDialogue")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharp.TerminalDialogue")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharp.TerminalDialogue/obj/project.packagespec.json b/StgSharp.TerminalDialogue/obj/project.packagespec.json new file mode 100644 index 00000000..45bed2a6 --- /dev/null +++ b/StgSharp.TerminalDialogue/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.TerminalDialogue\\StgSharp.TerminalDialogue.csproj","projectName":"StgSharp.TerminalDialogue","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.TerminalDialogue\\StgSharp.TerminalDialogue.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.TerminalDialogue\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","dependencies":{"Terminal.Gui":{"target":"Package","version":"[2.0.0-v2-develop.2329, )"}},"imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharpDebug/Program.cs b/StgSharpDebug/Program.cs index 5bb33ee9..6f75701a 100644 --- a/StgSharpDebug/Program.cs +++ b/StgSharpDebug/Program.cs @@ -56,12 +56,12 @@ namespace StgSharp internal static unsafe void Main( string[] args ) { - try - { - StgSharp.Init(); - ExpLinearExpressionTest(); - return; - } + StgSharp.Init(); + TestStepRead(); + StgSharp.Terminate( 0 ); + return; + + try { } catch( Exception ex ) { Console.WriteLine( ex ); diff --git a/StgSharpDebug/StepReadingTest.cs b/StgSharpDebug/StepReadingTest.cs new file mode 100644 index 00000000..277726ef --- /dev/null +++ b/StgSharpDebug/StepReadingTest.cs @@ -0,0 +1,61 @@ +//----------------------------------------------------------------------- +//----------------------------------------------------------------------- +// file="StepReadingTest.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 StgSharp.Model.Step; +using StgSharp.Script.Express; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace StgSharp +{ + internal static partial class Program + { + + private static string[] stepFile = [ + @"D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\StepModel\_NPart#8299.stp", + @"D:\NitloadIndustry\Ñо¿ÏîĿ\1-Flagship\TH2020\ProjectFile\StepModel\¼¸ºÎëÅ÷.STEP", + ]; + + private static void TestStepRead() + { + ExpressCompile.InitCompile(); + if( StepReader.FromFile( stepFile[ 0 ], out StepReader reader ) ) + { + StepModel model = reader.ReadToModelSingleThread(); + reader.Dispose(); + } + } + + } +} diff --git a/StgSharpDebug/obj/project.packagespec.json b/StgSharpDebug/obj/project.packagespec.json new file mode 100644 index 00000000..a9ede609 --- /dev/null +++ b/StgSharpDebug/obj/project.packagespec.json @@ -0,0 +1 @@ +"restore":{"projectUniqueName":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpDebug\\StgSharpDebug.csproj","projectName":"StgSharpDebug","projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpDebug\\StgSharpDebug.csproj","outputPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharpDebug\\obj\\","projectStyle":"PackageReference","fallbackFolders":["C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"],"originalTargetFrameworks":["net8.0"],"sources":{"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\":{},"C:\\Program Files\\dotnet\\library-packs":{},"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net8.0":{"targetAlias":"net8.0","projectReferences":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Common\\StgSharp.Common.csproj"},"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Model\\StgSharp.Model.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Model\\StgSharp.Model.csproj"},"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj":{"projectPath":"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\StgSharp.Script\\StgSharp.Script.csproj"}}}},"warningProperties":{"warnAsError":["NU1605"]},"restoreAuditProperties":{"enableAudit":"true","auditLevel":"low","auditMode":"direct"}}"frameworks":{"net8.0":{"targetAlias":"net8.0","imports":["net461","net462","net47","net471","net472","net48","net481"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"C:\\Program Files\\dotnet\\sdk\\8.0.400/PortableRuntimeIdentifierGraph.json"}} \ No newline at end of file diff --git a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs index 9271c89a..2596b8a1 100644 --- a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs +++ b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs @@ -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+c29993fd8497704d2ddeab3e1a3f8bfa5caa8d90")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a6411e2f25010961d278c5bcb4a929e21b176bba")] [assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json index 2440bc0f..6fa307cc 100644 --- a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json +++ b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/2692495dc8460e1f60a2d073f162c5f526e1ba1b/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/a6411e2f25010961d278c5bcb4a929e21b176bba/*"}} \ No newline at end of file