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 38099768..aee14176 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.ilk and b/StgSharp.C/x64/Debug/StgSharp.C.ilk differ diff --git a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.command.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.command.1.tlog index 39d34ba0..66bef181 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.command.1.tlog and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.command.1.tlog differ 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 c3da481d..18832a21 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.read.1.tlog and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.read.1.tlog differ 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 fca4f9ba..9c290a6f 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.write.1.tlog and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.write.1.tlog differ 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 45eca682..4beb8e7c 100644 Binary files a/StgSharp.C/x64/Debug/hash.obj and b/StgSharp.C/x64/Debug/hash.obj differ diff --git a/StgSharp.C/x64/Debug/hash.sbr b/StgSharp.C/x64/Debug/hash.sbr index ad2c4963..bb7e8bd9 100644 Binary files a/StgSharp.C/x64/Debug/hash.sbr and b/StgSharp.C/x64/Debug/hash.sbr differ diff --git a/StgSharp.C/x64/Debug/vc143.idb b/StgSharp.C/x64/Debug/vc143.idb index 502da69c..cf2749cb 100644 Binary files a/StgSharp.C/x64/Debug/vc143.idb and b/StgSharp.C/x64/Debug/vc143.idb differ diff --git a/StgSharp.C/x64/Debug/vc143.pdb b/StgSharp.C/x64/Debug/vc143.pdb index 2f73bebc..629f56f8 100644 Binary files a/StgSharp.C/x64/Debug/vc143.pdb and b/StgSharp.C/x64/Debug/vc143.pdb differ 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