Tighten FlatExpression naming and 16-bit index storage#548
Conversation
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/1746b8bc-0db6-44b9-8a60-8e4068db9213 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
dadhi
left a comment
There was a problem hiding this comment.
ci build is failing:
Error: /home/runner/work/FastExpressionCompiler/FastExpressionCompiler/test/FastExpressionCompiler.LightExpression.UnitTests/LightExpressionTests.cs(781,34): error CS0103: The name 'Unsafe' does not exist in the current context [/home/runner/work/FastExpressionCompiler/FastExpressionCompiler/test/FastExpressionCompiler.LightExpression.UnitTests/FastExpressionCompiler.LightExpression.UnitTests.csproj::TargetFramework=net472]
Error: /home/runner/work/FastExpressionCompiler/FastExpressionCompiler/test/FastExpressionCompiler.LightExpression.UnitTests/LightExpressionTests.cs(782,33): error CS0103: The name 'Unsafe' does not exist in the current context [/home/runner/work/FastExpressionCompiler/FastExpressionCompiler/test/FastExpressionCompiler.LightExpression.UnitTests/FastExpressionCompiler.LightExpression.UnitTests.csproj::TargetFramework=net472]
Agent-Logs-Url: https://github.com/dadhi/FastExpressionCompiler/sessions/2c43aaa3-1c5f-4502-a348-af035cb7c350 Co-authored-by: dadhi <39516+dadhi@users.noreply.github.com>
Fixed in 15012aa. I replaced the |
FlatExpressionhad drifted in two places: comments were noisy/inconsistent, and index naming/storage conventions were not enforced uniformly. This change trims the file back to a singleIdxvocabulary and makes the 16-bit storage contract explicit in code.Comment cleanup
FlatExpression.cscomments to plain technical prose.Naming normalization
RootIndextoRootIdx.Idx/Idxswhere the file already used that convention.16-bit index enforcement
checked((ushort)...)when writing child/next metadata into packed node fields.Focused regression coverage
ExprNoderemains 24 bytesLambdaClosureParameterUsageremains 6 bytes