diff --git a/StgSharp.C/x64/Debug/StgSharp.C.Build.CppClean.log b/StgSharp.C/x64/Debug/StgSharp.C.Build.CppClean.log index 9192fb5b..b7b69115 100644 --- a/StgSharp.C/x64/Debug/StgSharp.C.Build.CppClean.log +++ b/StgSharp.C/x64/Debug/StgSharp.C.Build.CppClean.log @@ -1,51 +1,51 @@ d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.bsc -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.pdb +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.idb d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.sbr d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.obj d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharpc.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\intrinsic.cod d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.sbr d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.obj d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\string.cod d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.sbr d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.obj d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat4.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.sbr -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.obj -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.cod d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.sbr d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.obj d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\hash.cod d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.sbr d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.obj d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stb_image.cod -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.pdb +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat2.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\mat3.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vector_dot.cod +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.sbr +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.obj +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\dllmain.cod d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.dll d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.pdb d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.lib d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\build\stgsharp.c.exp d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.ilk -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\vc143.idb d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.command.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.read.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\bscmake.write.1.tlog -d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.11516.write.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.command.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.items.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.read.1.tlog +d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\cl.write.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.command.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.read.1.tlog d:\nitloadindustry\研究项目\1-flagship\th2020\projectfile\内核源代码\stgsharp.c\x64\debug\stgsharp.c.tlog\link.secondary.1.tlog diff --git a/StgSharp.C/x64/Debug/StgSharp.C.ilk b/StgSharp.C/x64/Debug/StgSharp.C.ilk index 89ac4bb7..d5332a33 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.16312.write.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.16312.write.1.tlog new file mode 100644 index 00000000..6e7e0b8e Binary files /dev/null and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.16312.write.1.tlog 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 b3d79dd1..0a1b834d 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 a6770143..ba075e94 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 deleted file mode 100644 index 89cec62f..00000000 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/CL.write.1.tlog and /dev/null differ diff --git a/StgSharp.C/x64/Debug/StgSharp.C.tlog/bscmake.read.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/bscmake.read.1.tlog index 925321f8..5bb4144b 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/bscmake.read.1.tlog and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/bscmake.read.1.tlog differ diff --git a/StgSharp.C/x64/Debug/StgSharp.C.tlog/link.read.1.tlog b/StgSharp.C/x64/Debug/StgSharp.C.tlog/link.read.1.tlog index 13964ded..9eea48cd 100644 Binary files a/StgSharp.C/x64/Debug/StgSharp.C.tlog/link.read.1.tlog and b/StgSharp.C/x64/Debug/StgSharp.C.tlog/link.read.1.tlog differ diff --git a/StgSharp.C/x64/Debug/StgSharpC.log b/StgSharp.C/x64/Debug/StgSharpC.log index 2b2cef6f..27f548c3 100644 --- a/StgSharp.C/x64/Debug/StgSharpC.log +++ b/StgSharp.C/x64/Debug/StgSharpC.log @@ -1,97 +1,48 @@ C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(517,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。 - hash.c + dllmain.c intrinsic.c mat2.c mat3.c mat4.c + stb_image.c + StgSharpC.c + hash.c string.c + vector.c vector_dot.c -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(4,50): warning C4028: 形参 1 与声明不同 -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\mat3.c(5,49): warning C4028: 形参 1 与声明不同 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(83,23): warning C4133: “函数”: 从“__m256 *”到“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\mat2.c(6,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(90,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(16,50): warning C4028: 形参 1 与声明不同 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(97,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(9,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(29,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(114,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(30,50): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(127,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(15,49): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\stb_image.c(882,25): warning C4047: “=”:“stbi_uc”与“char [33]”的间接级别不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(14,30): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\StgSharpC.c(16,43): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(9,36): warning C4133: “函数”: 从“const __m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(136,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,15): warning C4090: “初始化”: 不同的“const”限定符 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\mat3.c(17,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(7,34): warning C4090: “初始化”: 不同的“const”限定符 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,62): warning C4133: “函数”: 从“__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\mat2.c(31,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,48): warning C4133: “函数”: 从“__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\mat2.c(32,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,36): warning C4133: “函数”: 从“__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\mat2.c(40,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,62): warning C4133: “函数”: 从“__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\mat2.c(40,64): warning C4133: “函数”: 从“__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\mat2.c(46,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(21,36): warning C4133: “函数”: 从“__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\mat2.c(46,59): warning C4133: “函数”: 从“__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\mat2.c(47,35): warning C4133: “函数”: 从“__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\mat2.c(47,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(22,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,37): warning C4133: “函数”: 从“__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\mat2.c(55,64): warning C4133: “函数”: 从“__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\mat3.c(29,49): warning C4028: 形参 1 与声明不同 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\mat3.c(31,36): warning C4133: “函数”: 从“__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\mat3.c(31,62): warning C4133: “函数”: 从“__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\mat3.c(33,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 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\mat3.c(33,62): warning C4133: “函数”: 从“__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\mat3.c(35,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 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\mat3.c(36,36): warning C4133: “函数”: 从“__m128 *”到“const 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 *”的类型不兼容 @@ -99,43 +50,101 @@ D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\St 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\mat3.c(80,35): 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\mat3.c(80,59): 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\vector_dot.c(83,23): warning C4133: “函数”: 从“__m256 *”到“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\vector_dot.c(90,16): 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\vector_dot.c(97,33): warning C4133: “函数”: 从“__m128 *”到“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\vector_dot.c(97,48): 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\vector_dot.c(114,33): 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\vector_dot.c(114,48): 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 *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(127,23): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(136,16): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,33): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\vector_dot.c(144,48): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(4,50): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(6,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(8,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(16,50): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(18,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(5,49): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(20,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(7,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(31,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(9,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(32,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(15,49): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(40,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(17,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(46,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(47,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(19,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,37): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat2.c(55,64): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(21,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(22,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(29,49): warning C4028: 形参 1 与声明不同 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(31,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(33,62): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(35,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(36,36): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(80,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(81,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(81,59): 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\mat3.c(82,35): warning C4133: “函数”: 从“__m128 *”到“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\mat3.c(82,59): warning C4133: “函数”: 从“__m128 *”到“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\mat3.c(91,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\mat3.c(91,60): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(92,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(92,59): warning C4133: “函数”: 从“__m128 *”到“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\mat3.c(106,35): 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\mat3.c(106,59): 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\mat3.c(107,35): 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\mat3.c(107,59): 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\mat3.c(108,35): 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\mat3.c(108,59): 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\mat3.c(117,38): warning C4133: “函数”: 从“__m256 *”到“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\mat3.c(117,60): 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\mat3.c(118,35): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 -D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat4.c(97,63): warning C4133: “函数”: 从“__m256 *”到“const float *”的类型不兼容 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\mat3.c(118,59): warning C4133: “函数”: 从“__m128 *”到“const float *”的类型不兼容 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(29,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\hash.c(30,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”限定符 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(21,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据 +D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\StgSharp.C\string.c(36,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据 + 正在创建库 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.lib 和对象 D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.exp +LINK : warning LNK4098: 默认库“MSVCRT”与其他库的使用冲突;请使用 /NODEFAULTLIB:library StgSharpC.vcxproj -> D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\内核源代码\build\StgSharp.C.dll diff --git a/StgSharp.C/x64/Debug/StgSharpC.obj b/StgSharp.C/x64/Debug/StgSharpC.obj index ffdf9b76..ce86f11e 100644 Binary files a/StgSharp.C/x64/Debug/StgSharpC.obj and b/StgSharp.C/x64/Debug/StgSharpC.obj differ diff --git a/StgSharp.C/x64/Debug/dllmain.obj b/StgSharp.C/x64/Debug/dllmain.obj index a56949d6..e8c33c33 100644 Binary files a/StgSharp.C/x64/Debug/dllmain.obj and b/StgSharp.C/x64/Debug/dllmain.obj differ diff --git a/StgSharp.C/x64/Debug/hash.obj b/StgSharp.C/x64/Debug/hash.obj index f4e4a97f..45eca682 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/intrinsic.obj b/StgSharp.C/x64/Debug/intrinsic.obj index 41057624..8432c5b1 100644 Binary files a/StgSharp.C/x64/Debug/intrinsic.obj and b/StgSharp.C/x64/Debug/intrinsic.obj differ diff --git a/StgSharp.C/x64/Debug/mat2.obj b/StgSharp.C/x64/Debug/mat2.obj index a38e2615..9e27805c 100644 Binary files a/StgSharp.C/x64/Debug/mat2.obj and b/StgSharp.C/x64/Debug/mat2.obj differ diff --git a/StgSharp.C/x64/Debug/mat3.obj b/StgSharp.C/x64/Debug/mat3.obj index 381a9bcd..cc0c501b 100644 Binary files a/StgSharp.C/x64/Debug/mat3.obj and b/StgSharp.C/x64/Debug/mat3.obj differ diff --git a/StgSharp.C/x64/Debug/mat4.obj b/StgSharp.C/x64/Debug/mat4.obj index 64267dcf..0025b964 100644 Binary files a/StgSharp.C/x64/Debug/mat4.obj and b/StgSharp.C/x64/Debug/mat4.obj differ diff --git a/StgSharp.C/x64/Debug/stb_image.obj b/StgSharp.C/x64/Debug/stb_image.obj index 6c6e9b70..d0ce7c53 100644 Binary files a/StgSharp.C/x64/Debug/stb_image.obj and b/StgSharp.C/x64/Debug/stb_image.obj differ diff --git a/StgSharp.C/x64/Debug/string.obj b/StgSharp.C/x64/Debug/string.obj index 4034acb2..dee7e307 100644 Binary files a/StgSharp.C/x64/Debug/string.obj and b/StgSharp.C/x64/Debug/string.obj differ diff --git a/StgSharp.C/x64/Debug/vc143.idb b/StgSharp.C/x64/Debug/vc143.idb index bb8d3f0c..b9967017 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 b53a9933..63dacdaa 100644 Binary files a/StgSharp.C/x64/Debug/vc143.pdb and b/StgSharp.C/x64/Debug/vc143.pdb differ diff --git a/StgSharp.C/x64/Debug/vector.obj b/StgSharp.C/x64/Debug/vector.obj index 033505ef..ce3dbac8 100644 Binary files a/StgSharp.C/x64/Debug/vector.obj and b/StgSharp.C/x64/Debug/vector.obj differ diff --git a/StgSharp.C/x64/Debug/vector_dot.obj b/StgSharp.C/x64/Debug/vector_dot.obj index e202fa54..aef0a7b1 100644 Binary files a/StgSharp.C/x64/Debug/vector_dot.obj and b/StgSharp.C/x64/Debug/vector_dot.obj differ 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 c0ff86db..bf96ef31 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+e3741687a706609a1d0055c3fd11f41945838a70")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")] [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 03e04358..248b54bf 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/e3741687a706609a1d0055c3fd11f41945838a70/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}} \ 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 71c99ff8..4c2d9f9b 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+528d0c5462b4d3da107ad29b859f9c8006fb675a")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")] [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 2738e12a..248b54bf 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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}} \ No newline at end of file diff --git a/StgSharp.Script/Common/CompileStack.cs b/StgSharp.Script/Common/CompileStack.cs index 1338bd79..4a977012 100644 --- a/StgSharp.Script/Common/CompileStack.cs +++ b/StgSharp.Script/Common/CompileStack.cs @@ -38,8 +38,7 @@ using System.Threading.Tasks; namespace StgSharp.Script { - public partial class CompileStack - where TNode: IASTNode + public partial class CompileStack where TNode: IASTNode where TType: ITypeSource { @@ -48,11 +47,15 @@ namespace StgSharp.Script private Token[] _tokenArray = new Token[4]; private int _nodeCount,_tokenCount, _operatorCount; - private Stack _depthStack = new Stack( - ); + private Stack _depthStack = new Stack(); private Stack _isNode = new Stack(); + public CompileStack() + { + _depthStack.Push( new CompileDepthMark( 0, 0, 0 ) ); + } + public CompileDepthMark CurrentDepthMark { get => _depthStack.Peek(); @@ -82,28 +85,26 @@ namespace StgSharp.Script public CompileDepthMark IncreaseDepth( int usage ) { CompileDepthMark mark = - new CompileDepthMark - { - OperandBegin = OperandCount, - OperatorBegin = OperatorCount, - State = usage - }; + new CompileDepthMark( OperatorCount, OperandCount, usage ); _depthStack.Push( mark ); return mark; } public bool PeekOperand( out Token t, out TNode n ) { - if( OperandAheadOfDepth <= 0 ) { + if( OperandAheadOfDepth <= 0 ) + { t = Token.Empty; n = TNode.Empty; return false; } - if( _isNode.Pop() ) { + if( _isNode.Pop() ) + { t = Token.Empty; n = _nodeArray[ _nodeCount - 1 ]; return true; - } else { + } else + { t = _tokenArray[ _tokenCount - 1 ]; n = TNode.Empty; return false; @@ -120,16 +121,19 @@ namespace StgSharp.Script public bool PopOperand( out Token t, out TNode n ) { - if( OperandAheadOfDepth <= 0 ) { + if( OperandAheadOfDepth <= 0 ) + { t = Token.Empty; n = TNode.Empty; return false; } - if( _isNode.Pop() ) { + if( _isNode.Pop() ) + { t = Token.Empty; n = _nodeArray[ --_nodeCount ]; return true; - } else { + } else + { t = _tokenArray[ --_tokenCount ]; n = TNode.Empty; return false; @@ -138,7 +142,8 @@ namespace StgSharp.Script public Token PopOperator() { - if( OperatorAheadOfDepth > 0 ) { + if( OperatorAheadOfDepth > 0 ) + { _operatorCount--; return _operatorArray[ _operatorCount ]; } @@ -176,18 +181,21 @@ namespace StgSharp.Script public bool TryPeekOperand( out bool isNode, out Token t, out TNode n ) { - if( OperandAheadOfDepth <= 0 ) { + if( OperandAheadOfDepth <= 0 ) + { t = Token.Empty; n = TNode.Empty; isNode = false; return false; } - if( _isNode.Pop() ) { + if( _isNode.Pop() ) + { t = Token.Empty; n = _nodeArray[ _nodeCount - 1 ]; isNode = true; return true; - } else { + } else + { t = _tokenArray[ _tokenCount - 1 ]; n = TNode.Empty; isNode = false; @@ -197,7 +205,8 @@ namespace StgSharp.Script public bool TryPeekOperator( out Token op ) { - if( OperatorAheadOfDepth > 0 ) { + if( OperatorAheadOfDepth > 0 ) + { op = _operatorArray[ _operatorCount - 1 ]; return true; } @@ -207,18 +216,21 @@ namespace StgSharp.Script public bool TryPopOperand( out bool isNode, out Token t, out TNode n ) { - if( OperandAheadOfDepth <= 0 ) { + if( OperandAheadOfDepth <= 0 ) + { t = Token.Empty; n = TNode.Empty; isNode = false; return false; } - if( _isNode.Pop() ) { + if( _isNode.Pop() ) + { t = Token.Empty; n = _nodeArray[ --_nodeCount ]; isNode = true; return true; - } else { + } else + { t = _tokenArray[ --_tokenCount ]; n = TNode.Empty; isNode = false; @@ -228,7 +240,8 @@ namespace StgSharp.Script public bool TryPopOperator( out Token op ) { - if( OperatorAheadOfDepth > 0 ) { + if( OperatorAheadOfDepth > 0 ) + { op = _operatorArray[ --_operatorCount ]; return true; } @@ -241,23 +254,18 @@ namespace StgSharp.Script public class CompileDepthMark { - public int OperandBegin + public CompileDepthMark( int operatorBegin, int operandBegin, int state ) { - get; - internal set; + OperatorBegin = operatorBegin; + OperandBegin = operandBegin; + State = state; } - public int OperatorBegin - { - get; - internal set; - } + public int OperandBegin { get; internal set; } - public int State - { - get; - internal set; - } + public int OperatorBegin { get; internal set; } + + public int State { get; internal set; } } } diff --git a/StgSharp.Script/Common/IASTNode.cs b/StgSharp.Script/Common/IASTNode.cs index d567d89e..61eb5be0 100644 --- a/StgSharp.Script/Common/IASTNode.cs +++ b/StgSharp.Script/Common/IASTNode.cs @@ -43,47 +43,23 @@ namespace StgSharp.Script where TType: ITypeSource { - long NodeFlag - { - get; - } + long NodeFlag { get; } - string CodeConvertTemplate - { - get; - } + string CodeConvertTemplate { get; } - TNode Previous - { - get; - set; - } + TNode Previous { get; set; } - TNode Next - { - get; - set; - } + TNode Next { get; set; } - TNode Left - { - get; - } + TNode Left { get; } - TNode Right - { - get; - } + TNode Right { get; } - static abstract TNode Empty - { - get; - } + static abstract TNode Empty { get; } - TType EqualityTypeConvert - { - get; - } + Token Source { get; } + + TType EqualityTypeConvert { get; } void AppendNode( TNode nextToken ); diff --git a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs index e02d0989..d61fd9c7 100644 --- a/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs +++ b/StgSharp.Script/Express/CompileEnv/DefaultSchema.cs @@ -41,8 +41,7 @@ namespace StgSharp.Script.Express internal partial class ExpSchema_Builtin : ExpSchema { - private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin( - ); + private static readonly ExpSchema_Builtin _onlyInstance = new ExpSchema_Builtin(); private ExpSchema_Builtin() : base() @@ -60,9 +59,7 @@ namespace StgSharp.Script.Express return; } - public override bool TryGetConst( - string name, - out ExpElementInstanceBase c ) + public override bool TryGetConst( string name, out ExpElementInstanceBase c ) { return ConstDict.TryGetValue( name, out c ); } @@ -73,9 +70,7 @@ namespace StgSharp.Script.Express return false; } - public override bool TryGetFunction( - string name, - out ExpFunctionSource f ) + public override bool TryGetFunction( string name, out ExpFunctionSource f ) { return FunctionDict.TryGetValue( name, out f! ); } @@ -86,9 +81,7 @@ namespace StgSharp.Script.Express return false; } - public override bool TryGetSchemaInclude( - string name, - out ExpSchema include ) + public override bool TryGetSchemaInclude( string name, out ExpSchema include ) { include = null!; return false; @@ -103,37 +96,33 @@ namespace StgSharp.Script.Express { IEnumerable> builtinTypeSource = [ new KeyValuePair( - PoolString( KeyWord.Integer ), - new ExpBuiltinType( KeyWord.Integer, typeof( int ) ) ), + PoolString( Keyword.Integer ), + new ExpBuiltinType( Keyword.Integer, typeof( int ) ) ), new KeyValuePair( - PoolString( KeyWord.Real ), - new ExpBuiltinType( KeyWord.Real, typeof( float ) ) ), + PoolString( Keyword.Real ), new ExpBuiltinType( Keyword.Real, typeof( float ) ) ), new KeyValuePair( - PoolString( KeyWord.Boolean ), - new ExpBuiltinType( KeyWord.Boolean, typeof( bool ) ) ), + PoolString( Keyword.Boolean ), + new ExpBuiltinType( Keyword.Boolean, typeof( bool ) ) ), new KeyValuePair( - PoolString( KeyWord.Logical ), - new ExpBuiltinType( KeyWord.Logical, typeof( ExpLogic ) ) ), + PoolString( Keyword.Logical ), + new ExpBuiltinType( Keyword.Logical, typeof( ExpLogic ) ) ), new KeyValuePair( - PoolString( KeyWord.String ), - new ExpBuiltinType( KeyWord.String, typeof( string ) ) ), + PoolString( Keyword.String ), + new ExpBuiltinType( Keyword.String, typeof( string ) ) ), new KeyValuePair( - PoolString( KeyWord.Binary ), - new ExpBuiltinType( KeyWord.Binary, typeof( BitArray ) ) ), + PoolString( Keyword.Binary ), + new ExpBuiltinType( Keyword.Binary, typeof( BitArray ) ) ), ]; - TypeDict = new Dictionary( - builtinTypeSource, Multiplexer ).ToFrozenDictionary(); + TypeDict = new Dictionary( builtinTypeSource, + Multiplexer ).ToFrozenDictionary(); - ConstDict = new Dictionary( - Multiplexer ) { + ConstDict = new Dictionary( Multiplexer ) { { PoolString( "PI" ), new ExpRealNumberNode( - new Token( PoolString( "PI" ), -1, -1, TokenFlag.Number ), - MathF.PI ) }, + new Token( PoolString( "PI" ), -1, -1, TokenFlag.Number ), MathF.PI ) }, { PoolString( "E" ), new ExpRealNumberNode( - new Token( PoolString( "E" ), -1, -1, TokenFlag.Number ), - MathF.E ) }, + new Token( PoolString( "E" ), -1, -1, TokenFlag.Number ), MathF.E ) }, }.ToFrozenDictionary(); } diff --git a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs index f14f3721..da1cbf10 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpCompile.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpCompile.cs @@ -1,6 +1,6 @@ //----------------------------------------------------------------------- //----------------------------------------------------------------------- -// file="ExpressCompile.cs" +// file="ExpCompile.cs" // Project: StgSharp // AuthorGroup: Nitload Space // Copyright (c) Nitload Space. All rights reserved. @@ -88,32 +88,28 @@ namespace StgSharp.Script.Express InitPrecedence(); _operatorsWithLetter = [ - KeyWord.Add, - KeyWord.Sub, - KeyWord.Mul, - KeyWord.Div, - KeyWord.And, - KeyWord.Or, - KeyWord.Xor, - KeyWord.AndOr, - KeyWord.Not, + Keyword.Add, + Keyword.Sub, + Keyword.Mul, + Keyword.Div, + Keyword.And, + Keyword.Or, + Keyword.Xor, + Keyword.AndOr, + Keyword.Not, ]; ExpSchema_Builtin.Only - .TryGetType( - PoolString( KeyWord.Integer ), - out ExpTypeSource? _expInt ); + .TryGetType( + PoolString( Keyword.Integer ), out ExpTypeSource? _expInt ); ExpInt = _expInt; ExpSchema_Builtin.Only - .TryGetType( - PoolString( KeyWord.Real ), - out ExpTypeSource? _expReal ); + .TryGetType( PoolString( Keyword.Real ), out ExpTypeSource? _expReal ); ExpReal = _expReal; ExpSchema_Builtin.Only - .TryGetType( - PoolString( KeyWord.Boolean ), - out ExpTypeSource? _expBool ); + .TryGetType( + PoolString( Keyword.Boolean ), out ExpTypeSource? _expBool ); ExpBool = _expBool; _emptyCache = new StringPool(); diff --git a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs index dc3e23eb..88276003 100644 --- a/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs +++ b/StgSharp.Script/Express/CompileEnv/ExpOperatorPrecedence.cs @@ -40,20 +40,16 @@ namespace StgSharp.Script.Express public static partial class ExpressCompile { - public static bool TryGetOperatorPrecedence( - string operatorName, - out int precedence ) + public static bool TryGetOperatorPrecedence( string operatorName, out int precedence ) { - return _operatorPrecedence.TryGetValue( - operatorName, out precedence ); + return _operatorPrecedence.TryGetValue( operatorName, out precedence ); } public static bool TryGetSuperTypeOperatorPrecedence( - string operatorName, - out int precedence ) + string operatorName, + out int precedence ) { - return _superTypeOperatorPrecedent.TryGetValue( - operatorName, out precedence ); + return _superTypeOperatorPrecedent.TryGetValue( operatorName, out precedence ); } private static void InitPrecedence() @@ -86,16 +82,18 @@ namespace StgSharp.Script.Express new KeyValuePair( PoolString( ":<>:" ), 6 ), new KeyValuePair( PoolString( "IN" ), 6 ), new KeyValuePair( PoolString( "LIKE" ), 6 ), + new KeyValuePair( PoolString( Keyword.Assignment ), 7 ) ]; - _operatorPrecedence = new Dictionary( - source, _multiplexer ).ToFrozenDictionary(); + _operatorPrecedence = new Dictionary( source, + _multiplexer ).ToFrozenDictionary(); source = [ new KeyValuePair( "ONEOF", 1 ), new KeyValuePair( "AND", 2 ), new KeyValuePair( "ANDOR", 3 ), ]; - _superTypeOperatorPrecedent = new Dictionary( - source, _multiplexer ).ToFrozenDictionary(); + _superTypeOperatorPrecedent = new Dictionary( source, + _multiplexer ).ToFrozenDictionary( + ); } #pragma warning disable CS8618 diff --git a/StgSharp.Script/Express/CompileEnv/KeyWord.cs b/StgSharp.Script/Express/CompileEnv/KeyWord.cs index f26217e1..3663d381 100644 --- a/StgSharp.Script/Express/CompileEnv/KeyWord.cs +++ b/StgSharp.Script/Express/CompileEnv/KeyWord.cs @@ -46,12 +46,11 @@ namespace StgSharp.Script.Express { _keywordSet = new(); - FieldInfo[] fields = typeof( KeyWord ).GetFields( - BindingFlags.Public ); + FieldInfo[] fields = typeof( Keyword ).GetFields( BindingFlags.Public ); ParallelLoopResult result = Parallel.ForEach( fields, static( field ) => { - if( field.FieldType == typeof( string ) && field.GetValue( - null ) is string str ) { + if( field.FieldType == typeof( string ) && field.GetValue( null ) is string str ) + { _compileStringCache.GetOrAdd( str ); _keywordSet.Add( str ); } @@ -59,7 +58,7 @@ namespace StgSharp.Script.Express while( !result.IsCompleted ) { } } - public static class KeyWord + public static class Keyword { public static HashSet ScopeBlock = new HashSet { @@ -74,24 +73,15 @@ namespace StgSharp.Script.Express CommentStart, CommentEnd, ColonEqualColon, ColonNotEqualColon ]; - public static HashSet DataTypes - { - get; - } = [ + public static HashSet DataTypes { get; } = [ Array, Bag, Binary, Boolean, Enumeration, Integer, List, Logical, Number, Of, Real, Set, String ]; - public static HashSet InternalProcess - { - get; - } = [ + public static HashSet InternalProcess { get; } = [ Insert, Remove ]; - public static HashSet BuiltinFunctions - { - get; - } = [ + public static HashSet BuiltinFunctions { get; } = [ Abs, Acos, Asin, Atan, BLength, Cos, Exists, Exp, Format, HiBound, HiIndex, Length, LoBound, Log, Log2, Log10, LoIndex, Nvl, Odd, Rolesof, Sin, @@ -99,62 +89,38 @@ namespace StgSharp.Script.Express ValueIn, ValueUnique ]; - public static HashSet Literals - { - get; - } = [ + public static HashSet Literals { get; } = [ QuestionMark, Self, Const, E, Pi, False, True, Unknown ]; - public static HashSet Operators - { - get; - } = [ + public static HashSet Operators { get; } = [ And, AndOr, Div, In, Like, Mod, Not, Or, Xor, Add, Sub, Mul, Slash, Equal, NotEqual, LessThan, GreaterThan, LessThanOrEqual, GreaterThanOrEqual ]; - public static HashSet Aliasing - { - get; - } = [ + public static HashSet Aliasing { get; } = [ Alias, Renamed ]; - public static HashSet ModifiersAttributes - { - get; - } = [ + public static HashSet ModifiersAttributes { get; } = [ Abstract, Aggregate, As, BasedOn, By, Escape, Fixed, From, Use, With ]; - public static HashSet QueryReference - { - get; - } = [ + public static HashSet QueryReference { get; } = [ Query, Reference, Select ]; - public static HashSet ConstraintsInheritance - { - get; - } = [ + public static HashSet ConstraintsInheritance { get; } = [ Oneof, Optional, Subtype, SubtypeConstraint, Supertype, TotalOver, Unique, Where ]; - public static HashSet Declarations - { - get; - } = [ + public static HashSet Declarations { get; } = [ Constant, Derive, Entity, Extensible, Fixed, Function, Generic, GenericEntity, Inverse, Local, Procedure, Rule, Schema, Type, Var ]; - public static HashSet FlowControl - { - get; - } = [ + public static HashSet FlowControl { get; } = [ Begin, Case, Else, End, For, If, Otherwise, Repeat, Return, Skip, Then, To, Until, While ]; diff --git a/StgSharp.Script/Express/Element/ExpConst.cs b/StgSharp.Script/Express/Element/ExpConst.cs index de3ca2c3..9c491786 100644 --- a/StgSharp.Script/Express/Element/ExpConst.cs +++ b/StgSharp.Script/Express/Element/ExpConst.cs @@ -45,8 +45,7 @@ namespace StgSharp.Script.Express private Dictionary _constants; private IScriptSourceProvider _sourceProvider; - public ExpConstantCollectionSource( - IScriptSourceProvider sourceProvider ) + public ExpConstantCollectionSource( IScriptSourceProvider sourceProvider ) { _sourceProvider = sourceProvider; _constants = new Dictionary( @@ -59,7 +58,7 @@ namespace StgSharp.Script.Express public override string Name { - get => ExpressCompile.KeyWord.Constant; + get => ExpressCompile.Keyword.Constant; } public override void Analyse() @@ -75,24 +74,21 @@ namespace StgSharp.Script.Express if( _constants.Count == 0 ) { return null!; } - if( _constants.TryGetValue( str, - out ExpElementInstanceBase? token ) ) { + if( _constants.TryGetValue( str, out ExpElementInstanceBase? token ) ) { return token; } return null!; } - public bool TryGetConstant( - string name, - out ExpElementInstanceBase instance ) + public bool TryGetConstant( string name, out ExpElementInstanceBase instance ) { return _constants.TryGetValue( name, out instance ); } public override bool TryGetMember( string name, out ExpNode memberNode ) { - if( _constants.TryGetValue( name, - out ExpElementInstanceBase? node ) ) { + if( _constants.TryGetValue( name, out ExpElementInstanceBase? node ) ) + { memberNode = node; return true; } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs index f47ec651..a7d64de0 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpBinaryOperatorNode.cs @@ -46,7 +46,12 @@ namespace StgSharp.Script.Express private ExpNode _left; private ExpNode _right; - private ExpBinaryOperatorNode( Token source ) : base( source ) { } + private ExpBinaryOperatorNode( Token source, ExpNode left, ExpNode right ) + : base( source ) + { + _left = left; + _right = right; + } public override ExpInstantiableElement EqualityTypeConvert => _returnType; @@ -54,77 +59,59 @@ namespace StgSharp.Script.Express public override ExpNode Right => _right; - public static ExpBinaryOperatorNode Add( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode Add( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { - _returnType = isFloat ? - ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} + {1}", }; } - public static ExpBinaryOperatorNode Assign( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode Assign( Token source, ExpNode left, ExpNode right ) { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, - right.EqualityTypeConvert.Name ); + left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpInstantiableElement.Void, _nodeFlag = ExpNodeFlag.Operator_Binary | left._nodeFlag, - CodeConvertTemplate = "{0} & {1}", + CodeConvertTemplate = "{0} = {1}", }; } - public static ExpBinaryOperatorNode Div( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode Div( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { - _returnType = isFloat ? - ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} / {1}", }; } - public static ExpBinaryOperatorNode EqualTo( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode EqualTo( Token source, ExpNode left, ExpNode right ) { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, - right.EqualityTypeConvert.Name ); + left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, @@ -132,16 +119,12 @@ namespace StgSharp.Script.Express }; } - public static ExpBinaryOperatorNode GreaterThan( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode GreaterThan( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, @@ -149,16 +132,12 @@ namespace StgSharp.Script.Express }; } - public static ExpBinaryOperatorNode LessThan( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode LessThan( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, @@ -166,38 +145,29 @@ namespace StgSharp.Script.Express }; } - public static ExpBinaryOperatorNode Mul( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode Mul( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { - _returnType = isFloat ? - ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} * {1}", }; } - public static ExpBinaryOperatorNode NotEqualTo( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode NotEqualTo( Token source, ExpNode left, ExpNode right ) { if( left.EqualityTypeConvert != right.EqualityTypeConvert ) { throw new ExpInvalidTypeException( - left.EqualityTypeConvert.Name, - right.EqualityTypeConvert.Name ); + left.EqualityTypeConvert.Name, right.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, @@ -205,16 +175,12 @@ namespace StgSharp.Script.Express }; } - public static ExpBinaryOperatorNode SmallerThan( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode SmallerThan( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { _returnType = ExpressCompile.ExpBool, _nodeFlag = ExpNodeFlag.BuiltinType_Boolean | ExpNodeFlag.Operator_Binary, @@ -222,22 +188,17 @@ namespace StgSharp.Script.Express }; } - public static ExpBinaryOperatorNode Sub( - Token source, - ExpNode left, - ExpNode right ) + public static ExpBinaryOperatorNode Sub( Token source, ExpNode left, ExpNode right ) { if( !left.IsNumber && !right.IsNumber ) { - throw new ExpInvalidTypeException( - "Number", left.EqualityTypeConvert.Name ); + throw new ExpInvalidTypeException( "Number", left.EqualityTypeConvert.Name ); } bool isFloat = ( left._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0 || ( right._nodeFlag | ExpNodeFlag.BuiltinType_Real ) == 0; - return new ExpBinaryOperatorNode( source ) + return new ExpBinaryOperatorNode( source, left, right ) { - _returnType = isFloat ? - ExpressCompile.ExpReal : ExpressCompile.ExpInt, + _returnType = isFloat ? ExpressCompile.ExpReal : ExpressCompile.ExpInt, _nodeFlag = ExpNodeFlag.Operator_Binary | ExpNodeFlag.BuiltinType_Number, CodeConvertTemplate = "{0} - {1}", }; diff --git a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs index b2a85cf5..9275c01c 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpElementMemberNameNode.cs @@ -55,9 +55,7 @@ namespace StgSharp.Script.Express get { ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.String, - out ExpTypeSource? strType ); + .TryGetType( ExpressCompile.Keyword.String, out ExpTypeSource? strType ); return strType; } } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs index 0ebaf8d1..dbdaeb13 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpInstanceReferenceNode.cs @@ -42,22 +42,19 @@ namespace StgSharp.Script.Express private ExpElementInstanceBase _instance; - internal ExpInstanceReferenceNode( - Token source, - ExpElementInstanceBase instance ) + internal ExpInstanceReferenceNode( Token source, ExpElementInstanceBase instance ) : base( source ) { _instance = instance; _nodeFlag = ( _instance._nodeFlag | ( ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any ) ); } - internal ExpInstanceReferenceNode( - Token source, - ExpInstanceReferenceNode reference ) + internal ExpInstanceReferenceNode( Token source, ExpInstanceReferenceNode reference ) : base( source ) { _instance = reference._instance; _nodeFlag = ( _instance._nodeFlag | ( ExpNodeFlag.Name_Any | ExpNodeFlag.Collection_Any ) ); + CodeConvertTemplate = source.Value; } public override ExpNode Left => Empty; @@ -68,9 +65,14 @@ namespace StgSharp.Script.Express [MethodImpl( MethodImplOptions.AggressiveInlining )] public static ExpInstanceReferenceNode Create( - Token source, - ExpElementInstanceBase instance ) + Token source, + ExpElementInstanceBase instance ) { + /* + if( instance.CodeConvertTemplate != source.Value ) { + throw new ExpCompileException( source, "Token point at a wrong instance" ); + } + /**/ return new ExpInstanceReferenceNode( source, instance ); } diff --git a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs index 04f8d8e2..6d0ded4b 100644 --- a/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/ExpLiteralNode.cs @@ -50,14 +50,14 @@ namespace StgSharp.Script.Express } public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.Integer, - out ExpTypeSource? type ) ? + .TryGetType( + ExpressCompile.Keyword.Integer, + out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public int Value => _value; - public override string TypeName => ExpressCompile.KeyWord.Integer; + public override string TypeName => ExpressCompile.Keyword.Integer; } @@ -74,9 +74,9 @@ namespace StgSharp.Script.Express } public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.String, - out ExpTypeSource? type ) ? + .TryGetType( + ExpressCompile.Keyword.String, + out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public override string TypeName => EqualityTypeConvert.Name; @@ -100,9 +100,9 @@ namespace StgSharp.Script.Express public bool Value => _value; public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.Boolean, - out ExpTypeSource? type ) ? + .TryGetType( + ExpressCompile.Keyword.Boolean, + out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public override string TypeName => EqualityTypeConvert.Name; @@ -124,9 +124,9 @@ namespace StgSharp.Script.Express public float Value => _value; public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.String, - out ExpTypeSource? type ) ? + .TryGetType( + ExpressCompile.Keyword.String, + out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public override string TypeName => EqualityTypeConvert.Name; @@ -148,9 +148,9 @@ namespace StgSharp.Script.Express public ExpLogic Value => _value; public override IExpElementSource EqualityTypeConvert => ExpSchema.BuiltinSchema - .TryGetType( - ExpressCompile.KeyWord.Logical, - out ExpTypeSource? type ) ? + .TryGetType( + ExpressCompile.Keyword.Logical, + out ExpTypeSource? type ) ? type : throw new ExpCompileNotInitializedException(); public override string TypeName => EqualityTypeConvert.Name; diff --git a/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs b/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs index 3c69c279..7d466d2d 100644 --- a/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs +++ b/StgSharp.Script/Express/ExpAstNode/_ExpNode.cs @@ -56,37 +56,20 @@ namespace StgSharp.Script.Express get { return ( _nodeFlag | ExpNodeFlag.BuiltinType_Number ) != 0; } } - public abstract ExpNode Left - { - get; - } + public abstract ExpNode Left { get; } public static ExpNode Empty { get => ExpEmptyNode._only; } - public ExpNode Next - { - get; - set; - } + public ExpNode Next { get; set; } - public abstract ExpNode Right - { - get; - } + public abstract ExpNode Right { get; } - public ExpNode Previous - { - get; - set; - } + public ExpNode Previous { get; set; } - public abstract IExpElementSource EqualityTypeConvert - { - get; - } + public abstract IExpElementSource EqualityTypeConvert { get; } public int Line => _source.Line; @@ -94,10 +77,11 @@ namespace StgSharp.Script.Express public long NodeFlag => ( long )_nodeFlag; - public string CodeConvertTemplate + public string CodeConvertTemplate { get; init; } + + public Token Source { - get; - init; + get => _source; } public void AppendNode( ExpNode nextNode ) @@ -160,8 +144,7 @@ namespace StgSharp.Script.Express public ExpEmptyNode() : base( Token.Empty ) { } public ExpEmptyNode( int line, int column ) - : base( - new Token( string.Empty, line, column, TokenFlag.None ) ) { } + : base( new Token( string.Empty, line, column, TokenFlag.None ) ) { } public override ExpInstantiableElement EqualityTypeConvert => ExpInstantiableElement.Void; diff --git a/StgSharp.Script/Express/ExpElementInstanceBase.cs b/StgSharp.Script/Express/ExpElementInstanceBase.cs index fe21ece8..7d06a469 100644 --- a/StgSharp.Script/Express/ExpElementInstanceBase.cs +++ b/StgSharp.Script/Express/ExpElementInstanceBase.cs @@ -56,33 +56,36 @@ namespace StgSharp.Script.Express public abstract class ExpElementInstanceBase : ExpNode { - protected ExpElementInstanceBase( Token source ) : base( source ) { } - - public ExpElementType ElementType + protected ExpElementInstanceBase( Token source ) + : base( source ) { - get; + CodeConvertTemplate = source.Value; } + public ExpElementType ElementType { get; } + public override ExpNode Left => Empty; public override ExpNode Right => Empty; - public abstract string TypeName - { - get; - } + public abstract string TypeName { get; } public static ExpElementInstanceBase CreateLiteral( Token t ) { - if( int.TryParse( t.Value, out int _int ) ) { + if( int.TryParse( t.Value, out int _int ) ) + { return new ExpIntNode( t, _int ); - } else if( float.TryParse( t.Value, out float _float ) ) { + } else if( float.TryParse( t.Value, out float _float ) ) + { return new ExpRealNumberNode( t, _float ); - } else if( bool.TryParse( t.Value, out bool _bool ) ) { + } else if( bool.TryParse( t.Value, out bool _bool ) ) + { return new ExpBoolNode( t, _bool ); - } else if( ExpLogic.TryParse( t.Value, out ExpLogic _logic ) ) { + } else if( ExpLogic.TryParse( t.Value, out ExpLogic _logic ) ) + { return new ExpLogicValueNode( t, _logic ); - } else { + } else + { return new ExpStringNode( t, t.Value ); } } diff --git a/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs b/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs index f83d1163..eca4698c 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.BranchParser.cs @@ -34,7 +34,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; namespace StgSharp.Script.Express { @@ -43,15 +43,18 @@ namespace StgSharp.Script.Express private bool TryParseBranch( Token t ) { - if( t.Value == ExpKeyword.Case ) { + if( t.Value == ExpKeyword.Case ) + { _cache.PushOperator( t ); _cache.IncreaseDepth( ( int )ExpCompileStateCode.CaseBranch ); return true; - } else if( t.Value == ExpKeyword.If ) { + } else if( t.Value == ExpKeyword.If ) + { _cache.PushOperator( t ); _cache.IncreaseDepth( ( int )ExpCompileStateCode.IfBranch ); return true; - } else if( t.Value == ExpKeyword.Repeat ) { + } else if( t.Value == ExpKeyword.Repeat ) + { _cache.PushOperator( t ); _cache.IncreaseDepth( ( int )ExpCompileStateCode.RepeatLoop ); return true; diff --git a/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs b/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs index b54154a6..e31a2879 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.OperatorParser.cs @@ -34,7 +34,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; namespace StgSharp.Script.Express { @@ -43,17 +43,16 @@ namespace StgSharp.Script.Express public int CompareOperatorPrecedence( Token left, Token right ) { - ExpressCompile.TryGetOperatorPrecedence( - left.Value, out int leftPrecedence ); - ExpressCompile.TryGetOperatorPrecedence( - right.Value, out int rightPrecedence ); + ExpressCompile.TryGetOperatorPrecedence( left.Value, out int leftPrecedence ); + ExpressCompile.TryGetOperatorPrecedence( right.Value, out int rightPrecedence ); return leftPrecedence - rightPrecedence; } public bool TryGenerateUnaryNode( Token t, out ExpNode node ) { ExpNode operand = GetNextOperandCache(); - switch( t.Value ) { + switch( t.Value ) + { case ExpKeyword.UnaryPlus: node = ExpUnaryOperatorNode.UnaryPlus( t, operand ); return true; @@ -70,12 +69,13 @@ namespace StgSharp.Script.Express } /// - /// WARNING: This method cannot process INDEXOF, FUNCTION CALLING, LOOP and any ENDING - /// SYMBOLS. + /// WARNING: This method cannot process INDEXOF, FUNCTION CALLING, LOOP and any ENDING + /// SYMBOLS. /// - private ExpNode ConvertOneOperator( Token op ) + private ExpNode ConvertAndPushOneOperator( Token op ) { - switch( op.Flag ) { + switch( op.Flag ) + { case TokenFlag.Symbol_Unary: TryGenerateUnaryNode( op, out ExpNode? node ); _cache.PushOperand( node ); @@ -85,31 +85,32 @@ namespace StgSharp.Script.Express _cache.PushOperand( node ); return node; case TokenFlag.Member: - if( _context.TryGetFunction( - op.Value, out ExpFunctionSource? f ) ) { - if( !_cache.PopOperand( out Token t, - out ExpNode? p ) ) { - node = ExpFunctionCallingNode.CallFunction( - op, f, p ); + if( _context.TryGetFunction( op.Value, out ExpFunctionSource? f ) ) + { + if( !_cache.PopOperand( out Token t, out ExpNode? p ) ) + { + node = ExpFunctionCallingNode.CallFunction( op, f, p ); return node; - } else { + } else + { throw new ExpCompileException( t, "An ExpNode for function calling is needed, but a token was popped" ); } - } else if( ExpSchema.BuiltinSchema - .TryGetFunction( op.Value, out f ) ) { - if( !_cache.PopOperand( out Token t, - out ExpNode? p ) ) { - node = ExpFunctionCallingNode.CallFunction( - op, f, p ); + } else if( ExpSchema.BuiltinSchema.TryGetFunction( op.Value, out f ) ) + { + if( !_cache.PopOperand( out Token t, out ExpNode? p ) ) + { + node = ExpFunctionCallingNode.CallFunction( op, f, p ); return node; - } else { + } else + { throw new ExpCompileException( t, "An ExpNode for function calling is needed, but a token was popped" ); } - } else { + } else + { throw new NotImplementedException(); //uncertain case here @@ -121,9 +122,10 @@ namespace StgSharp.Script.Express private bool TryGenerateBinaryNode( Token t, out ExpNode node ) { - ExpNode left = GetNextOperandCache(); ExpNode right = GetNextOperandCache(); - switch( t.Value ) { + ExpNode left = GetNextOperandCache(); + switch( t.Value ) + { case ExpKeyword.Add: node = ExpBinaryOperatorNode.Add( t, left, right ); return true; @@ -148,6 +150,9 @@ namespace StgSharp.Script.Express case ExpKeyword.LessThan: node = ExpBinaryOperatorNode.LessThan( t, left, right ); return true; + case ExpKeyword.Assignment: + node = ExpBinaryOperatorNode.Assign( t, left, right ); + return true; default: node = ExpNode.Empty; return false; diff --git a/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs b/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs index a803f3f3..2fca9ec6 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.PrefixReverseAnalysing.cs @@ -35,7 +35,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; namespace StgSharp.Script.Express { @@ -45,24 +45,24 @@ namespace StgSharp.Script.Express private void ClosePrefixReverse( Token rightSeparator ) { Token op; - while( _cache.TryPopOperator( out op ) ) { - if( op.Value == ExpKeyword.Comma ) { - if( !_cache.TryPopOperand( - out bool isNode, out Token t1, out ExpNode? n1 ) ) { - throw new ExpCompileException( - op, "No expression before a comma" ); + while( _cache.TryPopOperator( out op ) ) + { + if( op.Value == ExpKeyword.Comma ) + { + if( !_cache.TryPopOperand( out bool isNode, out Token t1, out ExpNode? n1 ) ) { + throw new ExpCompileException( op, "No expression before a comma" ); } - if( !isNode ) { + if( !isNode ) + { //On some occasions, a token may found, //but the processor is not implemented throw new NotImplementedException(); } - if( !_cache.TryPopOperand( - out isNode, out Token t2, out ExpNode? n2 ) ) { - throw new ExpCompileException( - op, "No expression before a comma" ); + if( !_cache.TryPopOperand( out isNode, out Token t2, out ExpNode? n2 ) ) { + throw new ExpCompileException( op, "No expression before a comma" ); } - if( !isNode ) { + if( !isNode ) + { //On some occasions, a token may found, //but the processor is not implemented throw new NotImplementedException(); @@ -71,20 +71,20 @@ namespace StgSharp.Script.Express _cache.PushOperand( n1 ); continue; } - ConvertOneOperator( op ); - - ExpNode node = GetNextOperandCache(); - _cache.PushOperand( node ); + ConvertAndPushOneOperator( op ); } if( !_cache.TryPopOperand( out _, out _, out ExpNode? root ) ) { _cache.PushOperand( ExpNode.Empty ); } _cache.DecreaseDepth(); - if( IsSeparatorMatch( _cache.PeekOperator(), rightSeparator ) ) { + if( IsSeparatorMatch( _cache.PeekOperator(), rightSeparator ) ) + { _cache.PopOperator(); - } else { - // some unexpected occasions - throw new NotImplementedException(); + _cache.PushOperand( root ); + } else + { + throw new ExpCompileException( + rightSeparator, "Ending of block soes not match its begging" ); } } diff --git a/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs b/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs index af008147..a62eb65b 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.TokenSpliter.cs @@ -34,26 +34,21 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; namespace StgSharp.Script.Express { public partial class ExpNodeGenerator { - private bool IsSeparatorMatch( - Token leftSperator, - Token rightSeparator ) + private bool IsSeparatorMatch( Token leftSperator, Token rightSeparator ) { return leftSperator.Value switch { - ExpKeyword.LeftBrace => rightSeparator.Value == - ExpKeyword.RightBrace, - ExpKeyword.LeftParen => rightSeparator.Value == - ExpKeyword.RightParen, + ExpKeyword.LeftBrace => rightSeparator.Value == ExpKeyword.RightBrace, + ExpKeyword.LeftParen => rightSeparator.Value == ExpKeyword.RightParen, ExpKeyword.Comma => rightSeparator.Value == ExpKeyword.Comma, - ExpKeyword.Semicolon => rightSeparator.Value == - ExpKeyword.Semicolon, + ExpKeyword.Semicolon => rightSeparator.Value == ExpKeyword.Semicolon, _ => false }; } @@ -63,8 +58,8 @@ namespace StgSharp.Script.Express if( t.Flag != TokenFlag.Index_Left ) { return false; } - if( _cache.TryPeekOperand( - out bool isNode, out _, out ExpNode? node ) ) { + if( _cache.TryPeekOperand( out bool isNode, out _, out ExpNode? node ) ) + { if( node.EqualityTypeConvert is not ExpCollectionBase ) { ExpInvalidSyntaxException.ThrowNonCollectionIndex( t ); } @@ -85,8 +80,7 @@ namespace StgSharp.Script.Express //make index node _cache.PopOperand( out _, out ExpNode? expNode ); - if( !_cache.PopOperand( - out Token colleToken, out ExpNode? colleNode ) ) { } + if( !_cache.PopOperand( out Token colleToken, out ExpNode? colleNode ) ) { } _cache.PushOperand( ExpCollectionIndexNode.Create( t, ( colleNode as ExpCollectionInstanceBase )!, expNode ) ); @@ -120,27 +114,32 @@ namespace StgSharp.Script.Express if( t.Flag != TokenFlag.Separator_Middle ) { return false; } - if( _cache.OperatorAheadOfDepth == 0 ) { - if( _cache.OperandAheadOfDepth == 1 ) { + if( _cache.OperatorAheadOfDepth == 0 ) + { + if( _cache.OperandAheadOfDepth == 1 ) + { _cache.PushOperand( t ); _cache.PushOperator( t ); return true; - } else { + } else + { ExpInvalidSyntaxException.ThrowNoOperator( t ); } } Token op; processOperator: - if( _cache.TryPopOperator( out op ) ) { - if( op.Value == t.Value ) { + if( _cache.TryPopOperator( out op ) ) + { + if( op.Value == t.Value ) + { _cache.PopOperand( out _, out ExpNode? node ); //append node to tail _cache.PushOperand( t ); _cache.PushOperator( t ); - } else { - ExpNode node = ConvertOneOperator( op ); - _cache.PushOperand( node ); + } else + { + ExpNode node = ConvertAndPushOneOperator( op ); goto processOperator; } } @@ -161,6 +160,7 @@ namespace StgSharp.Script.Express if( t.Flag != TokenFlag.Separator_Left ) { return false; } + _cache.PushOperator( t ); _cache.IncreaseDepth( ( int )ExpCompileStateCode.PrefixSeparator ); return true; } @@ -176,31 +176,35 @@ namespace StgSharp.Script.Express private bool TryAppendSymbol( Token t ) { - if( ( t.Flag & ( TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary ) ) == - 0 ) { + if( ( t.Flag & ( TokenFlag.Symbol_Unary | TokenFlag.Symbol_Binary ) ) == 0 ) { return false; } int cmp = -1; processPrecedence: - if( _cache.TryPopOperator( out Token tmp ) ) { + if( _cache.TryPeekOperator( out Token tmp ) ) + { cmp = CompareOperatorPrecedence( t, tmp ); - if( cmp <= 0 ) { - ExpNode node = ConvertOneOperator( tmp ); + if( cmp >= 0 ) + { + _cache.PopOperator(); + ExpNode node = ConvertAndPushOneOperator( tmp ); _cache.PushOperand( node ); goto processPrecedence; } } - _cache.PushOperand( t ); + _cache.PushOperator( t ); return true; } private bool TryParseConstant( Token t ) { - if( t.Value == ExpKeyword.True ) { + if( t.Value == ExpKeyword.True ) + { _cache.PushOperand( new ExpBoolNode( t, true ) ); return true; - } else if( t.Value == ExpKeyword.False ) { + } else if( t.Value == ExpKeyword.False ) + { _cache.PushOperand( new ExpBoolNode( t, false ) ); return true; } @@ -209,11 +213,12 @@ namespace StgSharp.Script.Express private bool TryParseFunction( Token t ) { - if( ExpKeyword.BuiltinFunctions.Contains( t.Value ) ) { + if( ExpKeyword.BuiltinFunctions.Contains( t.Value ) ) + { _cache.PushOperator( t ); return true; - } else if( _context.TryGetFunction( - t.Value, out ExpFunctionSource? f ) ) { + } else if( _context.TryGetFunction( t.Value, out ExpFunctionSource? f ) ) + { _cache.PushOperand( t ); return true; } @@ -223,9 +228,9 @@ namespace StgSharp.Script.Express private bool TryParseInstance( Token t ) { if( _local.TryGetMember( t.Value, - out ExpNode? node ) && node is ExpElementInstanceBase instance ) { - _cache.PushOperand( - ExpInstanceReferenceNode.Create( t, instance ) ); + out ExpNode? node ) && node is ExpElementInstanceBase instance ) + { + _cache.PushOperand( ExpInstanceReferenceNode.Create( t, instance ) ); return true; } return false; diff --git a/StgSharp.Script/Express/ExpNodeGenerator.cs b/StgSharp.Script/Express/ExpNodeGenerator.cs index 9eee0140..6ff6f54b 100644 --- a/StgSharp.Script/Express/ExpNodeGenerator.cs +++ b/StgSharp.Script/Express/ExpNodeGenerator.cs @@ -40,7 +40,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -using ExpKeyword = StgSharp.Script.Express.ExpressCompile.KeyWord; +using ExpKeyword = StgSharp.Script.Express.ExpressCompile.Keyword; namespace StgSharp.Script.Express { @@ -67,9 +67,11 @@ namespace StgSharp.Script.Express { _cache = new CompileStack(); ArgumentNullException.ThrowIfNull( context ); - if( context is not ExpSchema_Builtin ) { + if( context is not ExpSchema_Builtin ) + { _context = context; - } else { + } else + { throw new InvalidCastException( "Not a valid Schema type" ); } _local = local; @@ -78,12 +80,13 @@ namespace StgSharp.Script.Express /**/ /// - /// Append a token to top of cache. This method will automatically convert token to node if - /// meets separators or operators. + /// Append a token to top of cache. This method will automatically convert token to node + /// if meets separators or operators. /// public void AppendToken( Token expToken ) { - switch( expToken.Flag ) { + switch( expToken.Flag ) + { case TokenFlag.Symbol_Unary or TokenFlag.Symbol_Binary: TryAppendSymbol( expToken ); break; @@ -112,7 +115,8 @@ namespace StgSharp.Script.Express public ExpNode GetNextOperandCache() { - if( _cache.PopOperand( out Token t, out ExpNode? n ) ) { + if( _cache.PopOperand( out Token t, out ExpNode? n ) ) + { return n; } else { } diff --git a/StgSharp.Script/Express/ExpSourceReader.cs b/StgSharp.Script/Express/ExpSourceReader.cs index 0bad590e..fa4b1d69 100644 --- a/StgSharp.Script/Express/ExpSourceReader.cs +++ b/StgSharp.Script/Express/ExpSourceReader.cs @@ -189,7 +189,7 @@ namespace StgSharp.Script.Express begin = _current; _current++; _last = new Token( - ExpressCompile.PoolString( ")" ), _lineNum, begin, + ExpressCompile.PoolString( source[ ..1 ] ), _lineNum, begin, TokenFlag.Separator_Right ); return _last; case '-': @@ -267,13 +267,14 @@ namespace StgSharp.Script.Express begin = _current; _current += 2; return new Token( - ExpressCompile.KeyWord.Assignment, _lineNum, begin, - TokenFlag.Index_Right ); + ExpressCompile.Keyword.Assignment, _lineNum, begin, + TokenFlag.Symbol_Binary ); } begin = _current; _current++; return new Token( - ExpressCompile.KeyWord.Colon, _lineNum, begin, TokenFlag.Index_Right ); + ExpressCompile.Keyword.Colon, _lineNum, begin, + TokenFlag.Separator_Middle ); case '+' or '/' or '\\' or '*' or '.': begin = _current; _current++; @@ -293,16 +294,7 @@ namespace StgSharp.Script.Express rest = match.Groups[ RestMark ].Index; _current = rest; string str = ExpressCompile.PoolString( source[ ..( end - begin ) ] ); - TokenFlag flag; - if( ReferenceEquals( str, ExpressCompile.KeyWord.Not ) ) - { - flag = TokenFlag.Symbol_Unary; - } else - { - flag = ExpressCompile.LetterIsOperator( str ) ? - TokenFlag.Symbol_Binary : TokenFlag.Member; - } - return new( str, _lineNum, begin, flag ); + return new( str, _lineNum, begin, TokenFlag.Number ); } else { throw new ExpInvalidTokenException( _current ); 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 845e0287..d983aaac 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+528d0c5462b4d3da107ad29b859f9c8006fb675a")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")] [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 2738e12a..248b54bf 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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}} \ No newline at end of file diff --git a/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs b/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs index 251baac4..e0691a40 100644 --- a/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs +++ b/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.AssemblyInfo.cs @@ -14,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+6788bc4a0065508d7afa5f740da1b4ca6dd1efef")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")] [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/x64/Debug/StgSharp.TerminalDialogue.sourcelink.json b/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.sourcelink.json index 2eeaae6f..248b54bf 100644 --- a/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.sourcelink.json +++ b/StgSharp.TerminalDialogue/obj/x64/Debug/StgSharp.TerminalDialogue.sourcelink.json @@ -1 +1 @@ -{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/6788bc4a0065508d7afa5f740da1b4ca6dd1efef/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}} \ No newline at end of file diff --git a/StgSharpDebug/ExpLinearExpressionTest.cs b/StgSharpDebug/ExpLinearExpressionTest.cs index 24199cac..a811c1ae 100644 --- a/StgSharpDebug/ExpLinearExpressionTest.cs +++ b/StgSharpDebug/ExpLinearExpressionTest.cs @@ -36,6 +36,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml.Schema; namespace StgSharp { @@ -54,6 +55,67 @@ namespace StgSharp LocalVariables.Add( "c", ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) ); + LocalVariables.Add( + "d", + ExpElementInstanceBase.CreateLiteral( new Token( "1", 0, 0, TokenFlag.Number ) ) ); + } + + } + + internal class TestSchema : ExpSchema + { + + internal ExpTestFuncSource source; + + public TestSchema( ExpTestFuncSource testType ) + { + source = testType; + } + + public override void LoadFromSource( ExpSchemaSource source ) + { + return; + } + + public override bool TryGetConst( string name, out ExpElementInstanceBase c ) + { + c = null; + return false; + } + + public override bool TryGetEntity( string name, out ExpEntitySource e ) + { + e = null; + return false; + } + + public override bool TryGetFunction( string name, out ExpFunctionSource f ) + { + if( name == "TestFunc" ) + { + f = source; + return true; + } + f = null; + return false; + } + + public override bool TryGetRule( string name, out ExpRuleSource r ) + { + r = null; + return false; + } + + public override bool TryGetSchemaInclude( string name, out ExpSchema include ) + { + include = null; + return false; + } + + public override bool TryGetType( string name, out ExpTypeSource t ) + { + t = null; + return false; } } @@ -65,17 +127,23 @@ namespace StgSharp { ExpressCompile.InitCompile(); ScriptSourceTransmitter transmitter = new ScriptSourceTransmitter( "END", 0 ); - transmitter.WriteLine( @"a := b + c;" ); + transmitter.WriteLine( @"a := ( b + c + d * 2 ) * d;" ); + + //transmitter.WriteLine( @"a := b + (c + d) * a;" ); transmitter.EndWriting(); ExpSourceReader reader = new ExpSourceReader( transmitter ); - /* - ExpNodeGenerator generator = new ExpNodeGenerator( - , new ExpTestFuncSource( "test", transmitter ) ); /**/ + ExpTestFuncSource func = new ExpTestFuncSource( "test", transmitter ); + TestSchema testSchema = new TestSchema( func ); + ExpNodeGenerator generator = new ExpNodeGenerator( testSchema, func ); + /**/ + while( reader.TryReadToken( out Token t ) ) { Console.WriteLine( t.Value ); + generator.AppendToken( t ); } + Console.WriteLine( "OK" ); } } diff --git a/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs b/StgSharpDebug/obj/x64/Debug/net8.0/StgSharpDebug.AssemblyInfo.cs index c0e95cc9..a59e88fc 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+528d0c5462b4d3da107ad29b859f9c8006fb675a")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+148b0fed4a1abaaeaa3a28e7c7b088590805ebef")] [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 2738e12a..248b54bf 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/528d0c5462b4d3da107ad29b859f9c8006fb675a/*"}} \ No newline at end of file +{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\内核源代码\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/148b0fed4a1abaaeaa3a28e7c7b088590805ebef/*"}} \ No newline at end of file